Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 31 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,19 +76,35 @@ configure_file(
)

set(
CudaCommon_EXPORT_CODE_BUILD
CudaCommon_VERSION_STRINGS
"
# Pass source dir to allow other modules, e.g. RTK, to use CudaImage.i.init and CudaImage.i.in
set(CudaCommon_SOURCE_DIR ${CudaCommon_SOURCE_DIR})

# Also pass CudaCommon version
# CudaCommon version numbers
set(CudaCommon_VERSION_MAJOR ${CudaCommon_VERSION_MAJOR})
set(CudaCommon_VERSION_MINOR ${CudaCommon_VERSION_MINOR})
set(CudaCommon_VERSION_PATCH ${CudaCommon_VERSION_PATCH})
set(CudaCommon_VERSION_STRING ${CudaCommon_VERSION_STRING})
"
)

set(
CudaCommon_EXPORT_CODE_BUILD
"
# Pass source dir to allow other modules, e.g. RTK, to use CudaImage.i.init and CudaImage.i.in
set(CudaCommon_SOURCE_DIR ${CudaCommon_SOURCE_DIR})

${CudaCommon_VERSION_STRINGS}
"
)

set(
CudaCommon_EXPORT_CODE_INSTALL
"
find_package(CUDAToolkit REQUIRED)

${CudaCommon_VERSION_STRINGS}
"
)

if(NOT ITK_SOURCE_DIR)
if(NOT EXISTS ${ITK_CMAKE_DIR}/ITKModuleMacros.cmake)
message(
Expand All @@ -108,3 +124,13 @@ install(
${_configuration_header_file}
DESTINATION ${CudaCommon_INSTALL_INCLUDE_DIR}
)

if(NOT ITK_SOURCE_DIR)
# Install the CMake targets export file so that find_package(ITK
# COMPONENTS CudaCommon) can find the CudaCommon imported targets.
install(
EXPORT ${${itk-module}-targets}
DESTINATION "${ITK_INSTALL_PACKAGE_DIR}/Modules/Targets"
COMPONENT Development
)
endif()
Loading