mirror of
https://github.com/NVIDIA/cuda-samples.git
synced 2025-04-25 01:01:23 +01:00
34 lines
809 B
CMake
34 lines
809 B
CMake
# Include directories and libraries
|
|
include_directories(
|
|
../../../Common
|
|
../../../Common/UtilNPP
|
|
)
|
|
|
|
# Source file
|
|
set(SRC_FILES
|
|
freeImageInteropNPP.cpp
|
|
)
|
|
|
|
find_package(FreeImage)
|
|
|
|
if(${FreeImage_FOUND})
|
|
# Add target for freeImageInteropNPP
|
|
add_executable(freeImageInteropNPP ${SRC_FILES})
|
|
set_target_properties(freeImageInteropNPP PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
|
|
|
|
target_include_directories(freeImageInteropNPP PRIVATE
|
|
${CUDAToolkit_INCLUDE_DIRS}
|
|
${FreeImage_INCLUDE_DIRS}
|
|
)
|
|
|
|
target_link_libraries(freeImageInteropNPP PRIVATE
|
|
CUDA::nppc
|
|
CUDA::nppisu
|
|
CUDA::nppif
|
|
CUDA::cudart
|
|
${FreeImage_LIBRARIES}
|
|
)
|
|
else()
|
|
message(STATUS "FreeImage not found - will not build sample 'freeImageInteropNPP'")
|
|
endif()
|