mirror of
https://github.com/NVIDIA/cuda-samples.git
synced 2025-07-02 13:20:30 +08:00
Fix bicubicTexture CMakeLists.txt
This commit is contained in:
parent
223e658beb
commit
cd485da765
@ -6,40 +6,37 @@ find_package(GLUT)
|
|||||||
|
|
||||||
# Source file
|
# Source file
|
||||||
set(SRC_FILES
|
set(SRC_FILES
|
||||||
particleSystem.cpp
|
bicubicTexture.cpp
|
||||||
particleSystem_cuda.cu
|
bicubicTexture_cuda.cu
|
||||||
particles.cpp
|
|
||||||
render_particles.cpp
|
|
||||||
shaders.cpp
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if(${OpenGL_FOUND})
|
if(${OpenGL_FOUND})
|
||||||
if (${GLUT_FOUND})
|
if (${GLUT_FOUND})
|
||||||
# Add target for particles
|
# Add target for bicubicTexture
|
||||||
add_executable(particles ${SRC_FILES})
|
add_executable(bicubicTexture ${SRC_FILES})
|
||||||
set_target_properties(particles PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
|
set_target_properties(bicubicTexture PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
|
||||||
|
|
||||||
target_include_directories(particles PUBLIC
|
target_include_directories(bicubicTexture PUBLIC
|
||||||
${OPENGL_INCLUDE_DIR}
|
${OPENGL_INCLUDE_DIR}
|
||||||
${CUDAToolkit_INCLUDE_DIRS}
|
${CUDAToolkit_INCLUDE_DIRS}
|
||||||
${GLUT_INCLUDE_DIRS}
|
${GLUT_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(particles
|
target_link_libraries(bicubicTexture
|
||||||
${OPENGL_LIBRARIES}
|
${OPENGL_LIBRARIES}
|
||||||
${GLUT_LIBRARIES}
|
${GLUT_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
# Copy clock_kernel.cu to the output directory
|
# Copy clock_kernel.cu to the output directory
|
||||||
add_custom_command(TARGET particles POST_BUILD
|
add_custom_command(TARGET bicubicTexture POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_directory_if_different
|
COMMAND ${CMAKE_COMMAND} -E copy_directory_if_different
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/data
|
${CMAKE_CURRENT_SOURCE_DIR}/data
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/data
|
${CMAKE_CURRENT_BINARY_DIR}/data
|
||||||
)
|
)
|
||||||
|
|
||||||
else()
|
else()
|
||||||
message(STATUS "GLUT not found - will not build sample 'particles'")
|
message(STATUS "GLUT not found - will not build sample 'bicubicTexture'")
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
message(STATUS "OpenGL not found - will not build sample 'particles'")
|
message(STATUS "OpenGL not found - will not build sample 'bicubicTexture'")
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user