Update OpenGL sample build settings on Windows

This commit is contained in:
Rob Armstrong 2025-02-10 23:10:55 -08:00
parent 9582bb03a9
commit 7a9bd38ecc
22 changed files with 517 additions and 30 deletions

View File

@ -17,6 +17,12 @@ endif()
# Include directories and libraries # Include directories and libraries
include_directories(../../../Common) 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(OpenGL)
find_package(GLUT) find_package(GLUT)
@ -45,6 +51,22 @@ if(${OpenGL_FOUND})
${OPENGL_LIBRARIES} ${OPENGL_LIBRARIES}
${GLUT_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() endif()
else() else()
message(STATUS "GLUT not found - will not build sample 'simpleCUDA2GL'") message(STATUS "GLUT not found - will not build sample 'simpleCUDA2GL'")

View File

@ -17,6 +17,11 @@ endif()
# Include directories and libraries # Include directories and libraries
include_directories(../../../Common) 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(OpenGL)
find_package(GLUT) find_package(GLUT)
@ -50,6 +55,23 @@ target_compile_features(simpleTexture3D PRIVATE cxx_std_17 cuda_std_17)
${CMAKE_CURRENT_BINARY_DIR} ${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() else()
message(STATUS "GLUT not found - will not build sample 'simpleTexture3D'") message(STATUS "GLUT not found - will not build sample 'simpleTexture3D'")
endif() endif()

View File

@ -17,6 +17,10 @@ endif()
# Include directories and libraries # Include directories and libraries
include_directories(../../../Common) 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(OpenGL)
find_package(GLUT) find_package(GLUT)
@ -51,6 +55,23 @@ target_compile_features(FunctionPointers PRIVATE cxx_std_17 cuda_std_17)
${CMAKE_CURRENT_BINARY_DIR} ${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() else()
message(STATUS "GLUT not found - will not build sample 'FunctionPointers'") message(STATUS "GLUT not found - will not build sample 'FunctionPointers'")
endif() endif()

View File

@ -17,6 +17,11 @@ endif()
# Include directories and libraries # Include directories and libraries
include_directories(../../../Common) 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(OpenGL)
find_package(GLUT) find_package(GLUT)
@ -64,6 +69,23 @@ if(${OpenGL_FOUND})
${CMAKE_CURRENT_BINARY_DIR}/ ${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() else()
message(STATUS "GLUT not found - will not build sample 'boxFilter'") message(STATUS "GLUT not found - will not build sample 'boxFilter'")
endif() endif()

View File

@ -17,6 +17,12 @@ endif()
# Include directories and libraries # Include directories and libraries
include_directories(../../../Common) 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(OpenGL)
find_package(GLUT) find_package(GLUT)
@ -50,6 +56,23 @@ target_compile_features(imageDenoising PRIVATE cxx_std_17 cuda_std_17)
${CMAKE_CURRENT_BINARY_DIR}/data ${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() else()
message(STATUS "GLUT not found - will not build sample 'imageDenoising'") message(STATUS "GLUT not found - will not build sample 'imageDenoising'")
endif() endif()

View File

@ -17,6 +17,11 @@ endif()
# Include directories and libraries # Include directories and libraries
include_directories(../../../Common) 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(OpenGL)
find_package(GLUT) find_package(GLUT)
@ -50,6 +55,23 @@ target_compile_features(particles PRIVATE cxx_std_17 cuda_std_17)
${CMAKE_CURRENT_BINARY_DIR}/data ${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() else()
message(STATUS "GLUT not found - will not build sample 'particles'") message(STATUS "GLUT not found - will not build sample 'particles'")
endif() endif()

View File

@ -17,6 +17,11 @@ endif()
# Include directories and libraries # Include directories and libraries
include_directories(../../../Common) 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(OpenGL)
find_package(GLUT) find_package(GLUT)
@ -50,6 +55,23 @@ target_compile_features(bindlessTexture PRIVATE cxx_std_17 cuda_std_17)
${CMAKE_CURRENT_BINARY_DIR}/data ${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() else()
message(STATUS "GLUT not found - will not build sample 'bindlessTexture'") message(STATUS "GLUT not found - will not build sample 'bindlessTexture'")
endif() endif()

View File

@ -17,6 +17,12 @@ endif()
# Include directories and libraries # Include directories and libraries
include_directories(../../../Common) 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(OpenGL)
find_package(GLUT) find_package(GLUT)
@ -51,6 +57,24 @@ target_compile_features(oceanFFT PRIVATE cxx_std_17 cuda_std_17)
${CMAKE_CURRENT_BINARY_DIR}/data ${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() else()
message(STATUS "GLUT not found - will not build sample 'oceanFFT'") message(STATUS "GLUT not found - will not build sample 'oceanFFT'")
endif() endif()

View File

@ -17,6 +17,11 @@ endif()
# Include directories and libraries # Include directories and libraries
include_directories(../../../Common) 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(OpenGL)
find_package(GLUT) find_package(GLUT)
@ -52,6 +57,23 @@ target_compile_features(randomFog PRIVATE cxx_std_17 cuda_std_17)
${CMAKE_CURRENT_BINARY_DIR}/data ${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() else()
message(STATUS "GLUT not found - will not build sample 'randomFog'") message(STATUS "GLUT not found - will not build sample 'randomFog'")
endif() endif()

View File

@ -17,6 +17,11 @@ endif()
# Include directories and libraries # Include directories and libraries
include_directories(../../../Common) 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(OpenGL)
find_package(GLUT) find_package(GLUT)
@ -50,6 +55,23 @@ target_compile_features(Mandelbrot PRIVATE cxx_std_17 cuda_std_17)
${CMAKE_CURRENT_BINARY_DIR}/data ${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() else()
message(STATUS "GLUT not found - will not build sample 'Mandelbrot'") message(STATUS "GLUT not found - will not build sample 'Mandelbrot'")
endif() endif()

View File

@ -17,6 +17,11 @@ endif()
# Include directories and libraries # Include directories and libraries
include_directories(../../../Common) 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(OpenGL)
find_package(GLUT) find_package(GLUT)
@ -49,6 +54,23 @@ target_compile_features(SobelFilter PRIVATE cxx_std_17 cuda_std_17)
${CMAKE_CURRENT_BINARY_DIR}/data ${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() else()
message(STATUS "GLUT not found - will not build sample 'SobelFilter'") message(STATUS "GLUT not found - will not build sample 'SobelFilter'")
endif() endif()

View File

@ -17,6 +17,11 @@ endif()
# Include directories and libraries # Include directories and libraries
include_directories(../../../Common) 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(OpenGL)
find_package(GLUT) find_package(GLUT)
@ -50,6 +55,23 @@ target_compile_features(bicubicTexture PRIVATE cxx_std_17 cuda_std_17)
${CMAKE_CURRENT_BINARY_DIR}/data ${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() else()
message(STATUS "GLUT not found - will not build sample 'bicubicTexture'") message(STATUS "GLUT not found - will not build sample 'bicubicTexture'")
endif() endif()

View File

@ -17,6 +17,11 @@ endif()
# Include directories and libraries # Include directories and libraries
include_directories(../../../Common) 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(OpenGL)
find_package(GLUT) find_package(GLUT)
@ -50,6 +55,24 @@ target_compile_features(bilateralFilter PRIVATE cxx_std_17 cuda_std_17)
${CMAKE_CURRENT_BINARY_DIR}/data ${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() else()
message(STATUS "GLUT not found - will not build sample 'bilateralFilter'") message(STATUS "GLUT not found - will not build sample 'bilateralFilter'")
endif() endif()

View File

@ -17,6 +17,11 @@ endif()
# Include directories and libraries # Include directories and libraries
include_directories(../../../Common) 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(OpenGL)
find_package(GLUT) find_package(GLUT)
@ -51,6 +56,23 @@ target_compile_features(fluidsGL PRIVATE cxx_std_17 cuda_std_17)
${CMAKE_CURRENT_BINARY_DIR}/data ${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() else()
message(STATUS "GLUT not found - will not build sample 'fluidsGL'") message(STATUS "GLUT not found - will not build sample 'fluidsGL'")
endif() endif()

View File

@ -17,6 +17,11 @@ endif()
# Include directories and libraries # Include directories and libraries
include_directories(../../../Common) 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(OpenGL)
find_package(GLUT) find_package(GLUT)
@ -50,6 +55,23 @@ target_compile_features(marchingCubes PRIVATE cxx_std_17 cuda_std_17)
${CMAKE_CURRENT_BINARY_DIR}/data ${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() else()
message(STATUS "GLUT not found - will not build sample 'marchingCubes'") message(STATUS "GLUT not found - will not build sample 'marchingCubes'")
endif() endif()

View File

@ -17,6 +17,11 @@ endif()
# Include directories and libraries # Include directories and libraries
include_directories(../../../Common) 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(OpenGL)
find_package(GLUT) find_package(GLUT)
@ -43,6 +48,23 @@ target_compile_features(nbody PRIVATE cxx_std_17 cuda_std_17)
${GLUT_LIBRARIES} ${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() else()
message(STATUS "GLUT not found - will not build sample 'nbody'") message(STATUS "GLUT not found - will not build sample 'nbody'")
endif() endif()

View File

@ -17,6 +17,11 @@ endif()
# Include directories and libraries # Include directories and libraries
include_directories(../../../Common) 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(OpenGL)
find_package(GLUT) find_package(GLUT)
@ -49,6 +54,23 @@ target_compile_features(postProcessGL PRIVATE cxx_std_17 cuda_std_17)
${CMAKE_CURRENT_BINARY_DIR}/data ${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() else()
message(STATUS "GLUT not found - will not build sample 'postProcessGL'") message(STATUS "GLUT not found - will not build sample 'postProcessGL'")
endif() endif()

View File

@ -17,6 +17,11 @@ endif()
# Include directories and libraries # Include directories and libraries
include_directories(../../../Common) 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(OpenGL)
find_package(GLUT) find_package(GLUT)
@ -49,6 +54,23 @@ target_compile_features(recursiveGaussian PRIVATE cxx_std_17 cuda_std_17)
${CMAKE_CURRENT_BINARY_DIR}/data ${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() else()
message(STATUS "GLUT not found - will not build sample 'recursiveGaussian'") message(STATUS "GLUT not found - will not build sample 'recursiveGaussian'")
endif() endif()

View File

@ -17,6 +17,11 @@ endif()
# Include directories and libraries # Include directories and libraries
include_directories(../../../Common) 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(OpenGL)
find_package(GLUT) find_package(GLUT)
@ -43,6 +48,23 @@ target_compile_features(simpleGL PRIVATE cxx_std_17 cuda_std_17)
${GLUT_LIBRARIES} ${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 add_custom_command(TARGET simpleGL POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_CURRENT_SOURCE_DIR}/data ${CMAKE_CURRENT_SOURCE_DIR}/data

View File

@ -17,6 +17,11 @@ endif()
# Include directories and libraries # Include directories and libraries
include_directories(../../../Common) 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(OpenGL)
find_package(GLUT) find_package(GLUT)
@ -49,6 +54,23 @@ target_compile_features(smokeParticles PRIVATE cxx_std_17 cuda_std_17)
${CMAKE_CURRENT_BINARY_DIR}/data ${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() else()
message(STATUS "GLUT not found - will not build sample 'smokeParticles'") message(STATUS "GLUT not found - will not build sample 'smokeParticles'")
endif() endif()

View File

@ -17,6 +17,11 @@ endif()
# Include directories and libraries # Include directories and libraries
include_directories(../../../Common) 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(OpenGL)
find_package(GLUT) find_package(GLUT)
@ -49,6 +54,23 @@ target_compile_features(volumeFiltering PRIVATE cxx_std_17 cuda_std_17)
${CMAKE_CURRENT_BINARY_DIR}/data ${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() else()
message(STATUS "GLUT not found - will not build sample 'volumeFiltering'") message(STATUS "GLUT not found - will not build sample 'volumeFiltering'")
endif() endif()

View File

@ -17,6 +17,11 @@ endif()
# Include directories and libraries # Include directories and libraries
include_directories(../../../Common) 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(OpenGL)
find_package(GLUT) find_package(GLUT)
@ -49,6 +54,23 @@ target_compile_features(volumeRender PRIVATE cxx_std_17 cuda_std_17)
${CMAKE_CURRENT_BINARY_DIR}/data ${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() else()
message(STATUS "GLUT not found - will not build sample 'volumeRender'") message(STATUS "GLUT not found - will not build sample 'volumeRender'")
endif() endif()