Skip to content

Commit

Permalink
Minor CMake Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ptheywood committed Apr 19, 2022
1 parent c54ced5 commit 56c4122
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions cmake/common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ function(add_flamegpu_executable NAME SRC FLAMEGPU_ROOT PROJECT_ROOT IS_EXAMPLE)
# Apply common compiler settings
CommonCompilerSettings(TARGET "${NAME}")
# Set the cuda gencodes, potentially using the user-provided CUDA_ARCH
SetCUDAGencodes(TARGET "${PROJECT_NAME}")
SetCUDAGencodes(TARGET "${NAME}")

# Enable RDC for the target
set_property(TARGET ${NAME} PROPERTY CUDA_SEPARABLE_COMPILATION ON)
Expand All @@ -328,31 +328,31 @@ function(add_flamegpu_executable NAME SRC FLAMEGPU_ROOT PROJECT_ROOT IS_EXAMPLE)
# mark_as_advanced(FORCE SDL2_DIR)
# find_package(SDL2 REQUIRED)
# endif()
add_custom_command(TARGET "${PROJECT_NAME}" POST_BUILD # Adds a post-build event to MyTest
COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake - E copy_if_different..."
"${SDL2_RUNTIME_LIBRARIES}" # <--this is in-file
$<TARGET_FILE_DIR:${NAME}>) # <--this is out-file path
add_custom_command(TARGET "${NAME}" POST_BUILD # Adds a post-build event to MyTest
COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake - E copy_if_different..."
"${SDL2_RUNTIME_LIBRARIES}" # <--this is in-file
$<TARGET_FILE_DIR:${NAME}>) # <--this is out-file path
# glew
# if(NOT glew_FOUND)
# Force finding this is disabled, as the cmake vars should already be set.
# set(GLEW_DIR ${VISUALISATION_BUILD}/glew)
# mark_as_advanced(FORCE GLEW_DIR)
# find_package(GLEW REQUIRED)
# endif()
add_custom_command(TARGET "${PROJECT_NAME}" POST_BUILD # Adds a post-build event to MyTest
COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake - E copy_if_different..."
"${GLEW_RUNTIME_LIBRARIES}" # <--this is in-file
$<TARGET_FILE_DIR:${NAME}>) # <--this is out-file path
add_custom_command(TARGET "${NAME}" POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${GLEW_RUNTIME_LIBRARIES}"
$<TARGET_FILE_DIR:${NAME}>)
# DevIL
# if(NOT devil_FOUND)
# Force finding this is disabled, as the cmake vars should already be set.
# set(DEVIL_DIR ${VISUALISATION_BUILD}/devil)
# mark_as_advanced(FORCE DEVIL_DIR)
# find_package(DEVIL REQUIRED NO_MODULE)
# endif()
add_custom_command(TARGET "${PROJECT_NAME}" POST_BUILD # Adds a post-build event to MyTest
COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake - E copy_if_different..."
${IL_RUNTIME_LIBRARIES} # <--this is in-file
add_custom_command(TARGET "${NAME}" POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${IL_RUNTIME_LIBRARIES}
$<TARGET_FILE_DIR:${NAME}>)
endif()
# @todo - this could be inherrited instead?
Expand Down

0 comments on commit 56c4122

Please sign in to comment.