mirror of
				https://github.com/NVIDIA/cuda-samples.git
				synced 2025-11-04 15:47:50 +08:00 
			
		
		
		
	Merge pull request #14 from XSShawnZeng/Tegra_Samples_Cmake_Transition
Update CMakeList.txt for simpleCUFFT_callback and GLES samplesTegra samples cmake transition
This commit is contained in:
		
						commit
						9824a63101
					
				@ -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")
 | 
			
		||||
 | 
			
		||||
@ -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()
 | 
			
		||||
 | 
			
		||||
@ -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()
 | 
			
		||||
 | 
			
		||||
@ -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()
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user