1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
| cmake_minimum_required(VERSION 2.7)
project(Blackhole)
findpackge(imgui REQUIRED) findpackge(glfw3 REQIURED) findpackge(GLEW REQUIRED) findpackge(glm REQUIRED)
file(GLOB SRC_FILES "${PROJECT_SOURCE_DIR}/src/*.h" "${PROJECT_SOURCE_DIR}/src/*.cpp" "${PROJECT_SOURCE_DIR}/src/*.c" "${PROJECT_SOURCE_DIR}/src/*.cc" )
add_executable(${CMAKE_PROJECT_NAME} ${SRC_FILES})
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE imgui::imgui) target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE glfw) target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE GLEW::GLEW) target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE glm)
target_compile_features(${CMAKE_PROJECT_NAME} PRIVATE cxx_std_17)
add_custom_command( TARGET ${CMAKE_PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory "${PROJECT_SOURCE_DIR}/assets" "$<TARGET_FILE_DIR:${CMAKE_PROJECT_NAME}>/assets" )
add_custom_command( TARGET ${CMAKE_PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory "${PROJECT_SOURCE_DIR}/shader" "$<TARGET_FILE_DIR:${CMAKE_PROJECT_NAME}>/shader" )
|