mirror of
				https://github.com/NVIDIA/cuda-samples.git
				synced 2025-11-04 15:47:50 +08:00 
			
		
		
		
	Update OpenGL sample build settings on Windows
This commit is contained in:
		
							parent
							
								
									9582bb03a9
								
							
						
					
					
						commit
						7a9bd38ecc
					
				@ -17,6 +17,12 @@ endif()
 | 
			
		||||
# Include directories and libraries
 | 
			
		||||
include_directories(../../../Common)
 | 
			
		||||
 | 
			
		||||
if(WIN32)
 | 
			
		||||
    set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common")
 | 
			
		||||
    set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64")
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
find_package(OpenGL)
 | 
			
		||||
find_package(GLUT)
 | 
			
		||||
 | 
			
		||||
@ -41,10 +47,26 @@ if(${OpenGL_FOUND})
 | 
			
		||||
                ${GLUT_INCLUDE_DIRS}
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
        target_link_libraries(simpleCUDA2GL
 | 
			
		||||
            ${OPENGL_LIBRARIES}
 | 
			
		||||
            ${GLUT_LIBRARIES}
 | 
			
		||||
        )
 | 
			
		||||
            target_link_libraries(simpleCUDA2GL
 | 
			
		||||
                ${OPENGL_LIBRARIES}
 | 
			
		||||
                ${GLUT_LIBRARIES}
 | 
			
		||||
            )
 | 
			
		||||
            if(WIN32)
 | 
			
		||||
                target_link_libraries(simpleCUDA2GL
 | 
			
		||||
                    ${PC_GLUT_LIBRARY_DIRS}/freeglut.lib
 | 
			
		||||
                    ${PC_GLUT_LIBRARY_DIRS}/glew64.lib
 | 
			
		||||
                )
 | 
			
		||||
 | 
			
		||||
                add_custom_command(TARGET simpleCUDA2GL
 | 
			
		||||
                    POST_BUILD
 | 
			
		||||
                    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/freeglut.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
                )
 | 
			
		||||
 | 
			
		||||
                add_custom_command(TARGET simpleCUDA2GL
 | 
			
		||||
                    POST_BUILD
 | 
			
		||||
                    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/glew64.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
                )
 | 
			
		||||
            endif()
 | 
			
		||||
        endif()
 | 
			
		||||
    else()
 | 
			
		||||
        message(STATUS "GLUT not found - will not build sample 'simpleCUDA2GL'")
 | 
			
		||||
 | 
			
		||||
@ -17,6 +17,11 @@ endif()
 | 
			
		||||
# Include directories and libraries
 | 
			
		||||
include_directories(../../../Common)
 | 
			
		||||
 | 
			
		||||
if(WIN32)
 | 
			
		||||
    set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common")
 | 
			
		||||
    set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64")
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
find_package(OpenGL)
 | 
			
		||||
find_package(GLUT)
 | 
			
		||||
 | 
			
		||||
@ -26,9 +31,9 @@ if(${OpenGL_FOUND})
 | 
			
		||||
        # Add target for simpleTexture3D
 | 
			
		||||
        add_executable(simpleTexture3D simpleTexture3D_kernel.cu simpleTexture3D.cpp)
 | 
			
		||||
 | 
			
		||||
target_compile_options(simpleTexture3D PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--extended-lambda>)
 | 
			
		||||
        target_compile_options(simpleTexture3D PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--extended-lambda>)
 | 
			
		||||
 | 
			
		||||
target_compile_features(simpleTexture3D PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
        target_compile_features(simpleTexture3D PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
 | 
			
		||||
        set_target_properties(simpleTexture3D PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
 | 
			
		||||
 | 
			
		||||
@ -50,6 +55,23 @@ target_compile_features(simpleTexture3D PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
            ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
         if(WIN32)
 | 
			
		||||
            target_link_libraries(simpleTexture3D
 | 
			
		||||
                ${PC_GLUT_LIBRARY_DIRS}/freeglut.lib
 | 
			
		||||
                ${PC_GLUT_LIBRARY_DIRS}/glew64.lib
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            add_custom_command(TARGET simpleTexture3D
 | 
			
		||||
                POST_BUILD
 | 
			
		||||
                COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/freeglut.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            add_custom_command(TARGET simpleTexture3D
 | 
			
		||||
                POST_BUILD
 | 
			
		||||
                COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/glew64.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
            )
 | 
			
		||||
        endif()
 | 
			
		||||
 | 
			
		||||
    else()
 | 
			
		||||
        message(STATUS "GLUT not found - will not build sample 'simpleTexture3D'")
 | 
			
		||||
    endif()
 | 
			
		||||
 | 
			
		||||
@ -17,6 +17,10 @@ endif()
 | 
			
		||||
# Include directories and libraries
 | 
			
		||||
include_directories(../../../Common)
 | 
			
		||||
 | 
			
		||||
if(WIN32)
 | 
			
		||||
    set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common")
 | 
			
		||||
    set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64")
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
find_package(OpenGL)
 | 
			
		||||
find_package(GLUT)
 | 
			
		||||
@ -27,9 +31,9 @@ if(${OpenGL_FOUND})
 | 
			
		||||
        # Add target for FunctionPointers
 | 
			
		||||
        add_executable(FunctionPointers FunctionPointers.cpp FunctionPointers_kernels.cu)
 | 
			
		||||
 | 
			
		||||
target_compile_options(FunctionPointers PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--extended-lambda>)
 | 
			
		||||
        target_compile_options(FunctionPointers PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--extended-lambda>)
 | 
			
		||||
 | 
			
		||||
target_compile_features(FunctionPointers PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
        target_compile_features(FunctionPointers PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
 | 
			
		||||
        set_target_properties(FunctionPointers PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
 | 
			
		||||
 | 
			
		||||
@ -51,6 +55,23 @@ target_compile_features(FunctionPointers PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
            ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
        if(WIN32)
 | 
			
		||||
            target_link_libraries(FunctionPointers
 | 
			
		||||
                ${PC_GLUT_LIBRARY_DIRS}/freeglut.lib
 | 
			
		||||
                ${PC_GLUT_LIBRARY_DIRS}/glew64.lib
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            add_custom_command(TARGET FunctionPointers
 | 
			
		||||
                POST_BUILD
 | 
			
		||||
                COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/freeglut.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            add_custom_command(TARGET FunctionPointers
 | 
			
		||||
                POST_BUILD
 | 
			
		||||
                COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/glew64.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
            )
 | 
			
		||||
        endif()
 | 
			
		||||
 | 
			
		||||
    else()
 | 
			
		||||
        message(STATUS "GLUT not found - will not build sample 'FunctionPointers'")
 | 
			
		||||
    endif()
 | 
			
		||||
 | 
			
		||||
@ -17,6 +17,11 @@ endif()
 | 
			
		||||
# Include directories and libraries
 | 
			
		||||
include_directories(../../../Common)
 | 
			
		||||
 | 
			
		||||
if(WIN32)
 | 
			
		||||
    set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common")
 | 
			
		||||
    set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64")
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
find_package(OpenGL)
 | 
			
		||||
find_package(GLUT)
 | 
			
		||||
 | 
			
		||||
@ -64,6 +69,23 @@ if(${OpenGL_FOUND})
 | 
			
		||||
            ${CMAKE_CURRENT_BINARY_DIR}/
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
        if(WIN32)
 | 
			
		||||
            target_link_libraries(boxFilter
 | 
			
		||||
                ${PC_GLUT_LIBRARY_DIRS}/freeglut.lib
 | 
			
		||||
                ${PC_GLUT_LIBRARY_DIRS}/glew64.lib
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            add_custom_command(TARGET boxFilter
 | 
			
		||||
                POST_BUILD
 | 
			
		||||
                COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/freeglut.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            add_custom_command(TARGET boxFilter
 | 
			
		||||
                POST_BUILD
 | 
			
		||||
                COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/glew64.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
            )
 | 
			
		||||
        endif()
 | 
			
		||||
 | 
			
		||||
    else()
 | 
			
		||||
        message(STATUS "GLUT not found - will not build sample 'boxFilter'")
 | 
			
		||||
    endif()
 | 
			
		||||
 | 
			
		||||
@ -17,6 +17,12 @@ endif()
 | 
			
		||||
# Include directories and libraries
 | 
			
		||||
include_directories(../../../Common)
 | 
			
		||||
 | 
			
		||||
if(WIN32)
 | 
			
		||||
    set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common")
 | 
			
		||||
    set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64")
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
find_package(OpenGL)
 | 
			
		||||
find_package(GLUT)
 | 
			
		||||
 | 
			
		||||
@ -26,9 +32,9 @@ if(${OpenGL_FOUND})
 | 
			
		||||
        # Add target for imageDenoising
 | 
			
		||||
        add_executable(imageDenoising bmploader.cpp imageDenoising.cu imageDenoisingGL.cpp)
 | 
			
		||||
 | 
			
		||||
target_compile_options(imageDenoising PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--extended-lambda>)
 | 
			
		||||
        target_compile_options(imageDenoising PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--extended-lambda>)
 | 
			
		||||
 | 
			
		||||
target_compile_features(imageDenoising PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
        target_compile_features(imageDenoising PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
 | 
			
		||||
        set_target_properties(imageDenoising PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
 | 
			
		||||
 | 
			
		||||
@ -50,6 +56,23 @@ target_compile_features(imageDenoising PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
            ${CMAKE_CURRENT_BINARY_DIR}/data
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
        if(WIN32)
 | 
			
		||||
            target_link_libraries(imageDenoising
 | 
			
		||||
                ${PC_GLUT_LIBRARY_DIRS}/freeglut.lib
 | 
			
		||||
                ${PC_GLUT_LIBRARY_DIRS}/glew64.lib
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            add_custom_command(TARGET imageDenoising
 | 
			
		||||
                POST_BUILD
 | 
			
		||||
                COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/freeglut.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            add_custom_command(TARGET imageDenoising
 | 
			
		||||
                POST_BUILD
 | 
			
		||||
                COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/glew64.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
            )
 | 
			
		||||
        endif()
 | 
			
		||||
 | 
			
		||||
    else()
 | 
			
		||||
        message(STATUS "GLUT not found - will not build sample 'imageDenoising'")
 | 
			
		||||
    endif()
 | 
			
		||||
 | 
			
		||||
@ -17,6 +17,11 @@ endif()
 | 
			
		||||
# Include directories and libraries
 | 
			
		||||
include_directories(../../../Common)
 | 
			
		||||
 | 
			
		||||
if(WIN32)
 | 
			
		||||
    set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common")
 | 
			
		||||
    set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64")
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
find_package(OpenGL)
 | 
			
		||||
find_package(GLUT)
 | 
			
		||||
 | 
			
		||||
@ -50,6 +55,23 @@ target_compile_features(particles PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
            ${CMAKE_CURRENT_BINARY_DIR}/data
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
        if(WIN32)
 | 
			
		||||
            target_link_libraries(particles
 | 
			
		||||
                ${PC_GLUT_LIBRARY_DIRS}/freeglut.lib
 | 
			
		||||
                ${PC_GLUT_LIBRARY_DIRS}/glew64.lib
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            add_custom_command(TARGET particles
 | 
			
		||||
                POST_BUILD
 | 
			
		||||
                COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/freeglut.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            add_custom_command(TARGET particles
 | 
			
		||||
                POST_BUILD
 | 
			
		||||
                COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/glew64.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
            )
 | 
			
		||||
        endif()
 | 
			
		||||
 | 
			
		||||
    else()
 | 
			
		||||
        message(STATUS "GLUT not found - will not build sample 'particles'")
 | 
			
		||||
    endif()
 | 
			
		||||
 | 
			
		||||
@ -17,6 +17,11 @@ endif()
 | 
			
		||||
# Include directories and libraries
 | 
			
		||||
include_directories(../../../Common)
 | 
			
		||||
 | 
			
		||||
if(WIN32)
 | 
			
		||||
    set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common")
 | 
			
		||||
    set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64")
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
find_package(OpenGL)
 | 
			
		||||
find_package(GLUT)
 | 
			
		||||
 | 
			
		||||
@ -50,6 +55,23 @@ target_compile_features(bindlessTexture PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
            ${CMAKE_CURRENT_BINARY_DIR}/data
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
        if(WIN32)
 | 
			
		||||
            target_link_libraries(bindlessTexture
 | 
			
		||||
                ${PC_GLUT_LIBRARY_DIRS}/freeglut.lib
 | 
			
		||||
                ${PC_GLUT_LIBRARY_DIRS}/glew64.lib
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            add_custom_command(TARGET bindlessTexture
 | 
			
		||||
                POST_BUILD
 | 
			
		||||
                COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/freeglut.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            add_custom_command(TARGET bindlessTexture
 | 
			
		||||
                POST_BUILD
 | 
			
		||||
                COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/glew64.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
            )
 | 
			
		||||
        endif()
 | 
			
		||||
 | 
			
		||||
    else()
 | 
			
		||||
        message(STATUS "GLUT not found - will not build sample 'bindlessTexture'")
 | 
			
		||||
    endif()
 | 
			
		||||
 | 
			
		||||
@ -17,6 +17,12 @@ endif()
 | 
			
		||||
# Include directories and libraries
 | 
			
		||||
include_directories(../../../Common)
 | 
			
		||||
 | 
			
		||||
if(WIN32)
 | 
			
		||||
    set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common")
 | 
			
		||||
    set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64")
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
find_package(OpenGL)
 | 
			
		||||
find_package(GLUT)
 | 
			
		||||
 | 
			
		||||
@ -51,6 +57,24 @@ target_compile_features(oceanFFT PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
            ${CMAKE_CURRENT_BINARY_DIR}/data
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
        if(WIN32)
 | 
			
		||||
            target_link_libraries(oceanFFT
 | 
			
		||||
                ${PC_GLUT_LIBRARY_DIRS}/freeglut.lib
 | 
			
		||||
                ${PC_GLUT_LIBRARY_DIRS}/glew64.lib
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            add_custom_command(TARGET oceanFFT
 | 
			
		||||
                POST_BUILD
 | 
			
		||||
                COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/freeglut.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            add_custom_command(TARGET oceanFFT
 | 
			
		||||
                POST_BUILD
 | 
			
		||||
                COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/glew64.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
            )
 | 
			
		||||
        endif()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    else()
 | 
			
		||||
        message(STATUS "GLUT not found - will not build sample 'oceanFFT'")
 | 
			
		||||
    endif()
 | 
			
		||||
 | 
			
		||||
@ -17,6 +17,11 @@ endif()
 | 
			
		||||
# Include directories and libraries
 | 
			
		||||
include_directories(../../../Common)
 | 
			
		||||
 | 
			
		||||
if(WIN32)
 | 
			
		||||
    set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common")
 | 
			
		||||
    set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64")
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
find_package(OpenGL)
 | 
			
		||||
find_package(GLUT)
 | 
			
		||||
 | 
			
		||||
@ -26,9 +31,9 @@ if(${OpenGL_FOUND})
 | 
			
		||||
        # Add target for randomFog
 | 
			
		||||
        add_executable(randomFog randomFog.cpp rng.cpp)
 | 
			
		||||
 | 
			
		||||
target_compile_options(randomFog PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--extended-lambda>)
 | 
			
		||||
        target_compile_options(randomFog PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--extended-lambda>)
 | 
			
		||||
 | 
			
		||||
target_compile_features(randomFog PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
        target_compile_features(randomFog PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
 | 
			
		||||
        set_target_properties(randomFog PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
 | 
			
		||||
 | 
			
		||||
@ -52,6 +57,23 @@ target_compile_features(randomFog PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
            ${CMAKE_CURRENT_BINARY_DIR}/data
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
        if(WIN32)
 | 
			
		||||
            target_link_libraries(randomFog
 | 
			
		||||
                ${PC_GLUT_LIBRARY_DIRS}/freeglut.lib
 | 
			
		||||
                ${PC_GLUT_LIBRARY_DIRS}/glew64.lib
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            add_custom_command(TARGET randomFog
 | 
			
		||||
                POST_BUILD
 | 
			
		||||
                COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/freeglut.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            add_custom_command(TARGET randomFog
 | 
			
		||||
                POST_BUILD
 | 
			
		||||
                COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/glew64.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
            )
 | 
			
		||||
        endif()
 | 
			
		||||
 | 
			
		||||
    else()
 | 
			
		||||
        message(STATUS "GLUT not found - will not build sample 'randomFog'")
 | 
			
		||||
    endif()
 | 
			
		||||
 | 
			
		||||
@ -17,6 +17,11 @@ endif()
 | 
			
		||||
# Include directories and libraries
 | 
			
		||||
include_directories(../../../Common)
 | 
			
		||||
 | 
			
		||||
if(WIN32)
 | 
			
		||||
    set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common")
 | 
			
		||||
    set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64")
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
find_package(OpenGL)
 | 
			
		||||
find_package(GLUT)
 | 
			
		||||
 | 
			
		||||
@ -50,6 +55,23 @@ target_compile_features(Mandelbrot PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
            ${CMAKE_CURRENT_BINARY_DIR}/data
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
        if(WIN32)
 | 
			
		||||
            target_link_libraries(Mandelbrot
 | 
			
		||||
                ${PC_GLUT_LIBRARY_DIRS}/freeglut.lib
 | 
			
		||||
                ${PC_GLUT_LIBRARY_DIRS}/glew64.lib
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            add_custom_command(TARGET Mandelbrot
 | 
			
		||||
                POST_BUILD
 | 
			
		||||
                COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/freeglut.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            add_custom_command(TARGET Mandelbrot
 | 
			
		||||
                POST_BUILD
 | 
			
		||||
                COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/glew64.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
            )
 | 
			
		||||
        endif()
 | 
			
		||||
 | 
			
		||||
    else()
 | 
			
		||||
        message(STATUS "GLUT not found - will not build sample 'Mandelbrot'")
 | 
			
		||||
    endif()
 | 
			
		||||
 | 
			
		||||
@ -17,6 +17,11 @@ endif()
 | 
			
		||||
# Include directories and libraries
 | 
			
		||||
include_directories(../../../Common)
 | 
			
		||||
 | 
			
		||||
if(WIN32)
 | 
			
		||||
    set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common")
 | 
			
		||||
    set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64")
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
find_package(OpenGL)
 | 
			
		||||
find_package(GLUT)
 | 
			
		||||
 | 
			
		||||
@ -26,9 +31,9 @@ if(${OpenGL_FOUND})
 | 
			
		||||
        # Add target for SobelFilter
 | 
			
		||||
        add_executable(SobelFilter SobelFilter.cpp SobelFilter_kernels.cu)
 | 
			
		||||
 | 
			
		||||
target_compile_options(SobelFilter PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--extended-lambda>)
 | 
			
		||||
        target_compile_options(SobelFilter PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--extended-lambda>)
 | 
			
		||||
 | 
			
		||||
target_compile_features(SobelFilter PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
        target_compile_features(SobelFilter PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
 | 
			
		||||
        set_target_properties(SobelFilter PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
 | 
			
		||||
 | 
			
		||||
@ -49,6 +54,23 @@ target_compile_features(SobelFilter PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
            ${CMAKE_CURRENT_BINARY_DIR}/data
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
        if(WIN32)
 | 
			
		||||
            target_link_libraries(SobelFilter
 | 
			
		||||
                ${PC_GLUT_LIBRARY_DIRS}/freeglut.lib
 | 
			
		||||
                ${PC_GLUT_LIBRARY_DIRS}/glew64.lib
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            add_custom_command(TARGET SobelFilter
 | 
			
		||||
                POST_BUILD
 | 
			
		||||
                COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/freeglut.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            add_custom_command(TARGET SobelFilter
 | 
			
		||||
                POST_BUILD
 | 
			
		||||
                COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/glew64.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
            )
 | 
			
		||||
        endif()
 | 
			
		||||
 | 
			
		||||
    else()
 | 
			
		||||
        message(STATUS "GLUT not found - will not build sample 'SobelFilter'")
 | 
			
		||||
    endif()
 | 
			
		||||
 | 
			
		||||
@ -17,6 +17,11 @@ endif()
 | 
			
		||||
# Include directories and libraries
 | 
			
		||||
include_directories(../../../Common)
 | 
			
		||||
 | 
			
		||||
if(WIN32)
 | 
			
		||||
    set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common")
 | 
			
		||||
    set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64")
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
find_package(OpenGL)
 | 
			
		||||
find_package(GLUT)
 | 
			
		||||
 | 
			
		||||
@ -26,9 +31,9 @@ if(${OpenGL_FOUND})
 | 
			
		||||
        # Add target for bicubicTexture
 | 
			
		||||
        add_executable(bicubicTexture bicubicTexture.cpp bicubicTexture_cuda.cu)
 | 
			
		||||
 | 
			
		||||
target_compile_options(bicubicTexture PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--extended-lambda>)
 | 
			
		||||
        target_compile_options(bicubicTexture PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--extended-lambda>)
 | 
			
		||||
 | 
			
		||||
target_compile_features(bicubicTexture PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
        target_compile_features(bicubicTexture PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
 | 
			
		||||
        set_target_properties(bicubicTexture PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
 | 
			
		||||
 | 
			
		||||
@ -50,6 +55,23 @@ target_compile_features(bicubicTexture PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
            ${CMAKE_CURRENT_BINARY_DIR}/data
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
        if(WIN32)
 | 
			
		||||
            target_link_libraries(bicubicTexture
 | 
			
		||||
                ${PC_GLUT_LIBRARY_DIRS}/freeglut.lib
 | 
			
		||||
                ${PC_GLUT_LIBRARY_DIRS}/glew64.lib
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            add_custom_command(TARGET bicubicTexture
 | 
			
		||||
                POST_BUILD
 | 
			
		||||
                COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/freeglut.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            add_custom_command(TARGET bicubicTexture
 | 
			
		||||
                POST_BUILD
 | 
			
		||||
                COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/glew64.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
            )
 | 
			
		||||
        endif()
 | 
			
		||||
 | 
			
		||||
    else()
 | 
			
		||||
        message(STATUS "GLUT not found - will not build sample 'bicubicTexture'")
 | 
			
		||||
    endif()
 | 
			
		||||
 | 
			
		||||
@ -17,6 +17,11 @@ endif()
 | 
			
		||||
# Include directories and libraries
 | 
			
		||||
include_directories(../../../Common)
 | 
			
		||||
 | 
			
		||||
if(WIN32)
 | 
			
		||||
    set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common")
 | 
			
		||||
    set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64")
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
find_package(OpenGL)
 | 
			
		||||
find_package(GLUT)
 | 
			
		||||
 | 
			
		||||
@ -50,6 +55,24 @@ target_compile_features(bilateralFilter PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
            ${CMAKE_CURRENT_BINARY_DIR}/data
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
        if(WIN32)
 | 
			
		||||
            target_link_libraries(bilateralFilter
 | 
			
		||||
                ${PC_GLUT_LIBRARY_DIRS}/freeglut.lib
 | 
			
		||||
                ${PC_GLUT_LIBRARY_DIRS}/glew64.lib
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            add_custom_command(TARGET bilateralFilter
 | 
			
		||||
                POST_BUILD
 | 
			
		||||
                COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/freeglut.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            add_custom_command(TARGET bilateralFilter
 | 
			
		||||
                POST_BUILD
 | 
			
		||||
                COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/glew64.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
            )
 | 
			
		||||
        endif()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    else()
 | 
			
		||||
        message(STATUS "GLUT not found - will not build sample 'bilateralFilter'")
 | 
			
		||||
    endif()
 | 
			
		||||
 | 
			
		||||
@ -17,6 +17,11 @@ endif()
 | 
			
		||||
# Include directories and libraries
 | 
			
		||||
include_directories(../../../Common)
 | 
			
		||||
 | 
			
		||||
if(WIN32)
 | 
			
		||||
    set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common")
 | 
			
		||||
    set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64")
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
find_package(OpenGL)
 | 
			
		||||
find_package(GLUT)
 | 
			
		||||
 | 
			
		||||
@ -51,6 +56,23 @@ target_compile_features(fluidsGL PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
            ${CMAKE_CURRENT_BINARY_DIR}/data
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
        if(WIN32)
 | 
			
		||||
            target_link_libraries(fluidsGL
 | 
			
		||||
                ${PC_GLUT_LIBRARY_DIRS}/freeglut.lib
 | 
			
		||||
                ${PC_GLUT_LIBRARY_DIRS}/glew64.lib
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            add_custom_command(TARGET fluidsGL
 | 
			
		||||
                POST_BUILD
 | 
			
		||||
                COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/freeglut.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            add_custom_command(TARGET fluidsGL
 | 
			
		||||
                POST_BUILD
 | 
			
		||||
                COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/glew64.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
            )
 | 
			
		||||
        endif()
 | 
			
		||||
 | 
			
		||||
    else()
 | 
			
		||||
        message(STATUS "GLUT not found - will not build sample 'fluidsGL'")
 | 
			
		||||
    endif()
 | 
			
		||||
 | 
			
		||||
@ -17,6 +17,11 @@ endif()
 | 
			
		||||
# Include directories and libraries
 | 
			
		||||
include_directories(../../../Common)
 | 
			
		||||
 | 
			
		||||
if(WIN32)
 | 
			
		||||
    set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common")
 | 
			
		||||
    set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64")
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
find_package(OpenGL)
 | 
			
		||||
find_package(GLUT)
 | 
			
		||||
 | 
			
		||||
@ -50,6 +55,23 @@ target_compile_features(marchingCubes PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
            ${CMAKE_CURRENT_BINARY_DIR}/data
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
        if(WIN32)
 | 
			
		||||
            target_link_libraries(marchingCubes
 | 
			
		||||
                ${PC_GLUT_LIBRARY_DIRS}/freeglut.lib
 | 
			
		||||
                ${PC_GLUT_LIBRARY_DIRS}/glew64.lib
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            add_custom_command(TARGET marchingCubes
 | 
			
		||||
                POST_BUILD
 | 
			
		||||
                COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/freeglut.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            add_custom_command(TARGET marchingCubes
 | 
			
		||||
                POST_BUILD
 | 
			
		||||
                COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/glew64.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
            )
 | 
			
		||||
        endif()
 | 
			
		||||
 | 
			
		||||
    else()
 | 
			
		||||
        message(STATUS "GLUT not found - will not build sample 'marchingCubes'")
 | 
			
		||||
    endif()
 | 
			
		||||
 | 
			
		||||
@ -17,6 +17,11 @@ endif()
 | 
			
		||||
# Include directories and libraries
 | 
			
		||||
include_directories(../../../Common)
 | 
			
		||||
 | 
			
		||||
if(WIN32)
 | 
			
		||||
    set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common")
 | 
			
		||||
    set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64")
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
find_package(OpenGL)
 | 
			
		||||
find_package(GLUT)
 | 
			
		||||
 | 
			
		||||
@ -26,9 +31,9 @@ if(${OpenGL_FOUND})
 | 
			
		||||
        # Add target for nbody
 | 
			
		||||
        add_executable(nbody bodysystemcuda.cu render_particles.cpp nbody.cpp)
 | 
			
		||||
 | 
			
		||||
target_compile_options(nbody PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--extended-lambda>)
 | 
			
		||||
        target_compile_options(nbody PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--extended-lambda>)
 | 
			
		||||
 | 
			
		||||
target_compile_features(nbody PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
        target_compile_features(nbody PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
 | 
			
		||||
        set_target_properties(nbody PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
 | 
			
		||||
 | 
			
		||||
@ -43,6 +48,23 @@ target_compile_features(nbody PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
            ${GLUT_LIBRARIES}
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
        if(WIN32)
 | 
			
		||||
            target_link_libraries(nbody
 | 
			
		||||
                ${PC_GLUT_LIBRARY_DIRS}/freeglut.lib
 | 
			
		||||
                ${PC_GLUT_LIBRARY_DIRS}/glew64.lib
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            add_custom_command(TARGET nbody
 | 
			
		||||
                POST_BUILD
 | 
			
		||||
                COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/freeglut.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            add_custom_command(TARGET nbody
 | 
			
		||||
                POST_BUILD
 | 
			
		||||
                COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/glew64.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
            )
 | 
			
		||||
        endif()
 | 
			
		||||
 | 
			
		||||
    else()
 | 
			
		||||
        message(STATUS "GLUT not found - will not build sample 'nbody'")
 | 
			
		||||
    endif()
 | 
			
		||||
 | 
			
		||||
@ -17,6 +17,11 @@ endif()
 | 
			
		||||
# Include directories and libraries
 | 
			
		||||
include_directories(../../../Common)
 | 
			
		||||
 | 
			
		||||
if(WIN32)
 | 
			
		||||
    set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common")
 | 
			
		||||
    set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64")
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
find_package(OpenGL)
 | 
			
		||||
find_package(GLUT)
 | 
			
		||||
 | 
			
		||||
@ -26,9 +31,9 @@ if(${OpenGL_FOUND})
 | 
			
		||||
        # Add target for postProcessGL
 | 
			
		||||
        add_executable(postProcessGL main.cpp postProcessGL.cu)
 | 
			
		||||
 | 
			
		||||
target_compile_options(postProcessGL PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--extended-lambda>)
 | 
			
		||||
        target_compile_options(postProcessGL PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--extended-lambda>)
 | 
			
		||||
 | 
			
		||||
target_compile_features(postProcessGL PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
        target_compile_features(postProcessGL PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
 | 
			
		||||
        set_target_properties(postProcessGL PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
 | 
			
		||||
 | 
			
		||||
@ -49,6 +54,23 @@ target_compile_features(postProcessGL PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
            ${CMAKE_CURRENT_BINARY_DIR}/data
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
        if(WIN32)
 | 
			
		||||
            target_link_libraries(postProcessGL
 | 
			
		||||
                ${PC_GLUT_LIBRARY_DIRS}/freeglut.lib
 | 
			
		||||
                ${PC_GLUT_LIBRARY_DIRS}/glew64.lib
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            add_custom_command(TARGET postProcessGL
 | 
			
		||||
                POST_BUILD
 | 
			
		||||
                COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/freeglut.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            add_custom_command(TARGET postProcessGL
 | 
			
		||||
                POST_BUILD
 | 
			
		||||
                COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/glew64.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
            )
 | 
			
		||||
        endif()
 | 
			
		||||
 | 
			
		||||
    else()
 | 
			
		||||
        message(STATUS "GLUT not found - will not build sample 'postProcessGL'")
 | 
			
		||||
    endif()
 | 
			
		||||
 | 
			
		||||
@ -17,6 +17,11 @@ endif()
 | 
			
		||||
# Include directories and libraries
 | 
			
		||||
include_directories(../../../Common)
 | 
			
		||||
 | 
			
		||||
if(WIN32)
 | 
			
		||||
    set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common")
 | 
			
		||||
    set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64")
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
find_package(OpenGL)
 | 
			
		||||
find_package(GLUT)
 | 
			
		||||
 | 
			
		||||
@ -26,9 +31,9 @@ if(${OpenGL_FOUND})
 | 
			
		||||
        # Add target for recursiveGaussian
 | 
			
		||||
        add_executable(recursiveGaussian recursiveGaussian_cuda.cu recursiveGaussian.cpp)
 | 
			
		||||
 | 
			
		||||
target_compile_options(recursiveGaussian PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--extended-lambda>)
 | 
			
		||||
        target_compile_options(recursiveGaussian PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--extended-lambda>)
 | 
			
		||||
 | 
			
		||||
target_compile_features(recursiveGaussian PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
        target_compile_features(recursiveGaussian PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
 | 
			
		||||
        set_target_properties(recursiveGaussian PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
 | 
			
		||||
 | 
			
		||||
@ -49,6 +54,23 @@ target_compile_features(recursiveGaussian PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
            ${CMAKE_CURRENT_BINARY_DIR}/data
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
        if(WIN32)
 | 
			
		||||
            target_link_libraries(recursiveGaussian
 | 
			
		||||
                ${PC_GLUT_LIBRARY_DIRS}/freeglut.lib
 | 
			
		||||
                ${PC_GLUT_LIBRARY_DIRS}/glew64.lib
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            add_custom_command(TARGET recursiveGaussian
 | 
			
		||||
                POST_BUILD
 | 
			
		||||
                COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/freeglut.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            add_custom_command(TARGET recursiveGaussian
 | 
			
		||||
                POST_BUILD
 | 
			
		||||
                COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/glew64.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
            )
 | 
			
		||||
        endif()
 | 
			
		||||
 | 
			
		||||
    else()
 | 
			
		||||
        message(STATUS "GLUT not found - will not build sample 'recursiveGaussian'")
 | 
			
		||||
    endif()
 | 
			
		||||
 | 
			
		||||
@ -17,6 +17,11 @@ endif()
 | 
			
		||||
# Include directories and libraries
 | 
			
		||||
include_directories(../../../Common)
 | 
			
		||||
 | 
			
		||||
if(WIN32)
 | 
			
		||||
    set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common")
 | 
			
		||||
    set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64")
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
find_package(OpenGL)
 | 
			
		||||
find_package(GLUT)
 | 
			
		||||
 | 
			
		||||
@ -26,9 +31,9 @@ if(${OpenGL_FOUND})
 | 
			
		||||
        # Add target for simpleGL
 | 
			
		||||
        add_executable(simpleGL simpleGL.cu)
 | 
			
		||||
 | 
			
		||||
target_compile_options(simpleGL PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--extended-lambda>)
 | 
			
		||||
        target_compile_options(simpleGL PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--extended-lambda>)
 | 
			
		||||
 | 
			
		||||
target_compile_features(simpleGL PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
        target_compile_features(simpleGL PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
 | 
			
		||||
        set_target_properties(simpleGL PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
 | 
			
		||||
 | 
			
		||||
@ -43,6 +48,23 @@ target_compile_features(simpleGL PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
            ${GLUT_LIBRARIES}
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
        if(WIN32)
 | 
			
		||||
            target_link_libraries(simpleGL
 | 
			
		||||
                ${PC_GLUT_LIBRARY_DIRS}/freeglut.lib
 | 
			
		||||
                ${PC_GLUT_LIBRARY_DIRS}/glew64.lib
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            add_custom_command(TARGET simpleGL
 | 
			
		||||
                POST_BUILD
 | 
			
		||||
                COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/freeglut.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            add_custom_command(TARGET simpleGL
 | 
			
		||||
                POST_BUILD
 | 
			
		||||
                COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/glew64.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
            )
 | 
			
		||||
        endif()
 | 
			
		||||
 | 
			
		||||
        add_custom_command(TARGET simpleGL POST_BUILD
 | 
			
		||||
            COMMAND ${CMAKE_COMMAND} -E copy_directory
 | 
			
		||||
            ${CMAKE_CURRENT_SOURCE_DIR}/data
 | 
			
		||||
 | 
			
		||||
@ -17,6 +17,11 @@ endif()
 | 
			
		||||
# Include directories and libraries
 | 
			
		||||
include_directories(../../../Common)
 | 
			
		||||
 | 
			
		||||
if(WIN32)
 | 
			
		||||
    set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common")
 | 
			
		||||
    set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64")
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
find_package(OpenGL)
 | 
			
		||||
find_package(GLUT)
 | 
			
		||||
 | 
			
		||||
@ -26,9 +31,9 @@ if(${OpenGL_FOUND})
 | 
			
		||||
        # Add target for smokeParticles
 | 
			
		||||
        add_executable(smokeParticles GLSLProgram.cpp ParticleSystem.cpp ParticleSystem_cuda.cu SmokeRenderer.cpp SmokeShaders.cpp framebufferObject.cpp particleDemo.cpp renderbuffer.cpp)
 | 
			
		||||
 | 
			
		||||
target_compile_options(smokeParticles PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--extended-lambda>)
 | 
			
		||||
        target_compile_options(smokeParticles PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--extended-lambda>)
 | 
			
		||||
 | 
			
		||||
target_compile_features(smokeParticles PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
        target_compile_features(smokeParticles PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
 | 
			
		||||
        set_target_properties(smokeParticles PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
 | 
			
		||||
 | 
			
		||||
@ -49,6 +54,23 @@ target_compile_features(smokeParticles PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
            ${CMAKE_CURRENT_BINARY_DIR}/data
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
        if(WIN32)
 | 
			
		||||
            target_link_libraries(smokeParticles
 | 
			
		||||
                ${PC_GLUT_LIBRARY_DIRS}/freeglut.lib
 | 
			
		||||
                ${PC_GLUT_LIBRARY_DIRS}/glew64.lib
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            add_custom_command(TARGET smokeParticles
 | 
			
		||||
                POST_BUILD
 | 
			
		||||
                COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/freeglut.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            add_custom_command(TARGET smokeParticles
 | 
			
		||||
                POST_BUILD
 | 
			
		||||
                COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/glew64.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
            )
 | 
			
		||||
        endif()
 | 
			
		||||
 | 
			
		||||
    else()
 | 
			
		||||
        message(STATUS "GLUT not found - will not build sample 'smokeParticles'")
 | 
			
		||||
    endif()
 | 
			
		||||
 | 
			
		||||
@ -17,6 +17,11 @@ endif()
 | 
			
		||||
# Include directories and libraries
 | 
			
		||||
include_directories(../../../Common)
 | 
			
		||||
 | 
			
		||||
if(WIN32)
 | 
			
		||||
    set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common")
 | 
			
		||||
    set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64")
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
find_package(OpenGL)
 | 
			
		||||
find_package(GLUT)
 | 
			
		||||
 | 
			
		||||
@ -26,9 +31,9 @@ if(${OpenGL_FOUND})
 | 
			
		||||
        # Add target for volumeFiltering
 | 
			
		||||
        add_executable(volumeFiltering volume.cpp volumeFilter_kernel.cu volumeFiltering.cpp volumeRender_kernel.cu)
 | 
			
		||||
 | 
			
		||||
target_compile_options(volumeFiltering PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--extended-lambda>)
 | 
			
		||||
        target_compile_options(volumeFiltering PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--extended-lambda>)
 | 
			
		||||
 | 
			
		||||
target_compile_features(volumeFiltering PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
        target_compile_features(volumeFiltering PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
 | 
			
		||||
        set_target_properties(volumeFiltering PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
 | 
			
		||||
 | 
			
		||||
@ -49,6 +54,23 @@ target_compile_features(volumeFiltering PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
            ${CMAKE_CURRENT_BINARY_DIR}/data
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
        if(WIN32)
 | 
			
		||||
            target_link_libraries(volumeFiltering
 | 
			
		||||
                ${PC_GLUT_LIBRARY_DIRS}/freeglut.lib
 | 
			
		||||
                ${PC_GLUT_LIBRARY_DIRS}/glew64.lib
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            add_custom_command(TARGET volumeFiltering
 | 
			
		||||
                POST_BUILD
 | 
			
		||||
                COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/freeglut.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            add_custom_command(TARGET volumeFiltering
 | 
			
		||||
                POST_BUILD
 | 
			
		||||
                COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/glew64.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
            )
 | 
			
		||||
        endif()
 | 
			
		||||
 | 
			
		||||
    else()
 | 
			
		||||
        message(STATUS "GLUT not found - will not build sample 'volumeFiltering'")
 | 
			
		||||
    endif()
 | 
			
		||||
 | 
			
		||||
@ -17,6 +17,11 @@ endif()
 | 
			
		||||
# Include directories and libraries
 | 
			
		||||
include_directories(../../../Common)
 | 
			
		||||
 | 
			
		||||
if(WIN32)
 | 
			
		||||
    set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common")
 | 
			
		||||
    set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64")
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
find_package(OpenGL)
 | 
			
		||||
find_package(GLUT)
 | 
			
		||||
 | 
			
		||||
@ -26,9 +31,9 @@ if(${OpenGL_FOUND})
 | 
			
		||||
        # Add target for volumeRender
 | 
			
		||||
        add_executable(volumeRender volumeRender_kernel.cu volumeRender.cpp)
 | 
			
		||||
 | 
			
		||||
target_compile_options(volumeRender PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--extended-lambda>)
 | 
			
		||||
        target_compile_options(volumeRender PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--extended-lambda>)
 | 
			
		||||
 | 
			
		||||
target_compile_features(volumeRender PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
        target_compile_features(volumeRender PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
 | 
			
		||||
        set_target_properties(volumeRender PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
 | 
			
		||||
 | 
			
		||||
@ -49,6 +54,23 @@ target_compile_features(volumeRender PRIVATE cxx_std_17 cuda_std_17)
 | 
			
		||||
            ${CMAKE_CURRENT_BINARY_DIR}/data
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
        if(WIN32)
 | 
			
		||||
            target_link_libraries(volumeRender
 | 
			
		||||
                ${PC_GLUT_LIBRARY_DIRS}/freeglut.lib
 | 
			
		||||
                ${PC_GLUT_LIBRARY_DIRS}/glew64.lib
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            add_custom_command(TARGET volumeRender
 | 
			
		||||
                POST_BUILD
 | 
			
		||||
                COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/freeglut.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            add_custom_command(TARGET volumeRender
 | 
			
		||||
                POST_BUILD
 | 
			
		||||
                COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/glew64.dll ${CMAKE_CURRENT_BINARY_DIR}
 | 
			
		||||
            )
 | 
			
		||||
        endif()
 | 
			
		||||
 | 
			
		||||
    else()
 | 
			
		||||
        message(STATUS "GLUT not found - will not build sample 'volumeRender'")
 | 
			
		||||
    endif()
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user