/usr/src/WrapITK/CMakeLists.txt is in libinsighttoolkit3-dev 3.20.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 | PROJECT(WrapITK)
# check cmake version
# Require 2.4.2 for MATH and LIST commands (REMOVE_ITEM is not the same in
# 2.4.1)
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.2 FATAL_ERROR)
# needed for the insight journal
INCLUDE(IJMacros.txt)
ENABLE_TESTING()
IF(CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w")
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
###############################################################################
# Config ITKWrap
###############################################################################
# Set up options needed for ConfigureWrapping
# load the language autodetection stuff for the insight journal
INCLUDE(LanguageAutoDetection.cmake)
# set WrapITK version
SET(WrapITK_VERSION_MAJOR 0)
SET(WrapITK_VERSION_MINOR 2)
SET(WrapITK_VERSION_PATCH 1)
OPTION(WRAP_ITK_TCL "Build cswig Tcl wrapper support." OFF)
OPTION(WRAP_ITK_PYTHON "Build cswig Python wrapper support." OFF)
OPTION(WRAP_ITK_JAVA "Build cswig Java wrapper support." OFF)
# OPTION(WRAP_ITK_PERL "Build cswig Perl wrapper support." OFF)
OPTION(WRAP_unsigned_char "Wrap unsigned char type" OFF)
OPTION(WRAP_unsigned_short "Wrap unsigned short type" ON)
OPTION(WRAP_unsigned_long "Wrap unsigned long type" OFF)
OPTION(WRAP_signed_char "Wrap signed char type" OFF)
OPTION(WRAP_signed_short "Wrap signed short type" OFF)
OPTION(WRAP_signed_long "Wrap signed long type" OFF)
OPTION(WRAP_float "Wrap float type" ON)
OPTION(WRAP_double "Wrap double type" OFF)
OPTION(WRAP_vector_float "Wrap vector float type" ON)
OPTION(WRAP_vector_double "Wrap vector double type" OFF)
OPTION(WRAP_covariant_vector_float "Wrap covariant vector float type" ON)
OPTION(WRAP_covariant_vector_double "Wrap covariant vector double type" OFF)
OPTION(WRAP_rgb_unsigned_char "Wrap RGB< unsigned char > type" OFF)
OPTION(WRAP_rgb_unsigned_short "Wrap RGB< unsigned short > type" ON)
OPTION(WRAP_rgba_unsigned_char "Wrap RGBA< unsigned char > type" OFF)
OPTION(WRAP_rgba_unsigned_short "Wrap RGBA< unsigned short > type" ON)
OPTION(WRAP_complex_float "Wrap complex<float> type" ON)
OPTION(WRAP_complex_double "Wrap complex<double> type" OFF)
SET(WRAP_ITK_DIMS "2;3" CACHE STRING "dimensions available separated by semicolons (;)")
OPTION(INSTALL_WRAP_ITK_COMPATIBILITY "Install FindWrapITK.cmake and WrapITK.pth (so cmake and python can find WrapITK) as part of the standard installation process. This requires admin privileges. These files can be separately installed by making the install_wrapitk_compatibility target. " ON)
SET(WRAP_ITK_INSTALL_PREFIX "/lib/InsightToolkit/WrapITK/" CACHE PATH "subpath where where most of WrapITK files will be installed")
# Output directories.
SET(WRAP_ITK_CONFIG_DIR "${WrapITK_SOURCE_DIR}/ConfigurationInputs")
SET(WRAP_ITK_CMAKE_DIR "${WrapITK_SOURCE_DIR}")
SET(WRAP_ITK_JAVA_DIR "${WrapITK_BINARY_DIR}/Java")
IF(NOT LIBRARY_OUTPUT_PATH)
SET (LIBRARY_OUTPUT_PATH ${WrapITK_BINARY_DIR}/lib CACHE INTERNAL "Single output directory for building all libraries.")
ENDIF(NOT LIBRARY_OUTPUT_PATH)
IF(NOT EXECUTABLE_OUTPUT_PATH)
SET (EXECUTABLE_OUTPUT_PATH ${WrapITK_BINARY_DIR}/bin CACHE INTERNAL "Single output directory for building all executables.")
ENDIF(NOT EXECUTABLE_OUTPUT_PATH)
MARK_AS_ADVANCED(LIBRARY_OUTPUT_PATH EXECUTABLE_OUTPUT_PATH WRAP_ITK_INSTALL_PREFIX)
SET(CXX_TEST_PATH ${EXECUTABLE_OUTPUT_PATH})
# Now include ConfigureWrapping
INCLUDE(ConfigureWrapping.cmake)
# Now make sure that itk.swg is copied to WRAPPER_SWIG_LIBRARY_OUTPUT_DIR, which
# is set in ConfigureWrapping. We do this so there is only one place that swig
# files needed for a WrapITK build are placed: in the binary directory. (For
# external projects, we look in the WrapITK binary dir and the project's binary
# dir.)
SET(src "${WrapITK_SOURCE_DIR}/itk.swg")
SET(tgt "${WRAPPER_SWIG_LIBRARY_OUTPUT_DIR}/itk.swg")
EXEC_PROGRAM(${CMAKE_COMMAND} ARGS -E copy_if_different "\"${src}\"" "\"${tgt}\"")
SUBDIRS(SwigRuntime)
###############################################################################
# Configure CPack
###############################################################################
# CPack was introduced in cmake 2.4
SET(CMAKE_VERSION "${CMAKE_CACHE_MAJOR_VERSION}.${CMAKE_CACHE_MINOR_VERSION}.${CMAKE_CACHE_RELEASE_VERSION}")
# IF("${CMAKE_VERSION}" STRGREATER "2.4")
# SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Enhanced languages support for the Insight Toolkit")
#Ê SET(CPACK_PACKAGE_VENDOR "Gaetan Lehmann, Zachary Pincus")
# SET(CPACK_PACKAGE_VERSION_MAJOR "${WrapITK_VERSION_MAJOR}")
# SET(CPACK_PACKAGE_VERSION_MINOR "${WrapITK_VERSION_MINOR}")
# SET(CPACK_PACKAGE_VERSION_PATCH "${WrapITK_VERSION_PATCH}")
# # SET(CPACK_PACKAGE_INSTALL_DIRECTORY "WrapITK-${WrapITK_VERSION_MAJOR}.${WrapITK_VERSION_MINOR}")
# # SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README")
# SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/Documentation/Copyright/ITKCopyright.txt")
# INCLUDE(CPack)
# ENDIF("${CMAKE_VERSION}" STRGREATER "2.4")
###############################################################################
# Configure specific wrapper modules
###############################################################################
SET(WRAP_ITK_MODULES
VXLNumerics
Base
BaseNumerics
BaseTransforms
BaseSpatialObject)
# set Iterators module to OFF by default
# it is currently usable only when applying patches to ITK, and will only
# take place and time to build
# TODO: remove this line when iterators will be usable without patch
OPTION(WRAP_Iterators "Build Iterators module." OFF)
# Set FFTW to on if USE_FFTWF or USE_FFTWD are on.
IF(USE_FFTWD OR USE_FFTWF)
OPTION(WRAP_FFTW "Build FFTW module." ON)
ELSE(USE_FFTWD OR USE_FFTWF)
OPTION(WRAP_FFTW "Build FFTW module." OFF)
ENDIF(USE_FFTWD OR USE_FFTWF)
SET(optional_modules
BinaryMorphology
Calculators
Compose
DeformableTransforms
Denoising
DistanceMap
EdgesAndContours
FFT
FFTW
Filtering
IntensityFilters
Interpolators
IO
Iterators
LevelSet
Morphology
#Patented
PixelMath
Registration
Resize
Review
SegmentationAndThreshold
SegmentationValidation
SimpleFilters
UnaryPixelMath)
FOREACH(module ${optional_modules})
OPTION(WRAP_${module} "Build ${module} module." ON)
MARK_AS_ADVANCED(WRAP_${module})
IF(WRAP_${module})
SET(WRAP_ITK_MODULES ${WRAP_ITK_MODULES} ${module})
ENDIF(WRAP_${module})
ENDFOREACH(module)
FOREACH(module ${WRAP_ITK_MODULES})
SUBDIRS(Modules/${module})
ENDFOREACH(module)
OPTION(BUILD_ITKVTKGLUE "Build WrapITK with ItkVtkGlue" ON)
IF(BUILD_ITKVTKGLUE)
SUBDIRS(ExternalProjects/ItkVtkGlue)
ENDIF(BUILD_ITKVTKGLUE)
OPTION(BUILD_PYBUFFER "Build WrapITK with Numpy support" ON)
IF(BUILD_PYBUFFER)
SUBDIRS(ExternalProjects/PyBuffer)
ENDIF(BUILD_PYBUFFER)
###############################################################################
# Configure language-specific features
###############################################################################
IF(WRAP_ITK_TCL)
SUBDIRS(Tcl)
ENDIF(WRAP_ITK_TCL)
IF(WRAP_ITK_PERL)
SUBDIRS(Perl)
ENDIF(WRAP_ITK_PERL)
IF(WRAP_ITK_PYTHON)
SUBDIRS(Python)
ENDIF(WRAP_ITK_PYTHON)
IF(WRAP_ITK_JAVA)
SUBDIRS(Java)
ENDIF(WRAP_ITK_JAVA)
###############################################################################
# Configure WrapITKConfig.cmake and FindWrapITK.cmake for external projects
###############################################################################
# First, configure for use directly from the build dir.
SET(CONFIG_CONFIG_DIR "${WrapITK_SOURCE_DIR}/ConfigurationInputs")
SET(CONFIG_CMAKE_DIR "${WrapITK_SOURCE_DIR}")
SET(CONFIG_WRAP_ITK_SWIG_LIBRARY_DIRECTORY "${WRAPPER_SWIG_LIBRARY_OUTPUT_DIR}")
SET(CONFIG_WRAP_ITK_MASTER_INDEX_DIRECTORY "${WRAPPER_MASTER_INDEX_OUTPUT_DIR}")
SET(CONFIG_WRAP_ITK_INSTALL_LOCATION "${CMAKE_INSTALL_PREFIX}/${WRAP_ITK_INSTALL_PREFIX}")
SET(CONFIG_WRAP_ITK_INSTALL_PREFIX "${WRAP_ITK_INSTALL_PREFIX}")
SET(CONFIG_WRAP_ITK_MODULES "${WRAP_ITK_MODULES}")
SET(CONFIG_WRAP_ITK_PYTHON_MODULE "${WrapITK_BINARY_DIR}/Python/\\\${CTEST_CONFIGURATION_TYPE}")
SET(CONFIG_WRAP_ITK_PYTHON_LIBS "${LIBRARY_OUTPUT_PATH}/\\\${CTEST_CONFIGURATION_TYPE}")
SET(CONFIG_WRAP_ITK_LIB_DIR "${LIBRARY_OUTPUT_PATH}")
CONFIGURE_FILE("${WRAP_ITK_CONFIG_DIR}/WrapITKConfig.cmake.in"
"${WrapITK_BINARY_DIR}/WrapITKConfig.cmake"
@ONLY IMMEDIATE)
SET(CONFIG_WRAP_ITK_DIR "${WrapITK_BINARY_DIR}")
CONFIGURE_FILE("${WRAP_ITK_CONFIG_DIR}/FindWrapITK.cmake.in"
"${WrapITK_BINARY_DIR}/FindWrapITK.cmake"
@ONLY IMMEDIATE)
# Second, configure for installed use. Ensure that no absolute paths
# go into the installed config file, so that it is as portable as possible.
SET(CONFIG_CONFIG_DIR "\${WrapITK_DIR}/Configuration/Inputs")
SET(CONFIG_CMAKE_DIR "\${WrapITK_DIR}/Configuration")
SET(CONFIG_WRAP_ITK_SWIG_LIBRARY_DIRECTORY "\${WrapITK_DIR}/SWIG")
SET(CONFIG_WRAP_ITK_MASTER_INDEX_DIRECTORY "\${WrapITK_DIR}/ClassIndex")
SET(CONFIG_WRAP_ITK_INSTALL_LOCATION "\${WrapITK_DIR}")
SET(CONFIG_WRAP_ITK_PYTHON_MODULE "\${WrapITK_DIR}/Python/")
SET(CONFIG_WRAP_ITK_PYTHON_LIBS "\${WrapITK_DIR}/lib")
SET(CONFIG_WRAP_ITK_LIB_DIR "\${WrapITK_DIR}/lib")
CONFIGURE_FILE("${WRAP_ITK_CONFIG_DIR}/WrapITKConfig.cmake.in"
"${WrapITK_BINARY_DIR}/InstallOnly/WrapITKConfig.cmake"
@ONLY IMMEDIATE)
SET(CONFIG_WRAP_ITK_DIR "${CMAKE_INSTALL_PREFIX}/${WRAP_ITK_INSTALL_PREFIX}")
CONFIGURE_FILE("${WRAP_ITK_CONFIG_DIR}/FindWrapITK.cmake.in"
"${WrapITK_BINARY_DIR}/InstallOnly/FindWrapITK.cmake"
@ONLY IMMEDIATE)
INSTALL_FILES("${WRAP_ITK_INSTALL_PREFIX}/Configuration" FILES
ConfigureWrapping.cmake
CMakeUtilityFunctions.cmake
CreateCableSwigInputs.cmake
CreateLanguageSupport.cmake
CreateWrapperLibrary.cmake
WrapBasicTypes.cmake
WrapITKTypes.cmake)
INSTALL_FILES("${WRAP_ITK_INSTALL_PREFIX}/Configuration/Inputs" FILES
ConfigurationInputs/wrap_ITKLang.cxx.in
ConfigurationInputs/wrap_ITK.cxx.in
ConfigurationInputs/wrap_.cxx.in
ConfigurationInputs/Master.mdx.in
ConfigurationInputs/gcc_xml.inc.in
ConfigurationInputs/empty.depend.in
ConfigurationInputs/typemaps.swg.in)
INSTALL_FILES("${WRAP_ITK_INSTALL_PREFIX}/Configuration/Inputs/LanguageSupport" FILES
ConfigurationInputs/LanguageSupport/ModuleLoader.py.in
ConfigurationInputs/LanguageSupport/ModuleConfig.py.in
ConfigurationInputs/LanguageSupport/ExternalProjectConfig.py.in)
INSTALL_FILES("${WRAP_ITK_INSTALL_PREFIX}/SWIG" FILES "itk.swg")
INSTALL_FILES("${WRAP_ITK_INSTALL_PREFIX}/" FILES "${WrapITK_BINARY_DIR}/InstallOnly/WrapITKConfig.cmake")
# Add a custom target to drive installation of the WrapITK-compatibility files
IF(INSTALL_WRAP_ITK_COMPATIBILITY)
# if we should by default install the files, make a custom target that will
# always be built.
CREATE_INSTALL_AT_ABSOLUTE_PATH_TARGET(install_wrapitk_compatibility DEFAULT
"Installing WrapITK compatibility files. Requires admin priviliges: turn off INSTALL_WRAP_ITK_COMPATIBILITY in cmake to disable.")
ELSE(INSTALL_WRAP_ITK_COMPATIBILITY)
# otherwise, add a target that will install the files only when that target is
# manually built.
CREATE_INSTALL_AT_ABSOLUTE_PATH_TARGET(install_wrapitk_compatibility ON_DEMAND
"Installing WrapITK compatibility files. Requires admin priviliges.")
ENDIF(INSTALL_WRAP_ITK_COMPATIBILITY)
INSTALL_AT_ABSOLUTE_PATH(install_wrapitk_compatibility "${CMAKE_ROOT}/Modules" "${WrapITK_BINARY_DIR}/InstallOnly/FindWrapITK.cmake")
INSTALL_FILES("${WRAP_ITK_INSTALL_PREFIX}/Configuration/Python" FILES "${WRAP_ITK_CMAKE_DIR}/Python/CreateLanguageSupport.cmake")
INSTALL_FILES("${WRAP_ITK_INSTALL_PREFIX}/Configuration/Java" FILES "${WRAP_ITK_CMAKE_DIR}/Java/CreateLanguageSupport.cmake")
INSTALL_FILES("${WRAP_ITK_INSTALL_PREFIX}/Configuration/Tcl" FILES "${WRAP_ITK_CMAKE_DIR}/Tcl/CreateLanguageSupport.cmake")
INSTALL_FILES("${WRAP_ITK_INSTALL_PREFIX}/Configuration/Python" FILES "${WRAP_ITK_CMAKE_DIR}/Python/ConfigureWrapping.cmake")
INSTALL_FILES("${WRAP_ITK_INSTALL_PREFIX}/Configuration/Java" FILES "${WRAP_ITK_CMAKE_DIR}/Java/ConfigureWrapping.cmake")
INSTALL_FILES("${WRAP_ITK_INSTALL_PREFIX}/Configuration/Tcl" FILES "${WRAP_ITK_CMAKE_DIR}/Tcl/ConfigureWrapping.cmake")
INSTALL_FILES("${WRAP_ITK_INSTALL_PREFIX}/Configuration/Inputs/LanguageSupport" FILES "${WRAP_ITK_CMAKE_DIR}/ConfigurationInputs/LanguageSupport/ExternalProjectConfig.pth.in")
|