File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Samples/4_CUDA_Libraries/randomFog Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,16 @@ endif()
1919# Include directories and libraries
2020include_directories (../../../Common )
2121
22+ # Check for Debian13 or later
23+ if (CMAKE_SYSTEM_NAME STREQUAL "Linux" )
24+ file (READ "/etc/os-release" OS_RELEASE_CONTENTS )
25+ if (OS_RELEASE_CONTENTS MATCHES "ID=[^ ]*debian[^ ]*" AND
26+ OS_RELEASE_CONTENTS MATCHES "VERSION_ID=\" (1[3-9]|[2-9][0-9])\" " )
27+ message (STATUS "Debian 13 or later detected" )
28+ set (DEBIAN TRUE )
29+ endif ()
30+ endif ()
31+
2232if (WIN32 )
2333 set (PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR} /../../../Common" )
2434 set (PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR} /../../../Common/lib/x64" )
@@ -57,6 +67,15 @@ if(${OpenGL_FOUND})
5767 CUDA::curand
5868 CUDA::cudart
5969 )
70+ # Need to add X11 and other libraries for Debian13 or later explicitly
71+ if (DEBIAN)
72+ target_link_libraries (randomFog
73+ X11
74+ Xi
75+ Xxf86vm
76+ Xext
77+ )
78+ endif ()
6079
6180 # Copy data files to the output directory
6281 add_custom_command (TARGET randomFog POST_BUILD
You can’t perform that action at this time.
0 commit comments