project(opengl-playground) #set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") cmake_minimum_required(VERSION 2.8) find_package(glm REQUIRED) 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" "${CMAKE_CURRENT_SOURCE_DIR}/imgui-submodule/imgui/examples" "${CMAKE_CURRENT_SOURCE_DIR}/imgui-submodule/imgui" ${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) set(IMGUI_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/imgui-submodule/imgui/imgui.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/imgui-submodule/imgui/imgui_draw.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/imgui-submodule/imgui/imgui_demo.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/imgui-submodule/imgui/imgui_widgets.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/imgui-submodule/imgui/misc/cpp/imgui_stdlib.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/imgui-submodule/imgui/examples/imgui_impl_sdl.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/imgui-submodule/imgui/examples/imgui_impl_opengl3.cpp" ) aux_source_directory("src" SOURCES) add_compile_options(-Wall) add_executable(${PROJECT_NAME} ${SOURCES} ${IMGUI_SOURCES}) target_link_libraries(${PROJECT_NAME} m pthread ${EPOXY_LIBRARIES} ${SDL2_LIBRARIES} glm) install (TARGETS ${PROJECT_NAME} DESTINATION bin)