31 lines
1.3 KiB
CMake
31 lines
1.3 KiB
CMake
project(opengl-playground)
|
|
|
|
#set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
|
|
|
cmake_minimum_required(VERSION 2.8)
|
|
find_package(PkgConfig REQUIRED)
|
|
pkg_check_modules(EPOXY REQUIRED epoxy)
|
|
pkg_check_modules(SDL2 REQUIRED sdl2)
|
|
|
|
#find_package(OpenCL REQUIRED)
|
|
|
|
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include" ${EPOXY_INCLUDE_DIRS} ${SDL2_INCLUDE_DIRS})
|
|
|
|
|
|
configure_file("shaders/2d-passthrough-vertex.glsl" "shaders/2d-passthrough-vertex.glsl" COPYONLY)
|
|
configure_file("shaders/fixed-red-fragment.glsl" "shaders/fixed-red-fragment.glsl" COPYONLY)
|
|
configure_file("shaders/triangle-gen-geometry.glsl" "shaders/triangle-gen-geometry.glsl" COPYONLY)
|
|
configure_file("shaders/triangle-gen-zoomed-geometry.glsl" "shaders/triangle-gen-zoomed-geometry.glsl" COPYONLY)
|
|
configure_file("shaders/textured-rectangle-vertex.glsl" "shaders/textured-rectangle-vertex.glsl" COPYONLY)
|
|
configure_file("shaders/textured-rectangle-fragment.glsl" "shaders/textured-rectangle-fragment.glsl" COPYONLY)
|
|
|
|
|
|
configure_file("shaders/2d-zoom-translate-vertex.glsl" "shaders/2d-zoom-translate-vertex.glsl" COPYONLY)
|
|
|
|
aux_source_directory("src" SOURCES)
|
|
add_compile_options(-Wall)
|
|
|
|
add_executable(${PROJECT_NAME} ${SOURCES})
|
|
target_link_libraries(${PROJECT_NAME} m pthread ${EPOXY_LIBRARIES} ${SDL2_LIBRARIES})
|
|
install (TARGETS ${PROJECT_NAME} DESTINATION bin)
|