From a80688012e5de0ebb9672a49e0e552a53cd3637f Mon Sep 17 00:00:00 2001 From: shawnz Date: Fri, 24 Jan 2025 15:44:19 +0800 Subject: [PATCH] Update CMakeList.txt for simpleCUFFT_callback and GLES samples --- .../4_CUDA_Libraries/simpleCUFFT_callback/CMakeLists.txt | 3 ++- .../8_Platform_Specific/Tegra/fluidsGLES/CMakeLists.txt | 8 ++++++++ .../8_Platform_Specific/Tegra/simpleGLES/CMakeLists.txt | 9 +++++++++ .../Tegra/simpleGLES_EGLOutput/CMakeLists.txt | 8 ++++++++ 4 files changed, 27 insertions(+), 1 deletion(-) diff --git a/Samples/4_CUDA_Libraries/simpleCUFFT_callback/CMakeLists.txt b/Samples/4_CUDA_Libraries/simpleCUFFT_callback/CMakeLists.txt index 73d9787b..d6a5e5ac 100644 --- a/Samples/4_CUDA_Libraries/simpleCUFFT_callback/CMakeLists.txt +++ b/Samples/4_CUDA_Libraries/simpleCUFFT_callback/CMakeLists.txt @@ -28,7 +28,8 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") set_target_properties(simpleCUFFT_callback PROPERTIES CUDA_SEPARABLE_COMPILATION ON) target_link_libraries(simpleCUFFT_callback PRIVATE - CUDA::cufft + CUDA::cufft_static + culibos ) else() message(STATUS "Will not build sample simpleCUFFT_callback - requires Linux OS") diff --git a/Samples/8_Platform_Specific/Tegra/fluidsGLES/CMakeLists.txt b/Samples/8_Platform_Specific/Tegra/fluidsGLES/CMakeLists.txt index 089b5272..bc60543e 100644 --- a/Samples/8_Platform_Specific/Tegra/fluidsGLES/CMakeLists.txt +++ b/Samples/8_Platform_Specific/Tegra/fluidsGLES/CMakeLists.txt @@ -47,6 +47,14 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") ${X11_LIBRARIES} ${OPENGL_LIBRARIES} ) + + # Copy the .glsl files to the output directory + add_custom_command(TARGET fluidsGLES POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${CMAKE_CURRENT_SOURCE_DIR}/mesh.frag.glsl + ${CMAKE_CURRENT_SOURCE_DIR}/mesh.vert.glsl + ${CMAKE_CURRENT_BINARY_DIR} + ) else() message(STATUS "X11 libraries not found - will not build sample 'fluidsGLES'") endif() diff --git a/Samples/8_Platform_Specific/Tegra/simpleGLES/CMakeLists.txt b/Samples/8_Platform_Specific/Tegra/simpleGLES/CMakeLists.txt index 181d2161..c50e62d7 100644 --- a/Samples/8_Platform_Specific/Tegra/simpleGLES/CMakeLists.txt +++ b/Samples/8_Platform_Specific/Tegra/simpleGLES/CMakeLists.txt @@ -45,6 +45,15 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") ${X11_LIBRARIES} ${OPENGL_LIBRARIES} ) + + # Copy the .glsl files to the output directory + add_custom_command(TARGET simpleGLES POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${CMAKE_CURRENT_SOURCE_DIR}/mesh.frag.glsl + ${CMAKE_CURRENT_SOURCE_DIR}/mesh.vert.glsl + ${CMAKE_CURRENT_BINARY_DIR} + ) + else() message(STATUS "X11 libraries not found - will not build sample 'simpleGLES'") endif() diff --git a/Samples/8_Platform_Specific/Tegra/simpleGLES_EGLOutput/CMakeLists.txt b/Samples/8_Platform_Specific/Tegra/simpleGLES_EGLOutput/CMakeLists.txt index d6c7e062..eb43fc4e 100644 --- a/Samples/8_Platform_Specific/Tegra/simpleGLES_EGLOutput/CMakeLists.txt +++ b/Samples/8_Platform_Specific/Tegra/simpleGLES_EGLOutput/CMakeLists.txt @@ -52,6 +52,14 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") ${OPENGL_LIBRARIES} ${DRM_LIB} ) + + # Copy the .glsl files to the output directory + add_custom_command(TARGET simpleGLES_EGLOutput POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${CMAKE_CURRENT_SOURCE_DIR}/mesh.frag.glsl + ${CMAKE_CURRENT_SOURCE_DIR}/mesh.vert.glsl + ${CMAKE_CURRENT_BINARY_DIR} + ) else() message(STATUS "X11 libraries not found - will not build sample 'simpleGLES_EGLOutput'") endif()