Merge pull request #8 from allemangD/fix-cmake-shader-dependency
fix cmake shader dependency issue
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
project(cosets)
|
||||
|
||||
add_custom_target(shaders ALL DEPENDS shader_output)
|
||||
add_custom_command(
|
||||
OUTPUT shader_output
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/src/shaders ${CMAKE_CURRENT_BINARY_DIR}/shaders
|
||||
COMMENT "copying shaders"
|
||||
)
|
||||
|
||||
add_executable(${PROJECT_NAME}
|
||||
src/main.cpp)
|
||||
|
||||
add_dependencies(cosets shaders)
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
PRIVATE glad glm glfw)
|
||||
|
||||
add_custom_command(
|
||||
TARGET ${PROJECT_NAME} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/shaders
|
||||
${CMAKE_CURRENT_BINARY_DIR}/shaders
|
||||
)
|
||||
|
||||
add_executable(coxeter src/coxeter.cpp)
|
||||
|
||||
add_executable(mirror src/mirrors.cpp)
|
||||
|
||||
Reference in New Issue
Block a user