Enhancement for finding GLFW on WIN and copy .dll files to executable dir for some samples

This commit is contained in:
shawnz
2025-02-14 22:37:51 +08:00
parent 14b8ceb56f
commit fb6fcb0110
29 changed files with 244 additions and 72 deletions

View File

@@ -49,9 +49,17 @@ target_compile_features(cannyEdgeDetectorNPP PRIVATE cxx_std_17 cuda_std_17)
# Copy data files to output directory
add_custom_command(TARGET cannyEdgeDetectorNPP POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${CMAKE_CURRENT_SOURCE_DIR}/*.pgm
${CMAKE_CURRENT_SOURCE_DIR}/teapot512.pgm
${CMAKE_CURRENT_BINARY_DIR}
)
if(WIN32)
add_custom_command(TARGET cannyEdgeDetectorNPP
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
${FreeImage_LIBRARY}/../FreeImage.dll
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>
)
endif()
else()
message(STATUS "FreeImage not found - will not build sample 'cannyEdgeDetectorNPP'")
endif()