#=========================================================
# CLITK = Command Line ITK
-PROJECT(clitk)
+project(clitk)
cmake_minimum_required(VERSION 2.8)
cmake_policy(VERSION 2.8)
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
-IF(NOT DEFINED CLITK_SOURCE_DIR)
- SET(CLITK_SOURCE_DIR ${PROJECT_SOURCE_DIR})
-ENDIF(NOT DEFINED CLITK_SOURCE_DIR)
+if(NOT DEFINED CLITK_SOURCE_DIR)
+ set(CLITK_SOURCE_DIR ${PROJECT_SOURCE_DIR})
+endif(NOT DEFINED CLITK_SOURCE_DIR)
#=========================================================
-SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
+set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
-IF(MSVC)
- SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj" )
- SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /bigobj" )
-ENDIF(MSVC)
+if(MSVC)
+ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj" )
+ set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /bigobj" )
+endif(MSVC)
#=========================================================
-INCLUDE(${CLITK_SOURCE_DIR}/cmake/common.cmake)
-INCLUDE(${CLITK_SOURCE_DIR}/cmake/dependencies.cmake)
-INCLUDE(${CLITK_SOURCE_DIR}/cmake/build_opt.cmake)
+include(${CLITK_SOURCE_DIR}/cmake/common.cmake)
+include(${CLITK_SOURCE_DIR}/cmake/dependencies.cmake)
+include(${CLITK_SOURCE_DIR}/cmake/build_opt.cmake)
#=========================================================
#=========================================================
# Select what is compiled
-ADD_SUBDIRECTORY(${CLITK_SOURCE_DIR}/common ${PROJECT_BINARY_DIR}/common)
-ADD_SUBDIRECTORY(${CLITK_SOURCE_DIR}/tools ${PROJECT_BINARY_DIR}/tools)
-ADD_SUBDIRECTORY(${CLITK_SOURCE_DIR}/segmentation ${PROJECT_BINARY_DIR}/segmentation)
-ADD_SUBDIRECTORY(${CLITK_SOURCE_DIR}/registration ${PROJECT_BINARY_DIR}/registration)
-ADD_SUBDIRECTORY(${CLITK_SOURCE_DIR}/cluster_tools ${PROJECT_BINARY_DIR}/cluster_tools)
+add_subdirectory(${CLITK_SOURCE_DIR}/common ${PROJECT_BINARY_DIR}/common)
+add_subdirectory(${CLITK_SOURCE_DIR}/tools ${PROJECT_BINARY_DIR}/tools)
+add_subdirectory(${CLITK_SOURCE_DIR}/segmentation ${PROJECT_BINARY_DIR}/segmentation)
+add_subdirectory(${CLITK_SOURCE_DIR}/registration ${PROJECT_BINARY_DIR}/registration)
+add_subdirectory(${CLITK_SOURCE_DIR}/cluster_tools ${PROJECT_BINARY_DIR}/cluster_tools)
-MACRO(SET_IF_NOT_SET var val)
- IF(NOT DEFINED "${var}")
- SET("${var}" "${val}")
- ENDIF(NOT DEFINED "${var}")
-ENDMACRO(SET_IF_NOT_SET)
+macro(SET_IF_NOT_SET var val)
+ if(NOT DEFINED "${var}")
+ set("${var}" "${val}")
+ endif(NOT DEFINED "${var}")
+endmacro(SET_IF_NOT_SET)
# Those are set for running a classical make Experimental
SET_IF_NOT_SET(CTEST_DROP_METHOD "http")
#
# Build the documentation
#
-INCLUDE (${CMAKE_ROOT}/Modules/Documentation.cmake)
+include(${CMAKE_ROOT}/Modules/Documentation.cmake)
-IF (BUILD_DOXYGEN)
+if(BUILD_DOXYGEN)
#
# Configure the script and the doxyfile, then add target
#
- CONFIGURE_FILE(${CLITK_SOURCE_DIR}/Doxygen/doxygen.config.in
+ configure_file(${CLITK_SOURCE_DIR}/Doxygen/doxygen.config.in
${PROJECT_BINARY_DIR}/Doxygen/doxygen.config)
- CONFIGURE_FILE(${CLITK_SOURCE_DIR}/Doxygen/itkdoxygen.pl.in
+ configure_file(${CLITK_SOURCE_DIR}/Doxygen/itkdoxygen.pl.in
${PROJECT_BINARY_DIR}/Doxygen/itkdoxygen.pl)
- ADD_CUSTOM_TARGET(Documentation
+ add_custom_target(Documentation
COMMAND ${DOXYGEN_EXECUTABLE} ${PROJECT_BINARY_DIR}/Doxygen/doxygen.config
MAIN_DEPENDENCY ${PROJECT_BINARY_DIR}/Doxygen/doxygen.config
DEPENDS ${PROJECT_BINARY_DIR}/Doxygen/itkdoxygen.pl
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/Doxygen
)
-ENDIF (BUILD_DOXYGEN)
+endif(BUILD_DOXYGEN)
-IF (CLITK_BUILD_TOOLS)
+if(CLITK_BUILD_TOOLS)
#=========================================================
# Install scripts when running make install
- SET(SCRIPTS
+ set(SCRIPTS
gate_job_cluster.job
gate_make_merge_release.sh
gate_make_release.sh
mergeStatFile.sh
)
- INSTALL (FILES ${SCRIPTS} DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE)
+ install(FILES ${SCRIPTS} DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE)
-ENDIF(CLITK_BUILD_TOOLS)
+endif(CLITK_BUILD_TOOLS)
# Attempt to find gengetopt. If not found, compile it.
-FIND_PROGRAM(GENGETOPT gengetopt)
-IF (GENGETOPT STREQUAL "GENGETOPT-NOTFOUND")
- GET_FILENAME_COMPONENT(CLITK_CMAKE_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
- ADD_SUBDIRECTORY(${CLITK_CMAKE_DIR}/../utilities/gengetopt ${CMAKE_CURRENT_BINARY_DIR}/gengetopt)
-ELSE(GENGETOPT STREQUAL "GENGETOPT-NOTFOUND")
- ADD_EXECUTABLE(gengetopt IMPORTED)
- SET_PROPERTY(TARGET gengetopt PROPERTY IMPORTED_LOCATION ${GENGETOPT})
-ENDIF(GENGETOPT STREQUAL "GENGETOPT-NOTFOUND")
+find_program(GENGETOPT gengetopt)
+if(GENGETOPT STREQUAL "GENGETOPT-NOTFOUND")
+ get_filename_component(CLITK_CMAKE_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
+ add_subdirectory(${CLITK_CMAKE_DIR}/../utilities/gengetopt ${CMAKE_CURRENT_BINARY_DIR}/gengetopt)
+else(GENGETOPT STREQUAL "GENGETOPT-NOTFOUND")
+ add_executable(gengetopt IMPORTED)
+ set_property(TARGET gengetopt PROPERTY IMPORTED_LOCATION ${GENGETOPT})
+endif(GENGETOPT STREQUAL "GENGETOPT-NOTFOUND")
-MACRO (WRAP_GGO GGO_SRCS)
- FOREACH(GGO_FILE ${ARGN})
- GET_FILENAME_COMPONENT(GGO_BASEFILENAME ${GGO_FILE} NAME_WE)
- GET_FILENAME_COMPONENT(GGO_FILE_ABS ${GGO_FILE} ABSOLUTE)
- SET(GGO_H ${GGO_BASEFILENAME}_ggo.h)
- SET(GGO_C ${GGO_BASEFILENAME}_ggo.c)
- SET(GGO_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${GGO_H} ${CMAKE_CURRENT_BINARY_DIR}/${GGO_C})
- ADD_CUSTOM_COMMAND(OUTPUT ${GGO_OUTPUT}
+macro(WRAP_GGO GGO_SRCS)
+ foreach(GGO_FILE ${ARGN})
+ get_filename_component(GGO_BASEFILENAME ${GGO_FILE} NAME_WE)
+ get_filename_component(GGO_FILE_ABS ${GGO_FILE} ABSOLUTE)
+ set(GGO_H ${GGO_BASEFILENAME}_ggo.h)
+ set(GGO_C ${GGO_BASEFILENAME}_ggo.c)
+ set(GGO_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${GGO_H} ${CMAKE_CURRENT_BINARY_DIR}/${GGO_C})
+ add_custom_command(OUTPUT ${GGO_OUTPUT}
COMMAND gengetopt
ARGS < ${GGO_FILE_ABS}
--output-dir=${CMAKE_CURRENT_BINARY_DIR}
--include-getopt
DEPENDS ${GGO_FILE_ABS}
)
- SET(${GGO_SRCS} ${${GGO_SRCS}} ${GGO_OUTPUT})
- INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
- ENDFOREACH(GGO_FILE)
- SET_SOURCE_FILES_PROPERTIES(${${GGO_SRCS}} PROPERTIES GENERATED TRUE)
- IF(CMAKE_COMPILER_IS_GNUCXX)
- FIND_PROGRAM(DEFAULT_GCC gcc)
- EXEC_PROGRAM(${DEFAULT_GCC} ARGS "-dumpversion" OUTPUT_VARIABLE GCCVER)
- IF("${GCCVER}" VERSION_GREATER "4.5.2")
- SET_SOURCE_FILES_PROPERTIES(${${GGO_SRCS}} PROPERTIES COMPILE_FLAGS "-Wno-unused-but-set-variable")
- ENDIF("${GCCVER}" VERSION_GREATER "4.5.2")
- ENDIF(CMAKE_COMPILER_IS_GNUCXX)
-ENDMACRO (WRAP_GGO)
+ set(${GGO_SRCS} ${${GGO_SRCS}} ${GGO_OUTPUT})
+ include_directories(${CMAKE_CURRENT_BINARY_DIR})
+ endforeach(GGO_FILE)
+ set_source_files_properties(${${GGO_SRCS}} PROPERTIES GENERATED TRUE)
+ if(CMAKE_COMPILER_IS_GNUCXX)
+ find_program(DEFAULT_GCC gcc)
+ exec_program(${DEFAULT_GCC} ARGS "-dumpversion" OUTPUT_VARIABLE GCCVER)
+ if("${GCCVER}" VERSION_GREATER "4.5.2")
+ set_source_files_properties(${${GGO_SRCS}} PROPERTIES COMPILE_FLAGS "-Wno-unused-but-set-variable")
+ endif("${GCCVER}" VERSION_GREATER "4.5.2")
+ endif(CMAKE_COMPILER_IS_GNUCXX)
+endmacro(WRAP_GGO)
# It tries to find the root-config script which gives you all the needed information.
# If the system variable ROOTSYS is set this is straight forward.
# If not the module uses the pathes given in ROOT_CONFIG_SEARCHPATH.
-# If you need an other path you should add this path to this varaible.
+# If you need an other path you should add this path to this varaible.
# The root-config script is then used to detect basically everything else.
# This module defines a number of key variables and macros.
-MESSAGE(STATUS "Looking for Root...")
+message(STATUS "Looking for Root...")
-SET(ROOT_DEFINITIONS "")
+set(ROOT_DEFINITIONS "")
-SET(ROOT_INSTALLED_VERSION_TOO_OLD FALSE)
+set(ROOT_INSTALLED_VERSION_TOO_OLD FALSE)
-SET(ROOT_CONFIG_EXECUTABLE ROOT_CONFIG_EXECUTABLE-NOTFOUND)
+set(ROOT_CONFIG_EXECUTABLE ROOT_CONFIG_EXECUTABLE-NOTFOUND)
-FIND_PROGRAM(ROOT_CONFIG_EXECUTABLE NAMES root-config PATHS)
-
-IF (${ROOT_CONFIG_EXECUTABLE} MATCHES "ROOT_CONFIG_EXECUTABLE-NOTFOUND")
- MESSAGE( FATAL_ERROR "ROOT not installed in the searchpath and ROOTSYS is not set. Please
+find_program(ROOT_CONFIG_EXECUTABLE NAMES root-config PATHS)
+
+if(${ROOT_CONFIG_EXECUTABLE} MATCHES "ROOT_CONFIG_EXECUTABLE-NOTFOUND")
+ message( FATAL_ERROR "ROOT not installed in the searchpath and ROOTSYS is not set. Please
set ROOTSYS or add the path to your ROOT installation in the Macro FindROOT.cmake in the
subdirectory cmake/modules.")
-ELSE (${ROOT_CONFIG_EXECUTABLE} MATCHES "ROOT_CONFIG_EXECUTABLE-NOTFOUND")
- MESSAGE(STATUS "root-config found")
- STRING(REGEX REPLACE "(^.*)/bin/root-config" "\\1" test ${ROOT_CONFIG_EXECUTABLE})
- SET( ENV{ROOTSYS} ${test})
+else(${ROOT_CONFIG_EXECUTABLE} MATCHES "ROOT_CONFIG_EXECUTABLE-NOTFOUND")
+ message(STATUS "root-config found")
+ string(REGEX REPLACE "(^.*)/bin/root-config" "\\1" test ${ROOT_CONFIG_EXECUTABLE})
+ set( ENV{ROOTSYS} ${test})
set( ROOTSYS ${test})
-ENDIF (${ROOT_CONFIG_EXECUTABLE} MATCHES "ROOT_CONFIG_EXECUTABLE-NOTFOUND")
+endif(${ROOT_CONFIG_EXECUTABLE} MATCHES "ROOT_CONFIG_EXECUTABLE-NOTFOUND")
+
+
+if(ROOT_CONFIG_EXECUTABLE)
-
-IF (ROOT_CONFIG_EXECUTABLE)
-
- SET(ROOT_FOUND FALSE)
+ set(ROOT_FOUND FALSE)
- EXEC_PROGRAM(${ROOT_CONFIG_EXECUTABLE} ARGS "--version" OUTPUT_VARIABLE ROOTVERSION)
+ exec_program(${ROOT_CONFIG_EXECUTABLE} ARGS "--version" OUTPUT_VARIABLE ROOTVERSION)
- MESSAGE(STATUS "Looking for Root... - found $ENV{ROOTSYS}/bin/root")
- MESSAGE(STATUS "Looking for Root... - version ${ROOTVERSION} ")
+ message(STATUS "Looking for Root... - found $ENV{ROOTSYS}/bin/root")
+ message(STATUS "Looking for Root... - version ${ROOTVERSION} ")
# we need at least version 5.00/00
- IF (NOT ROOT_MIN_VERSION)
- SET(ROOT_MIN_VERSION "5.00/00")
- ENDIF (NOT ROOT_MIN_VERSION)
-
+ if(NOT ROOT_MIN_VERSION)
+ set(ROOT_MIN_VERSION "5.00/00")
+ endif(NOT ROOT_MIN_VERSION)
+
# now parse the parts of the user given version string into variables
- STRING(REGEX REPLACE "^([0-9]+)\\.[0-9][0-9]+\\/[0-9][0-9]+" "\\1" req_root_major_vers "${ROOT_MIN_VERSION}")
- STRING(REGEX REPLACE "^[0-9]+\\.([0-9][0-9])+\\/[0-9][0-9]+.*" "\\1" req_root_minor_vers "${ROOT_MIN_VERSION}")
- STRING(REGEX REPLACE "^[0-9]+\\.[0-9][0-9]+\\/([0-9][0-9]+)" "\\1" req_root_patch_vers "${ROOT_MIN_VERSION}")
-
+ string(REGEX REPLACE "^([0-9]+)\\.[0-9][0-9]+\\/[0-9][0-9]+" "\\1" req_root_major_vers "${ROOT_MIN_VERSION}")
+ string(REGEX REPLACE "^[0-9]+\\.([0-9][0-9])+\\/[0-9][0-9]+.*" "\\1" req_root_minor_vers "${ROOT_MIN_VERSION}")
+ string(REGEX REPLACE "^[0-9]+\\.[0-9][0-9]+\\/([0-9][0-9]+)" "\\1" req_root_patch_vers "${ROOT_MIN_VERSION}")
+
# and now the version string given by qmake
- STRING(REGEX REPLACE "^([0-9]+)\\.[0-9][0-9]+\\/[0-9][0-9]+.*" "\\1" found_root_major_vers "${ROOTVERSION}")
- STRING(REGEX REPLACE "^[0-9]+\\.([0-9][0-9])+\\/[0-9][0-9]+.*" "\\1" found_root_minor_vers "${ROOTVERSION}")
- STRING(REGEX REPLACE "^[0-9]+\\.[0-9][0-9]+\\/([0-9][0-9]+).*" "\\1" found_root_patch_vers "${ROOTVERSION}")
+ string(REGEX REPLACE "^([0-9]+)\\.[0-9][0-9]+\\/[0-9][0-9]+.*" "\\1" found_root_major_vers "${ROOTVERSION}")
+ string(REGEX REPLACE "^[0-9]+\\.([0-9][0-9])+\\/[0-9][0-9]+.*" "\\1" found_root_minor_vers "${ROOTVERSION}")
+ string(REGEX REPLACE "^[0-9]+\\.[0-9][0-9]+\\/([0-9][0-9]+).*" "\\1" found_root_patch_vers "${ROOTVERSION}")
- IF (found_root_major_vers LESS 5)
- MESSAGE( FATAL_ERROR "Invalid ROOT version \"${ROOTERSION}\", at least major version 4 is required, e.g. \"5.00/00\"")
- ENDIF (found_root_major_vers LESS 5)
+ if(found_root_major_vers LESS 5)
+ message( FATAL_ERROR "Invalid ROOT version \"${ROOTERSION}\", at least major version 4 is required, e.g. \"5.00/00\"")
+ endif(found_root_major_vers LESS 5)
# compute an overall version number which can be compared at once
- MATH(EXPR req_vers "${req_root_major_vers}*10000 + ${req_root_minor_vers}*100 + ${req_root_patch_vers}")
- MATH(EXPR found_vers "${found_root_major_vers}*10000 + ${found_root_minor_vers}*100 + ${found_root_patch_vers}")
-
- IF (found_vers LESS req_vers)
- SET(ROOT_FOUND FALSE)
- SET(ROOT_INSTALLED_VERSION_TOO_OLD TRUE)
- ELSE (found_vers LESS req_vers)
- SET(ROOT_FOUND TRUE)
- ENDIF (found_vers LESS req_vers)
+ math(EXPR req_vers "${req_root_major_vers}*10000 + ${req_root_minor_vers}*100 + ${req_root_patch_vers}")
+ math(EXPR found_vers "${found_root_major_vers}*10000 + ${found_root_minor_vers}*100 + ${found_root_patch_vers}")
+
+ if(found_vers LESS req_vers)
+ set(ROOT_FOUND FALSE)
+ set(ROOT_INSTALLED_VERSION_TOO_OLD TRUE)
+ else(found_vers LESS req_vers)
+ set(ROOT_FOUND TRUE)
+ endif(found_vers LESS req_vers)
-ENDIF (ROOT_CONFIG_EXECUTABLE)
+endif(ROOT_CONFIG_EXECUTABLE)
-#MESSAGE("root found = "${ROOT_FOUND})
+#message("root found = "${ROOT_FOUND})
-IF (ROOT_FOUND)
+if(ROOT_FOUND)
# ask root-config for the library dir
# Set ROOT_LIBRARY_DIR
- EXEC_PROGRAM( ${ROOT_CONFIG_EXECUTABLE}
+ exec_program( ${ROOT_CONFIG_EXECUTABLE}
ARGS "--libdir"
OUTPUT_VARIABLE ROOT_LIBRARY_DIR_TMP )
- IF(EXISTS "${ROOT_LIBRARY_DIR_TMP}")
- SET(ROOT_LIBRARY_DIR ${ROOT_LIBRARY_DIR_TMP} )
- ELSE(EXISTS "${ROOT_LIBRARY_DIR_TMP}")
- MESSAGE("Warning: ROOT_CONFIG_EXECUTABLE reported ${ROOT_LIBRARY_DIR_TMP} as library path,")
- MESSAGE("Warning: but ${ROOT_LIBRARY_DIR_TMP} does NOT exist, ROOT must NOT be installed correctly.")
- ENDIF(EXISTS "${ROOT_LIBRARY_DIR_TMP}")
-
+ if(EXISTS "${ROOT_LIBRARY_DIR_TMP}")
+ set(ROOT_LIBRARY_DIR ${ROOT_LIBRARY_DIR_TMP} )
+ else(EXISTS "${ROOT_LIBRARY_DIR_TMP}")
+ message("Warning: ROOT_CONFIG_EXECUTABLE reported ${ROOT_LIBRARY_DIR_TMP} as library path,")
+ message("Warning: but ${ROOT_LIBRARY_DIR_TMP} does NOT exist, ROOT must NOT be installed correctly.")
+ endif(EXISTS "${ROOT_LIBRARY_DIR_TMP}")
+
# ask root-config for the binary dir
- EXEC_PROGRAM(${ROOT_CONFIG_EXECUTABLE}
+ exec_program(${ROOT_CONFIG_EXECUTABLE}
ARGS "--bindir"
OUTPUT_VARIABLE root_bins )
- SET(ROOT_BINARY_DIR ${root_bins})
+ set(ROOT_BINARY_DIR ${root_bins})
# ask root-config for the include dir
- EXEC_PROGRAM( ${ROOT_CONFIG_EXECUTABLE}
- ARGS "--incdir"
+ exec_program( ${ROOT_CONFIG_EXECUTABLE}
+ ARGS "--incdir"
OUTPUT_VARIABLE root_headers )
- SET(ROOT_INCLUDE_DIR ${root_headers})
+ set(ROOT_INCLUDE_DIR ${root_headers})
# CACHE INTERNAL "")
# ask root-config for the library varaibles
- EXEC_PROGRAM( ${ROOT_CONFIG_EXECUTABLE}
-# ARGS "--noldflags --noauxlibs --libs"
- ARGS "--glibs"
+ exec_program( ${ROOT_CONFIG_EXECUTABLE}
+# ARGS "--noldflags --noauxlibs --libs"
+ ARGS "--glibs"
OUTPUT_VARIABLE root_flags )
-# STRING(REGEX MATCHALL "([^ ])+" root_libs_all ${root_flags})
-# STRING(REGEX MATCHALL "-L([^ ])+" root_library ${root_flags})
+# string(REGEX MATCHALL "([^ ])+" root_libs_all ${root_flags})
+# string(REGEX MATCHALL "-L([^ ])+" root_library ${root_flags})
# REMOVE_FROM_LIST(root_flags "${root_libs_all}" "${root_library}")
- SET(ROOT_LIBRARIES ${root_flags})
+ set(ROOT_LIBRARIES ${root_flags})
# Make variables changeble to the advanced user
- MARK_AS_ADVANCED( ROOT_LIBRARY_DIR ROOT_INCLUDE_DIR ROOT_DEFINITIONS)
+ mark_as_advanced( ROOT_LIBRARY_DIR ROOT_INCLUDE_DIR ROOT_DEFINITIONS)
# Set ROOT_INCLUDES
- SET( ROOT_INCLUDES ${ROOT_INCLUDE_DIR})
+ set( ROOT_INCLUDES ${ROOT_INCLUDE_DIR})
- SET(LD_LIBRARY_PATH ${LD_LIBRARY_PATH} ${ROOT_LIBRARY_DIR})
+ set(LD_LIBRARY_PATH ${LD_LIBRARY_PATH} ${ROOT_LIBRARY_DIR})
#######################################
#
- # Check the executables of ROOT
- # ( rootcint )
+ # Check the executables of ROOT
+ # ( rootcint )
#
#######################################
- FIND_PROGRAM(ROOT_CINT_EXECUTABLE
+ find_program(ROOT_CINT_EXECUTABLE
NAMES rootcint
PATHS ${ROOT_BINARY_DIR}
NO_DEFAULT_PATH
)
-ENDIF (ROOT_FOUND)
+endif(ROOT_FOUND)
-#MESSAGE("icici")
+#message("icici")
###########################################
#
#
###########################################
-MACRO (ROOT_GENERATE_DICTIONARY_OLD )
-
- set(INFILES "")
+macro(ROOT_GENERATE_DICTIONARY_OLD )
+
+ set(INFILES "")
foreach (_current_FILE ${ARGN})
- IF (${_current_FILE} MATCHES "^.*\\.h$")
- IF (${_current_FILE} MATCHES "^.*Link.*$")
+ if(${_current_FILE} MATCHES "^.*\\.h$")
+ if(${_current_FILE} MATCHES "^.*Link.*$")
set(LINKDEF_FILE ${_current_FILE})
- ELSE (${_current_FILE} MATCHES "^.*Link.*$")
+ else(${_current_FILE} MATCHES "^.*Link.*$")
set(INFILES ${INFILES} ${_current_FILE})
- ENDIF (${_current_FILE} MATCHES "^.*Link.*$")
- ELSE (${_current_FILE} MATCHES "^.*\\.h$")
- IF (${_current_FILE} MATCHES "^.*\\.cxx$")
+ endif(${_current_FILE} MATCHES "^.*Link.*$")
+ else(${_current_FILE} MATCHES "^.*\\.h$")
+ if(${_current_FILE} MATCHES "^.*\\.cxx$")
set(OUTFILE ${_current_FILE})
- ELSE (${_current_FILE} MATCHES "^.*\\.cxx$")
- set(INCLUDE_DIRS ${INCLUDE_DIRS} -I${_current_FILE})
- ENDIF (${_current_FILE} MATCHES "^.*\\.cxx$")
- ENDIF (${_current_FILE} MATCHES "^.*\\.h$")
-
+ else(${_current_FILE} MATCHES "^.*\\.cxx$")
+ set(INCLUDE_DIRS ${INCLUDE_DIRS} -I${_current_FILE})
+ endif(${_current_FILE} MATCHES "^.*\\.cxx$")
+ endif(${_current_FILE} MATCHES "^.*\\.h$")
+
endforeach (_current_FILE ${ARGN})
-
-# MESSAGE("INFILES: ${INFILES}")
-# MESSAGE("OutFILE: ${OUTFILE}")
-# MESSAGE("LINKDEF_FILE: ${LINKDEF_FILE}")
-# MESSAGE("INCLUDE_DIRS: ${INCLUDE_DIRS}")
- STRING(REGEX REPLACE "(^.*).cxx" "\\1.h" bla "${OUTFILE}")
-# MESSAGE("BLA: ${bla}")
- SET (OUTFILES ${OUTFILE} ${bla})
+# message("INFILES: ${INFILES}")
+# message("OutFILE: ${OUTFILE}")
+# message("LINKDEF_FILE: ${LINKDEF_FILE}")
+# message("INCLUDE_DIRS: ${INCLUDE_DIRS}")
- ADD_CUSTOM_COMMAND(OUTPUT ${OUTFILES}
+ string(REGEX REPLACE "(^.*).cxx" "\\1.h" bla "${OUTFILE}")
+# message("BLA: ${bla}")
+ set(OUTFILES ${OUTFILE} ${bla})
+
+ add_custom_command(OUTPUT ${OUTFILES}
COMMAND ${ROOT_CINT_EXECUTABLE}
ARGS -f ${OUTFILE} -c -DHAVE_CONFIG_H ${INCLUDE_DIRS} ${INFILES} ${LINKDEF_FILE} DEPENDS ${INFILES})
-# MESSAGE("ROOT_CINT_EXECUTABLE has created the dictionary ${OUTFILE}")
+# message("ROOT_CINT_EXECUTABLE has created the dictionary ${OUTFILE}")
-ENDMACRO (ROOT_GENERATE_DICTIONARY_OLD)
+endmacro(ROOT_GENERATE_DICTIONARY_OLD)
###########################################
#
#
###########################################
-MACRO (ROOT_GENERATE_DICTIONARY INFILES LINKDEF_FILE OUTFILE INCLUDE_DIRS_IN)
-
+macro(ROOT_GENERATE_DICTIONARY INFILES LINKDEF_FILE OUTFILE INCLUDE_DIRS_IN)
+
set(INCLUDE_DIRS)
foreach (_current_FILE ${INCLUDE_DIRS_IN})
- set(INCLUDE_DIRS ${INCLUDE_DIRS} -I${_current_FILE})
+ set(INCLUDE_DIRS ${INCLUDE_DIRS} -I${_current_FILE})
endforeach (_current_FILE ${INCLUDE_DIRS_IN})
-
-# MESSAGE("INFILES: ${INFILES}")
-# MESSAGE("OutFILE: ${OUTFILE}")
-# MESSAGE("LINKDEF_FILE: ${LINKDEF_FILE}")
-# MESSAGE("INCLUDE_DIRS: ${INCLUDE_DIRS}")
- STRING(REGEX REPLACE "^(.*)\\.(.*)$" "\\1.h" bla "${OUTFILE}")
-# MESSAGE("BLA: ${bla}")
- SET (OUTFILES ${OUTFILE} ${bla})
+# message("INFILES: ${INFILES}")
+# message("OutFILE: ${OUTFILE}")
+# message("LINKDEF_FILE: ${LINKDEF_FILE}")
+# message("INCLUDE_DIRS: ${INCLUDE_DIRS}")
+
+ string(REGEX REPLACE "^(.*)\\.(.*)$" "\\1.h" bla "${OUTFILE}")
+# message("BLA: ${bla}")
+ set(OUTFILES ${OUTFILE} ${bla})
- ADD_CUSTOM_COMMAND(OUTPUT ${OUTFILES}
+ add_custom_command(OUTPUT ${OUTFILES}
COMMAND ${ROOT_CINT_EXECUTABLE}
ARGS -f ${OUTFILE} -c -DHAVE_CONFIG_H ${INCLUDE_DIRS} ${INFILES} ${LINKDEF_FILE} DEPENDS ${INFILES})
-ENDMACRO (ROOT_GENERATE_DICTIONARY)
+endmacro(ROOT_GENERATE_DICTIONARY)
-#MESSAGE("la")
+#message("la")
#=========================================================
#Support for the CTest dashboard testing system
-OPTION(BUILD_TESTING "Build the testing tree" OFF)
-IF (BUILD_TESTING)
- OPTION(CLITK_BUILD_TESTING "Test ITK" ON)
- INCLUDE(CTest)
-ENDIF(BUILD_TESTING)
+option(BUILD_TESTING "Build the testing tree" OFF)
+if(BUILD_TESTING)
+ option(CLITK_BUILD_TESTING "Test ITK" ON)
+ include(CTest)
+endif(BUILD_TESTING)
#=========================================================
#=========================================================
# If the user choose to build documentation, then search for Doxygen executables.
-OPTION(BUILD_DOXYGEN "Build Doxygen Documentation" OFF)
-IF(BUILD_DOXYGEN)
- FIND_PACKAGE(Doxygen)
- ADD_SUBDIRECTORY(${CLITK_SOURCE_DIR}/Doxygen ${PROJECT_BINARY_DIR}/Doxygen)
-ENDIF(BUILD_DOXYGEN)
+option(BUILD_DOXYGEN "Build Doxygen Documentation" OFF)
+if(BUILD_DOXYGEN)
+ find_package(Doxygen)
+ add_subdirectory(${CLITK_SOURCE_DIR}/Doxygen ${PROJECT_BINARY_DIR}/Doxygen)
+endif(BUILD_DOXYGEN)
#=========================================================
# Compilation options
-OPTION(CLITK_EXPERIMENTAL "Enable experimental software and features" OFF)
-OPTION(CLITK_BUILD_TOOLS "Build command-line tools" OFF)
-OPTION(CLITK_BUILD_SEGMENTATION "Build command-line segmentation tools" OFF)
-OPTION(CLITK_BUILD_REGISTRATION "Build command-line registration tools" OFF)
+option(CLITK_EXPERIMENTAL "Enable experimental software and features" OFF)
+option(CLITK_BUILD_TOOLS "Build command-line tools" OFF)
+option(CLITK_BUILD_SEGMENTATION "Build command-line segmentation tools" OFF)
+option(CLITK_BUILD_REGISTRATION "Build command-line registration tools" OFF)
-OPTION(CLITK_BUILD_VV "Build vv the 4D visualizer (requires VTK and QT)" ON)
-IF (CLITK_BUILD_VV)
- ADD_SUBDIRECTORY(${CLITK_SOURCE_DIR}/vv ${PROJECT_BINARY_DIR}/vv)
-ENDIF(CLITK_BUILD_VV)
+option(CLITK_BUILD_VV "Build vv the 4D visualizer (requires VTK and QT)" ON)
+if(CLITK_BUILD_VV)
+ add_subdirectory(${CLITK_SOURCE_DIR}/vv ${PROJECT_BINARY_DIR}/vv)
+endif(CLITK_BUILD_VV)
#=========================================================
# Build test when vv has been compiled
-IF(BUILD_TESTING)
- ADD_SUBDIRECTORY(${CLITK_SOURCE_DIR}/tests ${PROJECT_BINARY_DIR}/tests)
-ENDIF(BUILD_TESTING)
+if(BUILD_TESTING)
+ add_subdirectory(${CLITK_SOURCE_DIR}/tests ${PROJECT_BINARY_DIR}/tests)
+endif(BUILD_TESTING)
#=========================================================
-MACRO (DD in)
- MESSAGE(${in}=${${in}})
-ENDMACRO(DD)
+macro(DD in)
+ message(${in}=${${in}})
+endmacro(DD)
#=========================================================
#=========================================================
endif (NOT CMAKE_BUILD_TYPE)
#=========================================================
-INCLUDE_DIRECTORIES(${CLITK_SOURCE_DIR}/itk
+include_directories(${CLITK_SOURCE_DIR}/itk
${CLITK_SOURCE_DIR}/filters
${CLITK_SOURCE_DIR}/segmentation
${CLITK_SOURCE_DIR}/registration
${CLITK_SOURCE_DIR}/tools
${CLITK_SOURCE_DIR}/common
${PROJECT_BINARY_DIR})
-SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
-SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
-LINK_DIRECTORIES(${PROJECT_BINARY_DIR}/lib)
-INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR}/tools) #For _ggo.h includes from other directories
-INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR}/segmentation) #For _ggo.h includes from other directories
-INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR}/registration) #For _ggo.h includes from other directories
+set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
+set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
+link_directories(${PROJECT_BINARY_DIR}/lib)
+include_directories(${PROJECT_BINARY_DIR}/tools) #For _ggo.h includes from other directories
+include_directories(${PROJECT_BINARY_DIR}/segmentation) #For _ggo.h includes from other directories
+include_directories(${PROJECT_BINARY_DIR}/registration) #For _ggo.h includes from other directories
#=========================================================
#=========================================================
# Building in the source tree is forbidden
-IF(PROJECT_BINARY_DIR STREQUAL ${PROJECT_SOURCE_DIR})
- MESSAGE(FATAL_ERROR "Building in the source tree is not allowed ! Quit; remove the file 'CMakeCache.txt' and the folder 'CMakeFiles' an
+if(PROJECT_BINARY_DIR STREQUAL ${PROJECT_SOURCE_DIR})
+ message(FATAL_ERROR "Building in the source tree is not allowed ! Quit; remove the file 'CMakeCache.txt' and the folder 'CMakeFiles' an
d build outside the sources (for example 'mkdir build ; cmake <CLITK_DIR>'.")
-ENDIF(PROJECT_BINARY_DIR STREQUAL ${PROJECT_SOURCE_DIR})
+endif(PROJECT_BINARY_DIR STREQUAL ${PROJECT_SOURCE_DIR})
#=========================================================
#=========================================================
# Remove some MS Visual c++ flags
-IF(MSVC)
- ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS)
-ENDIF(MSVC)
+if(MSVC)
+ add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS)
+endif(MSVC)
#=========================================================
#=========================================================
# Find ITK (required)
-FIND_PACKAGE(ITK)
-IF(ITK_FOUND)
- INCLUDE("${ITK_USE_FILE}")
-ELSE(ITK_FOUND)
- MESSAGE(FATAL_ERROR "Cannot build without ITK. Please set ITK_DIR.")
-ENDIF(ITK_FOUND)
+find_package(ITK)
+if(ITK_FOUND)
+ include("${ITK_USE_FILE}")
+else(ITK_FOUND)
+ message(FATAL_ERROR "Cannot build without ITK. Please set ITK_DIR.")
+endif(ITK_FOUND)
#=========================================================
#=========================================================
# Find VTK (required)
-FIND_PACKAGE(VTK REQUIRED)
-IF(VTK_FOUND)
- INCLUDE("${VTK_USE_FILE}")
- IF(VTK_VERSION VERSION_LESS 5.8.0)
- SET ( VTK_LIBRARIES
+find_package(VTK REQUIRED)
+if(VTK_FOUND)
+ include("${VTK_USE_FILE}")
+ if(VTK_VERSION VERSION_LESS 5.8.0)
+ set( VTK_LIBRARIES
vtkCommon
vtkRendering
vtkIO
vtkImaging
vtkHybrid
)
- ENDIF(VTK_VERSION VERSION_LESS 5.8.0)
- IF(VTK_VERSION VERSION_LESS 5.6.0)
- SET ( VTK_LIBRARIES
+ endif(VTK_VERSION VERSION_LESS 5.8.0)
+ if(VTK_VERSION VERSION_LESS 5.6.0)
+ set( VTK_LIBRARIES
${VTK_LIBRARIES}
vtkQVTK
)
- ENDIF(VTK_VERSION VERSION_LESS 5.6.0)
-ELSE(VTK_FOUND)
- MESSAGE(FATAL_ERROR "Please set VTK_DIR.")
-ENDIF(VTK_FOUND)
+ endif(VTK_VERSION VERSION_LESS 5.6.0)
+else(VTK_FOUND)
+ message(FATAL_ERROR "Please set VTK_DIR.")
+endif(VTK_FOUND)
#=========================================================
#=========================================================
# Find gengetopt, will create a target exe if not found
-SET(CMAKE_MODULE_PATH "${CLITK_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
-FIND_PACKAGE(Gengetopt)
+set(CMAKE_MODULE_PATH "${CLITK_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
+find_package(Gengetopt)
#=========================================================
#=========================================================
# Find libstatgrab is installed, add clitkMemoryUsage.cxx in the library
-IF (NOT DEFINED CLITK_MEMORY_INFO OR CLITK_MEMORY_INFO)
- FIND_LIBRARY(LIBSTATGRAB NAMES statgrab PATHS)
- IF (${LIBSTATGRAB} MATCHES "LIBSTATGRAB-NOTFOUND")
-# MESSAGE("Install libstatgrab (http://www.i-scream.org/libstatgrab/) for memory usage information")
- SET(CLITK_MEMORY_INFO OFF)
- ELSE (${LIBSTATGRAB} MATCHES "LIBSTATGRAB-NOTFOUND")
- SET(CLITK_MEMORY_INFO ON)
- ENDIF (${LIBSTATGRAB} MATCHES "LIBSTATGRAB-NOTFOUND")
-ENDIF()
+if(NOT DEFINED CLITK_MEMORY_INFO OR CLITK_MEMORY_INFO)
+ find_library(LIBSTATGRAB NAMES statgrab PATHS)
+ if(${LIBSTATGRAB} MATCHES "LIBSTATGRAB-NOTFOUND")
+# message("Install libstatgrab (http://www.i-scream.org/libstatgrab/) for memory usage information")
+ set(CLITK_MEMORY_INFO OFF)
+ else(${LIBSTATGRAB} MATCHES "LIBSTATGRAB-NOTFOUND")
+ set(CLITK_MEMORY_INFO ON)
+ endif(${LIBSTATGRAB} MATCHES "LIBSTATGRAB-NOTFOUND")
+endif()
#=========================================================
#=========================================================
### Check if ITK was compiled with SYSTEM_GDCM = ON
-SET(CLITK_USE_SYSTEM_GDCM FALSE)
-IF(ITK_VERSION_MAJOR LESS "4")
- IF(ITK_USE_SYSTEM_GDCM)
- SET(CLITK_USE_SYSTEM_GDCM TRUE)
- ENDIF(ITK_USE_SYSTEM_GDCM)
-ELSE()
+set(CLITK_USE_SYSTEM_GDCM FALSE)
+if(ITK_VERSION_MAJOR LESS "4")
+ if(ITK_USE_SYSTEM_GDCM)
+ set(CLITK_USE_SYSTEM_GDCM TRUE)
+ endif(ITK_USE_SYSTEM_GDCM)
+else()
# ITK4 creates a target for each gdcm library when it compiles GDCM
get_target_property(GDCMDICTTARG gdcmDICT TYPE )
- IF(NOT GDCMDICTTARG)
- SET(CLITK_USE_SYSTEM_GDCM TRUE)
- ENDIF()
-ENDIF()
+ if(NOT GDCMDICTTARG)
+ set(CLITK_USE_SYSTEM_GDCM TRUE)
+ endif()
+endif()
#=========================================================
# make clitk libraries*
-CONFIGURE_FILE(clitkConfiguration.h.in ${PROJECT_BINARY_DIR}/clitkConfiguration.h)
+configure_file(clitkConfiguration.h.in ${PROJECT_BINARY_DIR}/clitkConfiguration.h)
-SET(clitkCommon_SRC
- clitkCommon.cxx
+set(clitkCommon_SRC
+ clitkCommon.cxx
clitkListOfPair.cxx
clitkTimer.cxx
clitkImageCommon.cxx
clitkIO.cxx
clitkGateAsciiImageIO.cxx
clitkGateAsciiImageIOFactory.cxx
- clitkVoxImageIO.cxx
+ clitkVoxImageIO.cxx
clitkVoxImageIOFactory.cxx
- clitkVfImageIO.cxx
+ clitkVfImageIO.cxx
clitkVfImageIOFactory.cxx
- clitkXdrImageIOReader.cxx
- clitkXdrImageIOWriter.cxx
+ clitkXdrImageIOReader.cxx
+ clitkXdrImageIOWriter.cxx
clitkXdrImageIOFactory.cxx
- rtkHisImageIO.cxx
+ rtkHisImageIO.cxx
rtkHisImageIOFactory.cxx
rtkHndImageIO.cxx
rtkHndImageIOFactory.cxx
rtkImagXImageIO.cxx
rtkImagXImageIOFactory.cxx
rtkImagXXMLFileReader.cxx
- clitkEsrfHstImageIO.cxx
+ clitkEsrfHstImageIO.cxx
clitkEsrfHstImageIOFactory.cxx
clitkEsrfHstXMLFileReader.cxx
clitkDicomRTDoseIO.cxx
vvImageReader.cxx
vvImageWriter.cxx
)
-IF(CLITK_PRIVATE_FEATURES)
- SET(clitkCommon_SRC ${clitkCommon_SRC}
+if(CLITK_PRIVATE_FEATURES)
+ set(clitkCommon_SRC ${clitkCommon_SRC}
${PROJECT_SOURCE_DIR}/private_features/clitkUsfImageIO.cxx
${PROJECT_SOURCE_DIR}/private_features/clitkUsfImageIOFactory.cxx
${PROJECT_SOURCE_DIR}/private_features/clitkUSVoxImageIO.cxx
${PROJECT_SOURCE_DIR}/private_features/clitkSvlImageIO.cxx
${PROJECT_SOURCE_DIR}/private_features/clitkSvlImageIOFactory.cxx
)
-ENDIF(CLITK_PRIVATE_FEATURES)
+endif(CLITK_PRIVATE_FEATURES)
### Declare clitkCommon library
-ADD_LIBRARY(clitkCommon STATIC ${clitkCommon_SRC})
+add_library(clitkCommon STATIC ${clitkCommon_SRC})
-IF(CLITK_MEMORY_INFO)
- TARGET_LINK_LIBRARIES(clitkCommon statgrab)
-ENDIF(CLITK_MEMORY_INFO)
+if(CLITK_MEMORY_INFO)
+ target_link_libraries(clitkCommon statgrab)
+endif(CLITK_MEMORY_INFO)
#=========================================================
-IF (CLITK_USE_SYSTEM_GDCM)
- FIND_PACKAGE(GDCM REQUIRED)
+if(CLITK_USE_SYSTEM_GDCM)
+ find_package(GDCM REQUIRED)
include(${GDCM_USE_FILE})
- TARGET_LINK_LIBRARIES(clitkCommon vtkgdcm gdcmDICT gdcmMSFF)
-ENDIF()
+ target_link_libraries(clitkCommon vtkgdcm gdcmDICT gdcmMSFF)
+endif()
#=========================================================
-TARGET_LINK_LIBRARIES(clitkCommon ${VTK_LIBRARIES} ${ITK_LIBRARIES})
+target_link_libraries(clitkCommon ${VTK_LIBRARIES} ${ITK_LIBRARIES})
-ADD_LIBRARY(clitkDicomRTStruct STATIC
+add_library(clitkDicomRTStruct STATIC
clitkDicomRT_Contour.cxx
clitkDicomRT_ROI.cxx
clitkDicomRT_StructureSet.cxx
clitkDicomRTStruct2ImageFilter.cxx
)
-TARGET_LINK_LIBRARIES(clitkDicomRTStruct clitkCommon)
+target_link_libraries(clitkDicomRTStruct clitkCommon)
-#ADD_LIBRARY(clitkCommonShared SHARED ${clitkCommon_SRC})
-#SET_TARGET_PROPERTIES(clitkCommonShared PROPERTIES COMPILE_FLAGS -fPIC)
+#add_library(clitkCommonShared SHARED ${clitkCommon_SRC})
+#set_target_properties(clitkCommonShared PROPERTIES COMPILE_FLAGS -fPIC)
# Add Libraries used in vv and clitk to avoid recompilation
WRAP_GGO(clitkAffineRegistration_GGO_C clitkAffineRegistration.ggo)
-ADD_LIBRARY(clitkAffineRegistrationLib
+add_library(clitkAffineRegistrationLib
clitkAffineRegistrationGenericFilter.cxx
${clitkAffineRegistration_GGO_C}
clitkLBFGSBOptimizer.cxx
#=========================================================
-IF(CLITK_BUILD_REGISTRATION)
+if(CLITK_BUILD_REGISTRATION)
############################## registration algorithms
- ADD_EXECUTABLE(clitkAffineRegistration clitkAffineRegistration.cxx)
- TARGET_LINK_LIBRARIES(clitkAffineRegistration clitkAffineRegistrationLib clitkCommon)
- SET(REGISTRATION_INSTALL clitkAffineRegistration)
+ add_executable(clitkAffineRegistration clitkAffineRegistration.cxx)
+ target_link_libraries(clitkAffineRegistration clitkAffineRegistrationLib clitkCommon)
+ set(REGISTRATION_INSTALL clitkAffineRegistration)
WRAP_GGO(clitkDemonsDeformableRegistration_GGO_C clitkDemonsDeformableRegistration.ggo)
- ADD_EXECUTABLE(clitkDemonsDeformableRegistration clitkDemonsDeformableRegistration.cxx ${clitkDemonsDeformableRegistration_GGO_C} clitkDemonsDeformableRegistrationGenericFilter.cxx)
- TARGET_LINK_LIBRARIES(clitkDemonsDeformableRegistration clitkCommon)
- SET(REGISTRATION_INSTALL ${REGISTRATION_INSTALL} clitkDemonsDeformableRegistration)
+ add_executable(clitkDemonsDeformableRegistration clitkDemonsDeformableRegistration.cxx ${clitkDemonsDeformableRegistration_GGO_C} clitkDemonsDeformableRegistrationGenericFilter.cxx)
+ target_link_libraries(clitkDemonsDeformableRegistration clitkCommon)
+ set(REGISTRATION_INSTALL ${REGISTRATION_INSTALL} clitkDemonsDeformableRegistration)
WRAP_GGO(clitkBLUTDIR_GGO_C clitkBLUTDIR.ggo)
- ADD_EXECUTABLE(clitkBLUTDIR clitkBLUTDIR.cxx clitkBLUTDIRGenericFilter.cxx ${clitkBLUTDIR_GGO_C} clitkLBFGSBOptimizer.cxx )
- TARGET_LINK_LIBRARIES(clitkBLUTDIR clitkCommon)
- SET(REGISTRATION_INSTALL ${REGISTRATION_INSTALL} clitkBLUTDIR)
+ add_executable(clitkBLUTDIR clitkBLUTDIR.cxx clitkBLUTDIRGenericFilter.cxx ${clitkBLUTDIR_GGO_C} clitkLBFGSBOptimizer.cxx )
+ target_link_libraries(clitkBLUTDIR clitkCommon)
+ set(REGISTRATION_INSTALL ${REGISTRATION_INSTALL} clitkBLUTDIR)
############################## registration-related tools to process points, bsplines, vf and image pyramids
WRAP_GGO(clitkCalculateTRE_GGO_C clitkCalculateTRE.ggo)
- ADD_EXECUTABLE(clitkCalculateTRE clitkCalculateTRE.cxx clitkCalculateTREGenericFilter.cxx ${clitkCalculateTRE_GGO_C})
- TARGET_LINK_LIBRARIES(clitkCalculateTRE clitkCommon)
- SET(REGISTRATION_INSTALL ${REGISTRATION_INSTALL} clitkCalculateTRE)
+ add_executable(clitkCalculateTRE clitkCalculateTRE.cxx clitkCalculateTREGenericFilter.cxx ${clitkCalculateTRE_GGO_C})
+ target_link_libraries(clitkCalculateTRE clitkCommon)
+ set(REGISTRATION_INSTALL ${REGISTRATION_INSTALL} clitkCalculateTRE)
WRAP_GGO(clitkMatrixTransformToVF_GGO_C clitkMatrixTransformToVF.ggo)
- ADD_EXECUTABLE(clitkMatrixTransformToVF clitkMatrixTransformToVF.cxx clitkMatrixTransformToVFGenericFilter.cxx ${clitkMatrixTransformToVF_GGO_C})
- TARGET_LINK_LIBRARIES(clitkMatrixTransformToVF clitkCommon)
- SET(REGISTRATION_INSTALL ${REGISTRATION_INSTALL} clitkMatrixTransformToVF)
+ add_executable(clitkMatrixTransformToVF clitkMatrixTransformToVF.cxx clitkMatrixTransformToVFGenericFilter.cxx ${clitkMatrixTransformToVF_GGO_C})
+ target_link_libraries(clitkMatrixTransformToVF clitkCommon)
+ set(REGISTRATION_INSTALL ${REGISTRATION_INSTALL} clitkMatrixTransformToVF)
WRAP_GGO(clitkConvertBSplineDeformableTransformToVF_GGO_C clitkConvertBSplineDeformableTransformToVF.ggo)
- ADD_EXECUTABLE(clitkConvertBSplineDeformableTransformToVF clitkConvertBSplineDeformableTransformToVF.cxx clitkConvertBSplineDeformableTransformToVFGenericFilter.cxx ${clitkConvertBSplineDeformableTransformToVF_GGO_C})
- TARGET_LINK_LIBRARIES(clitkConvertBSplineDeformableTransformToVF clitkCommon)
- SET(REGISTRATION_INSTALL ${REGISTRATION_INSTALL} clitkConvertBSplineDeformableTransformToVF)
+ add_executable(clitkConvertBSplineDeformableTransformToVF clitkConvertBSplineDeformableTransformToVF.cxx clitkConvertBSplineDeformableTransformToVFGenericFilter.cxx ${clitkConvertBSplineDeformableTransformToVF_GGO_C})
+ target_link_libraries(clitkConvertBSplineDeformableTransformToVF clitkCommon)
+ set(REGISTRATION_INSTALL ${REGISTRATION_INSTALL} clitkConvertBSplineDeformableTransformToVF)
- INSTALL (TARGETS ${REGISTRATION_INSTALL} DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE)
+ install(TARGETS ${REGISTRATION_INSTALL} DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE)
-ENDIF(CLITK_BUILD_REGISTRATION)
+endif(CLITK_BUILD_REGISTRATION)
#=========================================================
# Add Libraries used in vv and clitk to avoid recompilation
-FOREACH(clitkTool clitkExtractLung clitkExtractPatient clitkConnectedComponentLabeling clitkRegionGrowing)
+foreach(clitkTool clitkExtractLung clitkExtractPatient clitkConnectedComponentLabeling clitkRegionGrowing)
WRAP_GGO(${clitkTool}_GGO_C ${clitkTool}.ggo)
- SET(GGO_C_FILES ${GGO_C_FILES} ${${clitkTool}_GGO_C})
-ENDFOREACH(clitkTool)
-ADD_LIBRARY(clitkSegmentationGgoLib
+ set(GGO_C_FILES ${GGO_C_FILES} ${${clitkTool}_GGO_C})
+endforeach(clitkTool)
+add_library(clitkSegmentationGgoLib
clitkFilterWithAnatomicalFeatureDatabaseManagement.cxx
clitkAnatomicalFeatureDatabase.cxx
clitkSliceBySliceRelativePositionFilter_uchar.cxx
#=========================================================
-IF(CLITK_BUILD_SEGMENTATION)
+if(CLITK_BUILD_SEGMENTATION)
WRAP_GGO(clitkConnectedComponentLabeling_GGO_C clitkConnectedComponentLabeling.ggo)
- ADD_EXECUTABLE(clitkConnectedComponentLabeling clitkConnectedComponentLabeling.cxx ${clitkConnectedComponentLabeling_GGO_C})
- TARGET_LINK_LIBRARIES(clitkConnectedComponentLabeling clitkCommon)
- SET(SEGMENTATION_INSTALL clitkConnectedComponentLabeling)
+ add_executable(clitkConnectedComponentLabeling clitkConnectedComponentLabeling.cxx ${clitkConnectedComponentLabeling_GGO_C})
+ target_link_libraries(clitkConnectedComponentLabeling clitkCommon)
+ set(SEGMENTATION_INSTALL clitkConnectedComponentLabeling)
- ADD_EXECUTABLE(clitkExtractPatient clitkExtractPatient.cxx ${clitkExtractPatient_GGO_C})
- TARGET_LINK_LIBRARIES(clitkExtractPatient clitkCommon clitkSegmentationGgoLib)
- SET(SEGMENTATION_INSTALL ${SEGMENTATION_INSTALL} clitkExtractPatient)
+ add_executable(clitkExtractPatient clitkExtractPatient.cxx ${clitkExtractPatient_GGO_C})
+ target_link_libraries(clitkExtractPatient clitkCommon clitkSegmentationGgoLib)
+ set(SEGMENTATION_INSTALL ${SEGMENTATION_INSTALL} clitkExtractPatient)
- ADD_EXECUTABLE(clitkExtractLung clitkExtractLung.cxx ${clitkExtractLung_GGO_C})
- TARGET_LINK_LIBRARIES(clitkExtractLung clitkSegmentationGgoLib clitkCommon)
- SET(SEGMENTATION_INSTALL ${SEGMENTATION_INSTALL} clitkExtractLung)
+ add_executable(clitkExtractLung clitkExtractLung.cxx ${clitkExtractLung_GGO_C})
+ target_link_libraries(clitkExtractLung clitkSegmentationGgoLib clitkCommon)
+ set(SEGMENTATION_INSTALL ${SEGMENTATION_INSTALL} clitkExtractLung)
WRAP_GGO(clitkExtractBones_GGO_C clitkExtractBones.ggo)
- ADD_EXECUTABLE(clitkExtractBones clitkExtractBones.cxx ${clitkExtractBones_GGO_C})
- TARGET_LINK_LIBRARIES(clitkExtractBones clitkCommon clitkSegmentationGgoLib)
- SET(SEGMENTATION_INSTALL ${SEGMENTATION_INSTALL} clitkExtractBones)
+ add_executable(clitkExtractBones clitkExtractBones.cxx ${clitkExtractBones_GGO_C})
+ target_link_libraries(clitkExtractBones clitkCommon clitkSegmentationGgoLib)
+ set(SEGMENTATION_INSTALL ${SEGMENTATION_INSTALL} clitkExtractBones)
WRAP_GGO(clitkMorphoMath_GGO_C clitkMorphoMath.ggo)
- ADD_EXECUTABLE(clitkMorphoMath clitkMorphoMath.cxx ${clitkMorphoMath_GGO_C})
- TARGET_LINK_LIBRARIES(clitkMorphoMath clitkCommon)
- SET(SEGMENTATION_INSTALL ${SEGMENTATION_INSTALL} clitkMorphoMath)
+ add_executable(clitkMorphoMath clitkMorphoMath.cxx ${clitkMorphoMath_GGO_C})
+ target_link_libraries(clitkMorphoMath clitkCommon)
+ set(SEGMENTATION_INSTALL ${SEGMENTATION_INSTALL} clitkMorphoMath)
WRAP_GGO(clitkDecomposeAndReconstruct_GGO_C clitkDecomposeAndReconstruct.ggo)
- ADD_EXECUTABLE(clitkDecomposeAndReconstruct clitkDecomposeAndReconstruct.cxx clitkDecomposeAndReconstructGenericFilter.cxx ${clitkDecomposeAndReconstruct_GGO_C})
- TARGET_LINK_LIBRARIES(clitkDecomposeAndReconstruct clitkCommon)
- SET(SEGMENTATION_INSTALL ${SEGMENTATION_INSTALL} clitkDecomposeAndReconstruct)
+ add_executable(clitkDecomposeAndReconstruct clitkDecomposeAndReconstruct.cxx clitkDecomposeAndReconstructGenericFilter.cxx ${clitkDecomposeAndReconstruct_GGO_C})
+ target_link_libraries(clitkDecomposeAndReconstruct clitkCommon)
+ set(SEGMENTATION_INSTALL ${SEGMENTATION_INSTALL} clitkDecomposeAndReconstruct)
WRAP_GGO(clitkMotionMask_GGO_C clitkMotionMask.ggo)
- ADD_EXECUTABLE(clitkMotionMask clitkMotionMask.cxx clitkMotionMaskGenericFilter.cxx ${clitkMotionMask_GGO_C})
- TARGET_LINK_LIBRARIES(clitkMotionMask clitkCommon)
- SET(SEGMENTATION_INSTALL ${SEGMENTATION_INSTALL} clitkMotionMask)
-
+ add_executable(clitkMotionMask clitkMotionMask.cxx clitkMotionMaskGenericFilter.cxx ${clitkMotionMask_GGO_C})
+ target_link_libraries(clitkMotionMask clitkCommon)
+ set(SEGMENTATION_INSTALL ${SEGMENTATION_INSTALL} clitkMotionMask)
+
WRAP_GGO(clitkRegionGrowing_GGO_C clitkRegionGrowing.ggo)
- ADD_EXECUTABLE(clitkRegionGrowing clitkRegionGrowing.cxx ${clitkRegionGrowing_GGO_C} ${clitkRelativePosition_GGO_C})
- TARGET_LINK_LIBRARIES(clitkRegionGrowing clitkCommon)
+ add_executable(clitkRegionGrowing clitkRegionGrowing.cxx ${clitkRegionGrowing_GGO_C} ${clitkRelativePosition_GGO_C})
+ target_link_libraries(clitkRegionGrowing clitkCommon)
- INSTALL (TARGETS ${SEGMENTATION_INSTALL} DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE)
+ install(TARGETS ${SEGMENTATION_INSTALL} DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE)
-ENDIF(CLITK_BUILD_SEGMENTATION)
+endif(CLITK_BUILD_SEGMENTATION)
-# ADD_EXECUTABLE(ScalarImageMarkovRandomField1 ScalarImageMarkovRandomField1.cxx)
-# TARGET_LINK_LIBRARIES(ScalarImageMarkovRandomField1 clitkCommon ITKStatistics)
-# ADD_EXECUTABLE(ScalarImageKmeansClassifier ScalarImageKmeansClassifier.cxx)
-# TARGET_LINK_LIBRARIES(ScalarImageKmeansClassifier clitkCommon ITKStatistics)
+# add_executable(ScalarImageMarkovRandomField1 ScalarImageMarkovRandomField1.cxx)
+# target_link_libraries(ScalarImageMarkovRandomField1 clitkCommon ITKStatistics)
+# add_executable(ScalarImageKmeansClassifier ScalarImageKmeansClassifier.cxx)
+# target_link_libraries(ScalarImageKmeansClassifier clitkCommon ITKStatistics)
set(build_type ${CMAKE_BUILD_TYPE})
#=========================================================
-MACRO (DD in)
- MESSAGE(${in}=${${in}})
-ENDMACRO(DD)
+macro(DD in)
+ message(${in}=${${in}})
+endmacro(DD)
#=========================================================
project(SuperBuild_VV)
#=========================================================
# QT
if(WIN32)
-SET(QtWinSpecFiles "${source_prefix}/qt/mkspecs/win32-msvc2003/qmake.conf;${source_prefix}/qt/mkspecs/win32-msvc2005/qmake.conf;${source_prefix}/qt/mkspecs/win32-msvc2008/qmake.conf;${source_prefix}/qt/mkspecs/win32-msvc2010/qmake.conf")
+set(QtWinSpecFiles "${source_prefix}/qt/mkspecs/win32-msvc2003/qmake.conf;${source_prefix}/qt/mkspecs/win32-msvc2005/qmake.conf;${source_prefix}/qt/mkspecs/win32-msvc2008/qmake.conf;${source_prefix}/qt/mkspecs/win32-msvc2010/qmake.conf")
set(WINPATCH "sed -i \"s/\\-MD/-MT/g\" ${QtWinSpecFiles}")
else()
set(WINPATCH "")
GIT_TAG v4.8.6
PATCH_COMMAND ${WINPATCH}
CONFIGURE_COMMAND ${source_prefix}/qt/configure -confirm-license
- -static
+ -static
-fast
-opensource
-release
-no-glib
INSTALL_COMMAND ""
)
-SET(qmake_executable "${build_prefix}/QT/bin/qmake")
+set(qmake_executable "${build_prefix}/QT/bin/qmake")
set(VTK_DEPEND_QT QT)
else()
#=========================================================
# VTK
-SET(VTK_CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES}")
-IF(MSVC)
- SET(VTK_CMAKE_CXX_STANDARD_LIBRARIES "${VTK_CMAKE_CXX_STANDARD_LIBRARIES} Imm32.lib Winmm.lib Ws2_32.lib")
-ENDIF(MSVC)
+set(VTK_CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES}")
+if(MSVC)
+ set(VTK_CMAKE_CXX_STANDARD_LIBRARIES "${VTK_CMAKE_CXX_STANDARD_LIBRARIES} Imm32.lib Winmm.lib Ws2_32.lib")
+endif(MSVC)
ExternalProject_Add(
- VTK
+ VTK
DEPENDS ${VTK_DEPEND_QT}
SOURCE_DIR ${source_prefix}/vtk
GIT_REPOSITORY git://vtk.org/VTK.git
-DVTK_USE_QVTK_QTOPENGL:BOOL=ON
-DCMAKE_CXX_STANDARD_LIBRARIES:STRING=${VTK_CMAKE_CXX_STANDARD_LIBRARIES}
)
-SET(VTK_DIR ${build_prefix}/VTK)
+set(VTK_DIR ${build_prefix}/VTK)
#=========================================================
#=========================================================
ExternalProject_Add(
GDCM
SOURCE_DIR ${source_prefix}/gdcm
- GIT_REPOSITORY git://git.code.sf.net/p/gdcm/gdcm
+ GIT_REPOSITORY git://git.code.sf.net/p/gdcm/gdcm
GIT_TAG v2.2.4
INSTALL_COMMAND ""
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=${INSTALL_PREFIX}
-DCMAKE_BUILD_TYPE:STRING=${build_type}
)
-SET(GDCM_DIR ${build_prefix}/GDCM)
+set(GDCM_DIR ${build_prefix}/GDCM)
#=========================================================
#=========================================================
-DBUILD_EXAMPLES:BOOL=OFF
-DBUILD_TESTING:BOOL=OFF
)
-SET(ITK_DIR ${build_prefix}/ITK)
+set(ITK_DIR ${build_prefix}/ITK)
#=========================================================
#=========================================================
# VV
-SET(VV_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
+set(VV_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
if(MSVC)
- SET(VV_CMAKE_CXX_FLAGS "${VV_CMAKE_CXX_FLAGS} /bigobj")
+ set(VV_CMAKE_CXX_FLAGS "${VV_CMAKE_CXX_FLAGS} /bigobj")
endif(MSVC)
-SET(VV_CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS})
+set(VV_CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS})
if(CMAKE_COMPILER_IS_GNUCXX)
- SET(VV_CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++")
+ set(VV_CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++")
endif(CMAKE_COMPILER_IS_GNUCXX)
-SET(MAKE_COMMAND "make")
+set(MAKE_COMMAND "make")
if(MSVC)
- SET(MAKE_COMMAND "nmake")
+ set(MAKE_COMMAND "nmake")
endif(MSVC)
ExternalProject_Add(
SOURCE_DIR ${source_prefix}/vv
GIT_REPOSITORY git://git.creatis.insa-lyon.fr/clitk
INSTALL_DIR ${install_prefix}
- INSTALL_COMMAND make install
+ INSTALL_COMMAND make install
CMAKE_ARGS
-DQT_QMAKE_EXECUTABLE:FILEPATH=${qmake_executable}
-DGDCM_DIR:PATH=${GDCM_DIR}
#=========================================================
#=========================================================
# Data tests path
-FIND_PATH(CLITK_TEST_DATA_PATH Lung3D.mhd)
-IF(NOT ${CLITK_TEST_DATA_PATH} MATCHES "NOTFOUND$")
- SET(CLITK_TEST_DATA_PATH "${CLITK_TEST_DATA_PATH}/")
-ENDIF()
-ADD_DEFINITIONS(-DCLITK_TEST_DATA_PATH="${CLITK_TEST_DATA_PATH}")
+find_path(CLITK_TEST_DATA_PATH Lung3D.mhd)
+if(NOT ${CLITK_TEST_DATA_PATH} MATCHES "NOTFOUND$")
+ set(CLITK_TEST_DATA_PATH "${CLITK_TEST_DATA_PATH}/")
+endif()
+add_definitions(-DCLITK_TEST_DATA_PATH="${CLITK_TEST_DATA_PATH}")
#=========================================================
#=========================================================
-SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/tests/bin)
-SET(BUILDNAME ${CMAKE_SYSTEM_NAME}${CMAKE_OSX_ARCHITECTURES} CACHE INTERNAL DOCSTRING)
+set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/tests/bin)
+set(BUILDNAME ${CMAKE_SYSTEM_NAME}${CMAKE_OSX_ARCHITECTURES} CACHE INTERNAL DOCSTRING)
#=========================================================
#=========================================================
# Enabled options to test
-IF(CLITK_BUILD_TOOLS)
- ADD_SUBDIRECTORY(tools)
-ENDIF()
-#IF(CLITK_BUILD_VV)
-# ADD_SUBDIRECTORY(vv)
-#ENDIF()
-# IF(CLITK_BUILD_SEGMENTATION)
-# ADD_SUBDIRECTORY(segmentation)
-# ENDIF()
-#
-# IF(CLITK_BUILD_REGISTATION)
-# ADD_SUBDIRECTORY(registration)
-# ENDIF()
-#ADD_SUBDIRECTORY(common)
+if(CLITK_BUILD_TOOLS)
+ add_subdirectory(tools)
+endif()
+#if(CLITK_BUILD_VV)
+# add_subdirectory(vv)
+#endif()
+# if(CLITK_BUILD_SEGMENTATION)
+# add_subdirectory(segmentation)
+# endif()
+#
+# if(CLITK_BUILD_REGISTATION)
+# add_subdirectory(registration)
+# endif()
+#add_subdirectory(common)
#=========================================================
${PROJECT_SOURCE_DIR}/tools
)
-SET(BUILDNAME ${BUILDNAME}_tools CACHE INTERNAL DOCSTRING)
-ADD_DEFINITIONS(-DCLITK_TEST_TOOLS_PATH=\"${PROJECT_BINARY_DIR}/bin/\")
-SET (srcs
+set(BUILDNAME ${BUILDNAME}_tools CACHE INTERNAL DOCSTRING)
+add_definitions(-DCLITK_TEST_TOOLS_PATH=\"${PROJECT_BINARY_DIR}/bin/\")
+set(srcs
toolTestRunner.cxx
)
-ADD_EXECUTABLE(toolTestRunner ${srcs})
-TARGET_LINK_LIBRARIES(toolTestRunner ${ITK_LIBRARIES})
-SET(exe ${EXECUTABLE_OUTPUT_PATH}/toolTestRunner)
-SET(p ${CLITK_TEST_DATA_PATH})
+add_executable(toolTestRunner ${srcs})
+target_link_libraries(toolTestRunner ${ITK_LIBRARIES})
+set(exe ${EXECUTABLE_OUTPUT_PATH}/toolTestRunner)
+set(p ${CLITK_TEST_DATA_PATH})
#=========================================================
# clitkImageInfo
-ADD_TEST(clitkImageInfo_4d ${exe} clitkImageInfo ${p}Deformation4D.mhd ${p}Deformation4D_ref.info)
-ADD_TEST(clitkImageInfo_3d ${exe} clitkImageInfo ${p}Lung3D.mhd ${p}Lung3D_ref.info)
+add_test(clitkImageInfo_4d ${exe} clitkImageInfo ${p}Deformation4D.mhd ${p}Deformation4D_ref.info)
+add_test(clitkImageInfo_3d ${exe} clitkImageInfo ${p}Lung3D.mhd ${p}Lung3D_ref.info)
#=========================================================
# clitkGetSpacing
-ADD_TEST(clitkGetSpacing_4d ${exe} clitkGetSpacing -i ${p}Deformation4D.mhd ${p}Deformation4D_ref.spacing)
-ADD_TEST(clitkGetSpacing_3d ${exe} clitkGetSpacing -i ${p}Lung3D.mhd ${p}Lung3D_ref.spacing)
+add_test(clitkGetSpacing_4d ${exe} clitkGetSpacing -i ${p}Deformation4D.mhd ${p}Deformation4D_ref.spacing)
+add_test(clitkGetSpacing_3d ${exe} clitkGetSpacing -i ${p}Lung3D.mhd ${p}Lung3D_ref.spacing)
#=========================================================
# clitkGetOrigin
-ADD_TEST(clitkGetOrigin_4d ${exe} clitkGetOrigin -i ${p}Deformation4D.mhd ${p}Deformation4D_ref.origin)
-ADD_TEST(clitkGetOrigin_3d ${exe} clitkGetOrigin -i ${p}Lung3D.mhd ${p}Lung3D_ref.origin)
+add_test(clitkGetOrigin_4d ${exe} clitkGetOrigin -i ${p}Deformation4D.mhd ${p}Deformation4D_ref.origin)
+add_test(clitkGetOrigin_3d ${exe} clitkGetOrigin -i ${p}Lung3D.mhd ${p}Lung3D_ref.origin)
#=========================================================
# clitkGetSize
-ADD_TEST(clitkGetSize_4d ${exe} clitkGetSize -i ${p}Deformation4D.mhd ${p}Deformation4D_ref.size)
-ADD_TEST(clitkGetSize_3d ${exe} clitkGetSize -i ${p}Lung3D.mhd ${p}Lung3D_ref.size)
+add_test(clitkGetSize_4d ${exe} clitkGetSize -i ${p}Deformation4D.mhd ${p}Deformation4D_ref.size)
+add_test(clitkGetSize_3d ${exe} clitkGetSize -i ${p}Lung3D.mhd ${p}Lung3D_ref.size)
#=========================================================
# clitkGetDirection
-ADD_TEST(clitkGetDirection_4d ${exe} clitkGetDirection -i ${p}Deformation4D.mhd ${p}Deformation4D_ref.direction)
-ADD_TEST(clitkGetDirection_3d ${exe} clitkGetDirection -i ${p}Lung3D.mhd ${p}Lung3D_ref.direction)
+add_test(clitkGetDirection_4d ${exe} clitkGetDirection -i ${p}Deformation4D.mhd ${p}Deformation4D_ref.direction)
+add_test(clitkGetDirection_3d ${exe} clitkGetDirection -i ${p}Lung3D.mhd ${p}Lung3D_ref.direction)
#=========================================================
# clitkBinarize
-ADD_TEST(clitkBinarizeBGl0.1356_4d ${exe} clitkBinarizeImage -i ${p}Deformation4D.mhd --mode BG -l 0.1356 -o Deformation4D_ref.binarizeBGl0.1356.mhd ${p}Deformation4D_ref.binarizeBGl0.1356.mhd)
-ADD_TEST(clitkBinarizeFGl0.1556_3d ${exe} clitkBinarizeImage -i ${p}Lung3D.mhd --mode FG -l 0.1556 -o Lung3D_ref.binarizeFGl0.1556.mhd ${p}Lung3D_ref.binarizeFGl0.1556.mhd)
+add_test(clitkBinarizeBGl0.1356_4d ${exe} clitkBinarizeImage -i ${p}Deformation4D.mhd --mode BG -l 0.1356 -o Deformation4D_ref.binarizeBGl0.1356.mhd ${p}Deformation4D_ref.binarizeBGl0.1356.mhd)
+add_test(clitkBinarizeFGl0.1556_3d ${exe} clitkBinarizeImage -i ${p}Lung3D.mhd --mode FG -l 0.1556 -o Lung3D_ref.binarizeFGl0.1556.mhd ${p}Lung3D_ref.binarizeFGl0.1556.mhd)
#=========================================================
# clitkImageArithm
-ADD_TEST(clitkImageArithm0_3d ${exe} clitkImageArithm -i ${p}Lung3D.mhd -j ${p}Lung3D.mhd -t 0 -o Lung3D_ref.arithm0.mhd ${p}Lung3D_ref.arithm0.mhd)
-ADD_TEST(clitkImageArithm1_3d ${exe} clitkImageArithm -i ${p}Lung3D.mhd -j ${p}Lung3D.mhd -t 1 -o Lung3D_ref.arithm1.mhd ${p}Lung3D_ref.arithm1.mhd)
-ADD_TEST(clitkImageArithm2_3d ${exe} clitkImageArithm -i ${p}Lung3D.mhd -j ${p}Lung3D.mhd -t 2 -o Lung3D_ref.arithm2.mhd ${p}Lung3D_ref.arithm2.mhd)
-ADD_TEST(clitkImageArithm3_3d ${exe} clitkImageArithm -i ${p}Lung3D.mhd -j ${p}Lung3D.mhd -t 3 -o Lung3D_ref.arithm3.mhd ${p}Lung3D_ref.arithm3.mhd)
-ADD_TEST(clitkImageArithm4_3d ${exe} clitkImageArithm -i ${p}Lung3D.mhd -j ${p}Lung3D.mhd -t 4 -o Lung3D_ref.arithm4.mhd ${p}Lung3D_ref.arithm4.mhd)
-ADD_TEST(clitkImageArithm5_3d ${exe} clitkImageArithm -i ${p}Lung3D.mhd -j ${p}Lung3D.mhd -t 5 -o Lung3D_ref.arithm5.mhd ${p}Lung3D_ref.arithm5.mhd)
-ADD_TEST(clitkImageArithm6_3d ${exe} clitkImageArithm -i ${p}Lung3D.mhd -j ${p}Lung3D.mhd -t 6 -o Lung3D_ref.arithm6.mhd ${p}Lung3D_ref.arithm6.mhd)
+add_test(clitkImageArithm0_3d ${exe} clitkImageArithm -i ${p}Lung3D.mhd -j ${p}Lung3D.mhd -t 0 -o Lung3D_ref.arithm0.mhd ${p}Lung3D_ref.arithm0.mhd)
+add_test(clitkImageArithm1_3d ${exe} clitkImageArithm -i ${p}Lung3D.mhd -j ${p}Lung3D.mhd -t 1 -o Lung3D_ref.arithm1.mhd ${p}Lung3D_ref.arithm1.mhd)
+add_test(clitkImageArithm2_3d ${exe} clitkImageArithm -i ${p}Lung3D.mhd -j ${p}Lung3D.mhd -t 2 -o Lung3D_ref.arithm2.mhd ${p}Lung3D_ref.arithm2.mhd)
+add_test(clitkImageArithm3_3d ${exe} clitkImageArithm -i ${p}Lung3D.mhd -j ${p}Lung3D.mhd -t 3 -o Lung3D_ref.arithm3.mhd ${p}Lung3D_ref.arithm3.mhd)
+add_test(clitkImageArithm4_3d ${exe} clitkImageArithm -i ${p}Lung3D.mhd -j ${p}Lung3D.mhd -t 4 -o Lung3D_ref.arithm4.mhd ${p}Lung3D_ref.arithm4.mhd)
+add_test(clitkImageArithm5_3d ${exe} clitkImageArithm -i ${p}Lung3D.mhd -j ${p}Lung3D.mhd -t 5 -o Lung3D_ref.arithm5.mhd ${p}Lung3D_ref.arithm5.mhd)
+add_test(clitkImageArithm6_3d ${exe} clitkImageArithm -i ${p}Lung3D.mhd -j ${p}Lung3D.mhd -t 6 -o Lung3D_ref.arithm6.mhd ${p}Lung3D_ref.arithm6.mhd)
-ADD_TEST(clitkImageArithm0_4d ${exe} clitkImageArithm -i ${p}Deformation4D.mhd -j ${p}Deformation4D.mhd -t 0 -o Deformation4D_ref.arithm0.mhd ${p}Deformation4D_ref.arithm0.mhd)
-ADD_TEST(clitkImageArithm2_4d ${exe} clitkImageArithm -i ${p}Deformation4D.mhd -j ${p}Deformation4D.mhd -t 2 -o Deformation4D_ref.arithm2.mhd ${p}Deformation4D_ref.arithm2.mhd)
+add_test(clitkImageArithm0_4d ${exe} clitkImageArithm -i ${p}Deformation4D.mhd -j ${p}Deformation4D.mhd -t 0 -o Deformation4D_ref.arithm0.mhd ${p}Deformation4D_ref.arithm0.mhd)
+add_test(clitkImageArithm2_4d ${exe} clitkImageArithm -i ${p}Deformation4D.mhd -j ${p}Deformation4D.mhd -t 2 -o Deformation4D_ref.arithm2.mhd ${p}Deformation4D_ref.arithm2.mhd)
#=========================================================
# clitkCropImage
-ADD_TEST(clitkCropImage_3d ${exe} clitkCropImage -i ${p}Lung3D.mhd -b 1,4,0,2,2,3 -o Lung3D_ref.cropImage.1.4.0.2.2.3.mhd ${p}Lung3D_ref.cropImage.1.4.0.2.2.3.mhd)
+add_test(clitkCropImage_3d ${exe} clitkCropImage -i ${p}Lung3D.mhd -b 1,4,0,2,2,3 -o Lung3D_ref.cropImage.1.4.0.2.2.3.mhd ${p}Lung3D_ref.cropImage.1.4.0.2.2.3.mhd)
#=========================================================
#clitkMorphoMath
-ADD_TEST(clitkMorphoMath0_3d ${exe} clitkMorphoMath -i ${p}Lung3D.mhd -o Lung3D_ref.morphoMath.t0.mhd ${p}Lung3D_ref.morphoMath.t0.mhd)
-ADD_TEST(clitkMorphoMath1_3d ${exe} clitkMorphoMath -i ${p}Lung3D.mhd -o Lung3D_ref.morphoMath.t1.mhd ${p}Lung3D_ref.morphoMath.t1.mhd)
-ADD_TEST(clitkMorphoMath2_3d ${exe} clitkMorphoMath -i ${p}Lung3D.mhd -o Lung3D_ref.morphoMath.t2.mhd ${p}Lung3D_ref.morphoMath.t2.mhd)
-ADD_TEST(clitkMorphoMath3_3d ${exe} clitkMorphoMath -i ${p}Lung3D.mhd -o Lung3D_ref.morphoMath.t3.mhd ${p}Lung3D_ref.morphoMath.t3.mhd)
-ADD_TEST(clitkMorphoMath4_3d ${exe} clitkMorphoMath -i ${p}Lung3D.mhd -o Lung3D_ref.morphoMath.t4.mhd ${p}Lung3D_ref.morphoMath.t4.mhd)
-ADD_TEST(clitkMorphoMath5_3d ${exe} clitkMorphoMath -i ${p}Lung3D.mhd -o Lung3D_ref.morphoMath.t5.mhd ${p}Lung3D_ref.morphoMath.t5.mhd)
+add_test(clitkMorphoMath0_3d ${exe} clitkMorphoMath -i ${p}Lung3D.mhd -o Lung3D_ref.morphoMath.t0.mhd ${p}Lung3D_ref.morphoMath.t0.mhd)
+add_test(clitkMorphoMath1_3d ${exe} clitkMorphoMath -i ${p}Lung3D.mhd -o Lung3D_ref.morphoMath.t1.mhd ${p}Lung3D_ref.morphoMath.t1.mhd)
+add_test(clitkMorphoMath2_3d ${exe} clitkMorphoMath -i ${p}Lung3D.mhd -o Lung3D_ref.morphoMath.t2.mhd ${p}Lung3D_ref.morphoMath.t2.mhd)
+add_test(clitkMorphoMath3_3d ${exe} clitkMorphoMath -i ${p}Lung3D.mhd -o Lung3D_ref.morphoMath.t3.mhd ${p}Lung3D_ref.morphoMath.t3.mhd)
+add_test(clitkMorphoMath4_3d ${exe} clitkMorphoMath -i ${p}Lung3D.mhd -o Lung3D_ref.morphoMath.t4.mhd ${p}Lung3D_ref.morphoMath.t4.mhd)
+add_test(clitkMorphoMath5_3d ${exe} clitkMorphoMath -i ${p}Lung3D.mhd -o Lung3D_ref.morphoMath.t5.mhd ${p}Lung3D_ref.morphoMath.t5.mhd)
-ADD_TEST(clitkMorphoMath0_4d ${exe} clitkMorphoMath -i ${p}Deformation4D.mhd -o Deformation4D_ref.morphoMath.t0.mhd ${p}Deformation4D_ref.morphoMath.t0.mhd)
-ADD_TEST(clitkMorphoMath1_4d ${exe} clitkMorphoMath -i ${p}Deformation4D.mhd -o Deformation4D_ref.morphoMath.t1.mhd ${p}Deformation4D_ref.morphoMath.t1.mhd)
-ADD_TEST(clitkMorphoMath2_4d ${exe} clitkMorphoMath -i ${p}Deformation4D.mhd -o Deformation4D_ref.morphoMath.t2.mhd ${p}Deformation4D_ref.morphoMath.t2.mhd)
-ADD_TEST(clitkMorphoMath3_4d ${exe} clitkMorphoMath -i ${p}Deformation4D.mhd -o Deformation4D_ref.morphoMath.t3.mhd ${p}Deformation4D_ref.morphoMath.t3.mhd)
-ADD_TEST(clitkMorphoMath4_4d ${exe} clitkMorphoMath -i ${p}Deformation4D.mhd -o Deformation4D_ref.morphoMath.t4.mhd ${p}Deformation4D_ref.morphoMath.t4.mhd)
-ADD_TEST(clitkMorphoMath5_4d ${exe} clitkMorphoMath -i ${p}Deformation4D.mhd -o Deformation4D_ref.morphoMath.t5.mhd ${p}Deformation4D_ref.morphoMath.t5.mhd)
+add_test(clitkMorphoMath0_4d ${exe} clitkMorphoMath -i ${p}Deformation4D.mhd -o Deformation4D_ref.morphoMath.t0.mhd ${p}Deformation4D_ref.morphoMath.t0.mhd)
+add_test(clitkMorphoMath1_4d ${exe} clitkMorphoMath -i ${p}Deformation4D.mhd -o Deformation4D_ref.morphoMath.t1.mhd ${p}Deformation4D_ref.morphoMath.t1.mhd)
+add_test(clitkMorphoMath2_4d ${exe} clitkMorphoMath -i ${p}Deformation4D.mhd -o Deformation4D_ref.morphoMath.t2.mhd ${p}Deformation4D_ref.morphoMath.t2.mhd)
+add_test(clitkMorphoMath3_4d ${exe} clitkMorphoMath -i ${p}Deformation4D.mhd -o Deformation4D_ref.morphoMath.t3.mhd ${p}Deformation4D_ref.morphoMath.t3.mhd)
+add_test(clitkMorphoMath4_4d ${exe} clitkMorphoMath -i ${p}Deformation4D.mhd -o Deformation4D_ref.morphoMath.t4.mhd ${p}Deformation4D_ref.morphoMath.t4.mhd)
+add_test(clitkMorphoMath5_4d ${exe} clitkMorphoMath -i ${p}Deformation4D.mhd -o Deformation4D_ref.morphoMath.t5.mhd ${p}Deformation4D_ref.morphoMath.t5.mhd)
#=========================================================
#clitkSetBackground
-ADD_TEST(clitkSetBackground_4d ${exe} clitkSetBackground -i ${p}Deformation4D.mhd -m ${p}Deformation4D.mhd -o Deformation4D_ref.setBackground.mhd ${p}Deformation4D_ref.setBackground.mhd)
-ADD_TEST(clitkSetBackground_3d ${exe} clitkSetBackground -i ${p}Lung3D.mhd -m ${p}Lung3D.mhd -o Lung3D_ref.setBackground.mhd ${p}Lung3D_ref.setBackground.mhd)
+add_test(clitkSetBackground_4d ${exe} clitkSetBackground -i ${p}Deformation4D.mhd -m ${p}Deformation4D.mhd -o Deformation4D_ref.setBackground.mhd ${p}Deformation4D_ref.setBackground.mhd)
+add_test(clitkSetBackground_3d ${exe} clitkSetBackground -i ${p}Lung3D.mhd -m ${p}Lung3D.mhd -o Lung3D_ref.setBackground.mhd ${p}Lung3D_ref.setBackground.mhd)
#clitkWarpImage
-ADD_TEST(clitkWarpImage_3d ${exe} clitkWarpImage -i ${p}00-P.mhd --vf ${p}vf50-P_1.mhd -o 00-P_ref.warpImage.mhd ${p}00-P_ref.warpImage.mhd)
+add_test(clitkWarpImage_3d ${exe} clitkWarpImage -i ${p}00-P.mhd --vf ${p}vf50-P_1.mhd -o 00-P_ref.warpImage.mhd ${p}00-P_ref.warpImage.mhd)
-UNSET(exe)
-UNSET(p)
+unset(exe)
+unset(p)
#=========================================================
# Add Libraries used in vv and clitk to avoid recompilation
WRAP_GGO(clitkCropImage_GGO_C clitkCropImage.ggo)
-ADD_LIBRARY(clitkCropImageLib clitkCropImageGenericFilter.cxx ${clitkCropImage_GGO_C})
+add_library(clitkCropImageLib clitkCropImageGenericFilter.cxx ${clitkCropImage_GGO_C})
WRAP_GGO(clitkImageConvert_GGO_C clitkImageConvert.ggo)
-ADD_LIBRARY(clitkImageConvertLib clitkImageConvertGenericFilter.cxx ${clitkImageConvert_GGO_C})
+add_library(clitkImageConvertLib clitkImageConvertGenericFilter.cxx ${clitkImageConvert_GGO_C})
WRAP_GGO(clitkBinarizeImage_GGO_C clitkBinarizeImage.ggo)
-ADD_LIBRARY(clitkBinarizeImageLib clitkBinarizeImageGenericFilter.cxx ${clitkBinarizeImage_GGO_C})
+add_library(clitkBinarizeImageLib clitkBinarizeImageGenericFilter.cxx ${clitkBinarizeImage_GGO_C})
WRAP_GGO(clitkImageArithm_GGO_C clitkImageArithm.ggo)
-ADD_LIBRARY(clitkImageArithmImageLib clitkImageArithmGenericFilter.cxx ${clitkImageArithm_GGO_C})
+add_library(clitkImageArithmImageLib clitkImageArithmGenericFilter.cxx ${clitkImageArithm_GGO_C})
WRAP_GGO(clitkVectorArithm_GGO_C clitkVectorArithm.ggo)
-ADD_LIBRARY(clitkVectorArithmLib clitkVectorArithmGenericFilter.cxx ${clitkVectorArithm_GGO_C})
+add_library(clitkVectorArithmLib clitkVectorArithmGenericFilter.cxx ${clitkVectorArithm_GGO_C})
WRAP_GGO(clitkResampleImage_GGO_C clitkResampleImage.ggo)
-ADD_LIBRARY(clitkResampleImageLib clitkResampleImageGenericFilter.cxx ${clitkResampleImage_GGO_C})
+add_library(clitkResampleImageLib clitkResampleImageGenericFilter.cxx ${clitkResampleImage_GGO_C})
WRAP_GGO(clitkMIP_GGO_C clitkMIP.ggo)
-ADD_LIBRARY(clitkMIPLib clitkMIPGenericFilter.cxx ${clitkMIP_GGO_C})
+add_library(clitkMIPLib clitkMIPGenericFilter.cxx ${clitkMIP_GGO_C})
WRAP_GGO(clitkMedianImageFilter_GGO_C clitkMedianImageFilter.ggo)
-ADD_LIBRARY(clitkMedianImageFilterLib clitkMedianImageGenericFilter.cxx ${clitkMedianImageFilter_GGO_C})
+add_library(clitkMedianImageFilterLib clitkMedianImageGenericFilter.cxx ${clitkMedianImageFilter_GGO_C})
#=========================================================
-IF (CLITK_BUILD_TOOLS)
+if(CLITK_BUILD_TOOLS)
WRAP_GGO(clitkDicomInfo_GGO_C clitkDicomInfo.ggo)
- ADD_EXECUTABLE(clitkDicomInfo clitkDicomInfo.cxx ${clitkDicomInfo_GGO_C})
- TARGET_LINK_LIBRARIES(clitkDicomInfo clitkCommon)
+ add_executable(clitkDicomInfo clitkDicomInfo.cxx ${clitkDicomInfo_GGO_C})
+ target_link_libraries(clitkDicomInfo clitkCommon)
# set_target_properties(clitkDicomInfo
# PROPERTIES
# LINK_INTERFACE_LIBRARIES ""
# )
- SET(TOOLS_INSTALL clitkDicomInfo)
+ set(TOOLS_INSTALL clitkDicomInfo)
WRAP_GGO(clitkDicom2Image_GGO_C clitkDicom2Image.ggo)
- ADD_EXECUTABLE(clitkDicom2Image clitkDicom2Image.cxx ${clitkDicom2Image_GGO_C})
- TARGET_LINK_LIBRARIES(clitkDicom2Image clitkCommon)
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkDicom2Image)
+ add_executable(clitkDicom2Image clitkDicom2Image.cxx ${clitkDicom2Image_GGO_C})
+ target_link_libraries(clitkDicom2Image clitkCommon)
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkDicom2Image)
WRAP_GGO(clitkDicomWave2Text_GGO_C clitkDicomWave2Text.ggo)
- ADD_EXECUTABLE(clitkDicomWave2Text clitkDicomWave2Text.cxx ${clitkDicomWave2Text_GGO_C})
- TARGET_LINK_LIBRARIES(clitkDicomWave2Text clitkCommon)
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkDicomWave2Text)
+ add_executable(clitkDicomWave2Text clitkDicomWave2Text.cxx ${clitkDicomWave2Text_GGO_C})
+ target_link_libraries(clitkDicomWave2Text clitkCommon)
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkDicomWave2Text)
WRAP_GGO(clitkImageInfo_GGO_C clitkImageInfo.ggo)
- ADD_EXECUTABLE(clitkImageInfo clitkImageInfo.cxx ${clitkImageInfo_GGO_C})
- TARGET_LINK_LIBRARIES(clitkImageInfo clitkCommon)
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageInfo)
+ add_executable(clitkImageInfo clitkImageInfo.cxx ${clitkImageInfo_GGO_C})
+ target_link_libraries(clitkImageInfo clitkCommon)
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageInfo)
- ADD_EXECUTABLE(clitkImageConvert clitkImageConvert.cxx)
- TARGET_LINK_LIBRARIES(clitkImageConvert clitkImageConvertLib clitkCommon)
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageConvert)
+ add_executable(clitkImageConvert clitkImageConvert.cxx)
+ target_link_libraries(clitkImageConvert clitkImageConvertLib clitkCommon)
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageConvert)
- ADD_EXECUTABLE(clitkBinarizeImage clitkBinarizeImage.cxx)
- TARGET_LINK_LIBRARIES(clitkBinarizeImage clitkBinarizeImageLib clitkCommon)
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkBinarizeImage)
+ add_executable(clitkBinarizeImage clitkBinarizeImage.cxx)
+ target_link_libraries(clitkBinarizeImage clitkBinarizeImageLib clitkCommon)
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkBinarizeImage)
WRAP_GGO(clitkVFResample_GGO_C clitkVFResample.ggo)
- ADD_EXECUTABLE(clitkVFResample clitkVFResample.cxx clitkVFResampleGenericFilter.cxx ${clitkVFResample_GGO_C})
- TARGET_LINK_LIBRARIES(clitkVFResample clitkCommon)
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkVFResample)
+ add_executable(clitkVFResample clitkVFResample.cxx clitkVFResampleGenericFilter.cxx ${clitkVFResample_GGO_C})
+ target_link_libraries(clitkVFResample clitkCommon)
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkVFResample)
WRAP_GGO(clitkVFInterpolate_GGO_C clitkVFInterpolate.ggo)
- ADD_EXECUTABLE(clitkVFInterpolate clitkVFInterpolate.cxx clitkVFInterpolateGenericFilter.cxx ${clitkVFInterpolate_GGO_C})
- TARGET_LINK_LIBRARIES(clitkVFInterpolate clitkCommon)
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkVFInterpolate)
+ add_executable(clitkVFInterpolate clitkVFInterpolate.cxx clitkVFInterpolateGenericFilter.cxx ${clitkVFInterpolate_GGO_C})
+ target_link_libraries(clitkVFInterpolate clitkCommon)
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkVFInterpolate)
WRAP_GGO(clitkImageCreate_GGO_C clitkImageCreate.ggo)
- ADD_EXECUTABLE(clitkImageCreate clitkImageCreate.cxx ${clitkImageCreate_GGO_C})
- TARGET_LINK_LIBRARIES(clitkImageCreate clitkCommon)
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageCreate)
+ add_executable(clitkImageCreate clitkImageCreate.cxx ${clitkImageCreate_GGO_C})
+ target_link_libraries(clitkImageCreate clitkCommon)
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageCreate)
WRAP_GGO(clitkZeroVF_GGO_C clitkZeroVF.ggo)
- ADD_EXECUTABLE(clitkZeroVF clitkZeroVF.cxx ${clitkZeroVF_GGO_C} clitkZeroVFGenericFilter.cxx)
- TARGET_LINK_LIBRARIES(clitkZeroVF clitkCommon)
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkZeroVF)
+ add_executable(clitkZeroVF clitkZeroVF.cxx ${clitkZeroVF_GGO_C} clitkZeroVFGenericFilter.cxx)
+ target_link_libraries(clitkZeroVF clitkCommon)
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkZeroVF)
WRAP_GGO(clitkSplitImage_GGO_C clitkSplitImage.ggo)
- ADD_EXECUTABLE(clitkSplitImage clitkSplitImage.cxx clitkSplitImageGenericFilter.cxx ${clitkSplitImage_GGO_C})
- TARGET_LINK_LIBRARIES(clitkSplitImage clitkCommon )
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkSplitImage)
+ add_executable(clitkSplitImage clitkSplitImage.cxx clitkSplitImageGenericFilter.cxx ${clitkSplitImage_GGO_C})
+ target_link_libraries(clitkSplitImage clitkCommon )
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkSplitImage)
WRAP_GGO(clitkWriteDicomSeries_GGO_C clitkWriteDicomSeries.ggo)
- ADD_EXECUTABLE(clitkWriteDicomSeries clitkWriteDicomSeries.cxx ${clitkWriteDicomSeries_GGO_C})
- TARGET_LINK_LIBRARIES(clitkWriteDicomSeries clitkCommon )
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkWriteDicomSeries)
+ add_executable(clitkWriteDicomSeries clitkWriteDicomSeries.cxx ${clitkWriteDicomSeries_GGO_C})
+ target_link_libraries(clitkWriteDicomSeries clitkCommon )
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkWriteDicomSeries)
WRAP_GGO(clitkMedianTemporalDimension_GGO_C clitkMedianTemporalDimension.ggo)
- ADD_EXECUTABLE(clitkMedianTemporalDimension clitkMedianTemporalDimension.cxx
+ add_executable(clitkMedianTemporalDimension clitkMedianTemporalDimension.cxx
${clitkMedianTemporalDimension_GGO_C})
- TARGET_LINK_LIBRARIES(clitkMedianTemporalDimension clitkCommon )
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMedianTemporalDimension)
+ target_link_libraries(clitkMedianTemporalDimension clitkCommon )
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMedianTemporalDimension)
WRAP_GGO(clitkWarpImage_GGO_C clitkWarpImage.ggo)
- ADD_EXECUTABLE(clitkWarpImage clitkWarpImage.cxx ${clitkWarpImage_GGO_C} clitkWarpImageGenericFilter.cxx)
- TARGET_LINK_LIBRARIES(clitkWarpImage clitkCommon)
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkWarpImage)
+ add_executable(clitkWarpImage clitkWarpImage.cxx ${clitkWarpImage_GGO_C} clitkWarpImageGenericFilter.cxx)
+ target_link_libraries(clitkWarpImage clitkCommon)
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkWarpImage)
WRAP_GGO(clitkInvertVF_GGO_C clitkInvertVF.ggo)
- ADD_EXECUTABLE(clitkInvertVF clitkInvertVF.cxx ${clitkInvertVF_GGO_C})
- TARGET_LINK_LIBRARIES(clitkInvertVF clitkCommon)
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkInvertVF)
+ add_executable(clitkInvertVF clitkInvertVF.cxx ${clitkInvertVF_GGO_C})
+ target_link_libraries(clitkInvertVF clitkCommon)
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkInvertVF)
WRAP_GGO(clitkAffineTransform_GGO_C clitkAffineTransform.ggo)
- ADD_EXECUTABLE(clitkAffineTransform clitkAffineTransform.cxx ${clitkAffineTransform_GGO_C})
- TARGET_LINK_LIBRARIES(clitkAffineTransform clitkCommon )
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkAffineTransform)
+ add_executable(clitkAffineTransform clitkAffineTransform.cxx ${clitkAffineTransform_GGO_C})
+ target_link_libraries(clitkAffineTransform clitkCommon )
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkAffineTransform)
WRAP_GGO(clitkElastixTransformToMatrix_GGO_C clitkElastixTransformToMatrix.ggo)
- ADD_EXECUTABLE(clitkElastixTransformToMatrix clitkElastixTransformToMatrix.cxx ${clitkElastixTransformToMatrix_GGO_C})
- TARGET_LINK_LIBRARIES(clitkElastixTransformToMatrix clitkCommon )
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkElastixTransformToMatrix)
+ add_executable(clitkElastixTransformToMatrix clitkElastixTransformToMatrix.cxx ${clitkElastixTransformToMatrix_GGO_C})
+ target_link_libraries(clitkElastixTransformToMatrix clitkCommon )
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkElastixTransformToMatrix)
WRAP_GGO(clitkMatrixToElastixTransform_GGO_C clitkMatrixToElastixTransform.ggo)
- ADD_EXECUTABLE(clitkMatrixToElastixTransform clitkMatrixToElastixTransform.cxx ${clitkMatrixToElastixTransform_GGO_C})
- TARGET_LINK_LIBRARIES(clitkMatrixToElastixTransform clitkCommon )
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMatrixToElastixTransform)
+ add_executable(clitkMatrixToElastixTransform clitkMatrixToElastixTransform.cxx ${clitkMatrixToElastixTransform_GGO_C})
+ target_link_libraries(clitkMatrixToElastixTransform clitkCommon )
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMatrixToElastixTransform)
WRAP_GGO(clitkMatrixMultiply_GGO_C clitkMatrixMultiply.ggo)
- ADD_EXECUTABLE(clitkMatrixMultiply clitkMatrixMultiply.cxx ${clitkMatrixMultiply_GGO_C})
- TARGET_LINK_LIBRARIES(clitkMatrixMultiply clitkCommon )
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMatrixMultiply)
+ add_executable(clitkMatrixMultiply clitkMatrixMultiply.cxx ${clitkMatrixMultiply_GGO_C})
+ target_link_libraries(clitkMatrixMultiply clitkCommon )
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMatrixMultiply)
WRAP_GGO(clitkMatrixInverse_GGO_C clitkMatrixInverse.ggo)
- ADD_EXECUTABLE(clitkMatrixInverse clitkMatrixInverse.cxx ${clitkMatrixInverse_GGO_C})
- TARGET_LINK_LIBRARIES(clitkMatrixInverse clitkCommon )
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMatrixInverse)
+ add_executable(clitkMatrixInverse clitkMatrixInverse.cxx ${clitkMatrixInverse_GGO_C})
+ target_link_libraries(clitkMatrixInverse clitkCommon )
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMatrixInverse)
WRAP_GGO(clitkSetBackground_GGO_C clitkSetBackground.ggo)
- ADD_EXECUTABLE(clitkSetBackground clitkSetBackground.cxx clitkSetBackgroundGenericFilter.cxx ${clitkSetBackground_GGO_C})
- TARGET_LINK_LIBRARIES(clitkSetBackground clitkCommon)
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkSetBackground)
+ add_executable(clitkSetBackground clitkSetBackground.cxx clitkSetBackgroundGenericFilter.cxx ${clitkSetBackground_GGO_C})
+ target_link_libraries(clitkSetBackground clitkCommon)
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkSetBackground)
WRAP_GGO(clitkGammaIndex_GGO_C clitkGammaIndex.ggo)
- ADD_EXECUTABLE(clitkGammaIndex clitkGammaIndex.cxx ${clitkGammaIndex_GGO_C})
- TARGET_LINK_LIBRARIES(clitkGammaIndex clitkCommon)
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkGammaIndex)
+ add_executable(clitkGammaIndex clitkGammaIndex.cxx ${clitkGammaIndex_GGO_C})
+ target_link_libraries(clitkGammaIndex clitkCommon)
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkGammaIndex)
- ADD_EXECUTABLE(clitkImageArithm clitkImageArithm.cxx)
- TARGET_LINK_LIBRARIES(clitkImageArithm clitkImageArithmImageLib clitkCommon )
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageArithm)
+ add_executable(clitkImageArithm clitkImageArithm.cxx)
+ target_link_libraries(clitkImageArithm clitkImageArithmImageLib clitkCommon )
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageArithm)
- ADD_EXECUTABLE(clitkVectorArithm clitkVectorArithm.cxx)
- TARGET_LINK_LIBRARIES(clitkVectorArithm clitkVectorArithmLib clitkCommon )
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkVectorArithm)
+ add_executable(clitkVectorArithm clitkVectorArithm.cxx)
+ target_link_libraries(clitkVectorArithm clitkVectorArithmLib clitkCommon )
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkVectorArithm)
WRAP_GGO(clitkUnsharpMask_GGO_C clitkUnsharpMask.ggo)
- ADD_EXECUTABLE(clitkUnsharpMask clitkUnsharpMask.cxx ${clitkUnsharpMask_GGO_C})
- TARGET_LINK_LIBRARIES(clitkUnsharpMask clitkCommon )
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkUnsharpMask)
+ add_executable(clitkUnsharpMask clitkUnsharpMask.cxx ${clitkUnsharpMask_GGO_C})
+ target_link_libraries(clitkUnsharpMask clitkCommon )
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkUnsharpMask)
WRAP_GGO(clitkFooImage_GGO_C clitkFooImage.ggo)
- ADD_EXECUTABLE(clitkFooImage clitkFooImage.cxx ${clitkFooImage_GGO_C})
- TARGET_LINK_LIBRARIES(clitkFooImage clitkCommon )
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkFooImage)
+ add_executable(clitkFooImage clitkFooImage.cxx ${clitkFooImage_GGO_C})
+ target_link_libraries(clitkFooImage clitkCommon )
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkFooImage)
WRAP_GGO(clitkMedianImageFilter_GGO_C clitkMedianImageFilter.ggo)
- ADD_EXECUTABLE(clitkMedianImageFilter clitkMedianImageFilter.cxx ${clitkMedianImageFilter_GGO_C})
- TARGET_LINK_LIBRARIES(clitkMedianImageFilter clitkMedianImageFilterLib clitkCommon)
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMedianImageFilter)
+ add_executable(clitkMedianImageFilter clitkMedianImageFilter.cxx ${clitkMedianImageFilter_GGO_C})
+ target_link_libraries(clitkMedianImageFilter clitkMedianImageFilterLib clitkCommon)
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMedianImageFilter)
- ADD_EXECUTABLE(clitkResampleImage clitkResampleImage.cxx)
- TARGET_LINK_LIBRARIES(clitkResampleImage clitkResampleImageLib clitkCommon)
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkResampleImage)
+ add_executable(clitkResampleImage clitkResampleImage.cxx)
+ target_link_libraries(clitkResampleImage clitkResampleImageLib clitkCommon)
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkResampleImage)
WRAP_GGO(clitkMinMaxMask_GGO_C clitkMinMaxMask.ggo)
- ADD_EXECUTABLE(clitkMinMaxMask clitkMinMaxMask.cxx ${clitkMinMaxMask_GGO_C})
- TARGET_LINK_LIBRARIES(clitkMinMaxMask clitkCommon )
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMinMaxMask)
+ add_executable(clitkMinMaxMask clitkMinMaxMask.cxx ${clitkMinMaxMask_GGO_C})
+ target_link_libraries(clitkMinMaxMask clitkCommon )
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMinMaxMask)
WRAP_GGO(clitkAutoCrop_GGO_C clitkAutoCrop.ggo)
- ADD_EXECUTABLE(clitkAutoCrop clitkAutoCrop.cxx ${clitkAutoCrop_GGO_C})
- TARGET_LINK_LIBRARIES(clitkAutoCrop clitkCommon )
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkAutoCrop)
+ add_executable(clitkAutoCrop clitkAutoCrop.cxx ${clitkAutoCrop_GGO_C})
+ target_link_libraries(clitkAutoCrop clitkCommon )
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkAutoCrop)
WRAP_GGO(clitkDicomRTStruct2Image_GGO_C clitkDicomRTStruct2Image.ggo)
- ADD_EXECUTABLE(clitkDicomRTStruct2Image clitkDicomRTStruct2Image.cxx ${clitkDicomRTStruct2Image_GGO_C})
- TARGET_LINK_LIBRARIES(clitkDicomRTStruct2Image clitkDicomRTStruct)
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkDicomRTStruct2Image)
+ add_executable(clitkDicomRTStruct2Image clitkDicomRTStruct2Image.cxx ${clitkDicomRTStruct2Image_GGO_C})
+ target_link_libraries(clitkDicomRTStruct2Image clitkDicomRTStruct)
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkDicomRTStruct2Image)
- IF(CLITK_USE_SYSTEM_GDCM)
+ if(CLITK_USE_SYSTEM_GDCM)
WRAP_GGO(clitkImage2DicomRTStruct_GGO_C clitkImage2DicomRTStruct.ggo)
- ADD_EXECUTABLE(clitkImage2DicomRTStruct clitkImage2DicomRTStruct.cxx ${clitkImage2DicomRTStruct_GGO_C})
- TARGET_LINK_LIBRARIES(clitkImage2DicomRTStruct clitkDicomRTStruct)
- ENDIF()
+ add_executable(clitkImage2DicomRTStruct clitkImage2DicomRTStruct.cxx ${clitkImage2DicomRTStruct_GGO_C})
+ target_link_libraries(clitkImage2DicomRTStruct clitkDicomRTStruct)
+ endif()
WRAP_GGO(clitkComposeVF_GGO_C clitkComposeVF.ggo)
- ADD_EXECUTABLE(clitkComposeVF clitkComposeVFGenericFilter.cxx clitkComposeVF.cxx ${clitkComposeVF_GGO_C})
- TARGET_LINK_LIBRARIES(clitkComposeVF clitkCommon )
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkComposeVF)
+ add_executable(clitkComposeVF clitkComposeVFGenericFilter.cxx clitkComposeVF.cxx ${clitkComposeVF_GGO_C})
+ target_link_libraries(clitkComposeVF clitkCommon )
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkComposeVF)
WRAP_GGO(clitkMergeSequence_GGO_C clitkMergeSequence.ggo)
- ADD_EXECUTABLE(clitkMergeSequence clitkMergeSequence.cxx clitkMergeSequenceGenericFilter.cxx ${clitkMergeSequence_GGO_C})
- TARGET_LINK_LIBRARIES(clitkMergeSequence clitkCommon)
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMergeSequence)
+ add_executable(clitkMergeSequence clitkMergeSequence.cxx clitkMergeSequenceGenericFilter.cxx ${clitkMergeSequence_GGO_C})
+ target_link_libraries(clitkMergeSequence clitkCommon)
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMergeSequence)
WRAP_GGO(clitkBackProjectImage_GGO_C clitkBackProjectImage.ggo)
- ADD_EXECUTABLE(clitkBackProjectImage clitkBackProjectImage.cxx clitkBackProjectImageGenericFilter.cxx ${clitkBackProjectImage_GGO_C})
- TARGET_LINK_LIBRARIES(clitkBackProjectImage clitkCommon)
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkBackProjectImage)
+ add_executable(clitkBackProjectImage clitkBackProjectImage.cxx clitkBackProjectImageGenericFilter.cxx ${clitkBackProjectImage_GGO_C})
+ target_link_libraries(clitkBackProjectImage clitkCommon)
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkBackProjectImage)
- ADD_EXECUTABLE(clitkCropImage clitkCropImage.cxx ${clitkCropImage_GGO_C})
- TARGET_LINK_LIBRARIES(clitkCropImage clitkCropImageLib clitkCommon)
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkCropImage)
+ add_executable(clitkCropImage clitkCropImage.cxx ${clitkCropImage_GGO_C})
+ target_link_libraries(clitkCropImage clitkCropImageLib clitkCommon)
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkCropImage)
# WRAP_GGO(clitkExtractSlice_GGO_C clitkExtractSlice.ggo)
- # ADD_EXECUTABLE(clitkExtractSlice clitkExtractSlice.cxx clitkExtractSliceGenericFilter.cxx ${clitkExtractSlice_GGO_C})
- # TARGET_LINK_LIBRARIES(clitkExtractSlice clitkCommon)
- #SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkExtractSlice)
+ # add_executable(clitkExtractSlice clitkExtractSlice.cxx clitkExtractSliceGenericFilter.cxx ${clitkExtractSlice_GGO_C})
+ # target_link_libraries(clitkExtractSlice clitkCommon)
+ #set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkExtractSlice)
WRAP_GGO(clitkFlipImage_GGO_C clitkFlipImage.ggo)
- ADD_EXECUTABLE(clitkFlipImage clitkFlipImage.cxx clitkFlipImageGenericFilter.cxx ${clitkFlipImage_GGO_C})
- TARGET_LINK_LIBRARIES(clitkFlipImage clitkCommon)
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkFlipImage)
+ add_executable(clitkFlipImage clitkFlipImage.cxx clitkFlipImageGenericFilter.cxx ${clitkFlipImage_GGO_C})
+ target_link_libraries(clitkFlipImage clitkCommon)
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkFlipImage)
WRAP_GGO(clitkMirrorPadImage_GGO_C clitkMirrorPadImage.ggo)
- ADD_EXECUTABLE(clitkMirrorPadImage clitkMirrorPadImage.cxx clitkMirrorPadImageGenericFilter.cxx ${clitkMirrorPadImage_GGO_C})
- TARGET_LINK_LIBRARIES(clitkMirrorPadImage clitkCommon)
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMirrorPadImage)
+ add_executable(clitkMirrorPadImage clitkMirrorPadImage.cxx clitkMirrorPadImageGenericFilter.cxx ${clitkMirrorPadImage_GGO_C})
+ target_link_libraries(clitkMirrorPadImage clitkCommon)
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMirrorPadImage)
WRAP_GGO(clitkImageMoment_GGO_C clitkImageMoment.ggo)
- ADD_EXECUTABLE(clitkImageMoment clitkImageMoment.cxx clitkImageMomentGenericFilter.cxx ${clitkImageMoment_GGO_C})
- TARGET_LINK_LIBRARIES(clitkImageMoment clitkCommon)
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageMoment)
+ add_executable(clitkImageMoment clitkImageMoment.cxx clitkImageMomentGenericFilter.cxx ${clitkImageMoment_GGO_C})
+ target_link_libraries(clitkImageMoment clitkCommon)
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageMoment)
WRAP_GGO(clitkImageStatistics_GGO_C clitkImageStatistics.ggo)
- ADD_EXECUTABLE(clitkImageStatistics clitkImageStatistics.cxx clitkImageStatisticsGenericFilter.cxx ${clitkImageStatistics_GGO_C})
- TARGET_LINK_LIBRARIES(clitkImageStatistics clitkCommon)
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageStatistics)
+ add_executable(clitkImageStatistics clitkImageStatistics.cxx clitkImageStatisticsGenericFilter.cxx ${clitkImageStatistics_GGO_C})
+ target_link_libraries(clitkImageStatistics clitkCommon)
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageStatistics)
WRAP_GGO(clitkDVH_GGO_C clitkDVH.ggo)
- ADD_EXECUTABLE(clitkDVH clitkDVH.cxx clitkDVHGenericFilter.cxx ${clitkDVH_GGO_C})
- TARGET_LINK_LIBRARIES(clitkDVH clitkVectorArithmLib clitkCommon)
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkDVH)
+ add_executable(clitkDVH clitkDVH.cxx clitkDVHGenericFilter.cxx ${clitkDVH_GGO_C})
+ target_link_libraries(clitkDVH clitkVectorArithmLib clitkCommon)
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkDVH)
WRAP_GGO(clitkVFConvert_GGO_C clitkVFConvert.ggo)
- ADD_EXECUTABLE(clitkVFConvert clitkVFConvert.cxx clitkVFConvertGenericFilter.cxx ${clitkVFConvert_GGO_C})
- TARGET_LINK_LIBRARIES(clitkVFConvert clitkCommon )
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkVFConvert)
+ add_executable(clitkVFConvert clitkVFConvert.cxx clitkVFConvertGenericFilter.cxx ${clitkVFConvert_GGO_C})
+ target_link_libraries(clitkVFConvert clitkCommon )
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkVFConvert)
WRAP_GGO(clitkImageToVectorImage_GGO_C clitkImageToVectorImage.ggo)
- ADD_EXECUTABLE(clitkImageToVectorImage clitkImageToVectorImage.cxx clitkImageToVectorImageGenericFilter.cxx ${clitkImageToVectorImage_GGO_C})
- TARGET_LINK_LIBRARIES(clitkImageToVectorImage clitkCommon)
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageToVectorImage)
+ add_executable(clitkImageToVectorImage clitkImageToVectorImage.cxx clitkImageToVectorImageGenericFilter.cxx ${clitkImageToVectorImage_GGO_C})
+ target_link_libraries(clitkImageToVectorImage clitkCommon)
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageToVectorImage)
WRAP_GGO(clitkVectorImageToImage_GGO_C clitkVectorImageToImage.ggo)
- ADD_EXECUTABLE(clitkVectorImageToImage clitkVectorImageToImage.cxx clitkVectorImageToImageGenericFilter.cxx ${clitkVectorImageToImage_GGO_C})
- TARGET_LINK_LIBRARIES(clitkVectorImageToImage clitkCommon)
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkVectorImageToImage)
+ add_executable(clitkVectorImageToImage clitkVectorImageToImage.cxx clitkVectorImageToImageGenericFilter.cxx ${clitkVectorImageToImage_GGO_C})
+ target_link_libraries(clitkVectorImageToImage clitkCommon)
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkVectorImageToImage)
- ADD_EXECUTABLE(clitkMIP clitkMIP.cxx clitkMIPGenericFilter.cxx)
- TARGET_LINK_LIBRARIES(clitkMIP clitkMIPLib clitkCommon)
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMIP)
+ add_executable(clitkMIP clitkMIP.cxx clitkMIPGenericFilter.cxx)
+ target_link_libraries(clitkMIP clitkMIPLib clitkCommon)
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMIP)
WRAP_GGO(clitkTransformLandmarks_GGO_C clitkTransformLandmarks.ggo)
- ADD_EXECUTABLE(clitkTransformLandmarks clitkTransformLandmarks.cxx ${clitkTransformLandmarks_GGO_C})
- TARGET_LINK_LIBRARIES(clitkTransformLandmarks clitkCommon)
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkTransformLandmarks)
+ add_executable(clitkTransformLandmarks clitkTransformLandmarks.cxx ${clitkTransformLandmarks_GGO_C})
+ target_link_libraries(clitkTransformLandmarks clitkCommon)
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkTransformLandmarks)
WRAP_GGO(clitkMaskLandmarks_GGO_C clitkMaskLandmarks.ggo)
- ADD_EXECUTABLE(clitkMaskLandmarks clitkMaskLandmarks.cxx ${clitkMaskLandmarks_GGO_C})
- TARGET_LINK_LIBRARIES(clitkMaskLandmarks clitkCommon)
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMaskLandmarks)
+ add_executable(clitkMaskLandmarks clitkMaskLandmarks.cxx ${clitkMaskLandmarks_GGO_C})
+ target_link_libraries(clitkMaskLandmarks clitkCommon)
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMaskLandmarks)
WRAP_GGO(clitkJacobianImage_GGO_C clitkJacobianImage.ggo)
- ADD_EXECUTABLE(clitkJacobianImage clitkJacobianImage.cxx clitkJacobianImageGenericFilter.cxx ${clitkJacobianImage_GGO_C})
- TARGET_LINK_LIBRARIES(clitkJacobianImage clitkCommon)
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkJacobianImage)
+ add_executable(clitkJacobianImage clitkJacobianImage.cxx clitkJacobianImageGenericFilter.cxx ${clitkJacobianImage_GGO_C})
+ target_link_libraries(clitkJacobianImage clitkCommon)
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkJacobianImage)
WRAP_GGO(clitkPadImage_GGO_C clitkPadImage.ggo)
- ADD_EXECUTABLE(clitkPadImage clitkPadImage.cxx clitkPadImageGenericFilter.cxx ${clitkPadImage_GGO_C})
- TARGET_LINK_LIBRARIES(clitkPadImage clitkCommon)
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkPadImage)
+ add_executable(clitkPadImage clitkPadImage.cxx clitkPadImageGenericFilter.cxx ${clitkPadImage_GGO_C})
+ target_link_libraries(clitkPadImage clitkCommon)
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkPadImage)
WRAP_GGO(clitkCatImage_GGO_C clitkCatImage.ggo)
- ADD_EXECUTABLE(clitkCatImage clitkCatImage.cxx ${clitkCatImage_GGO_C})
- TARGET_LINK_LIBRARIES(clitkCatImage clitkCommon)
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkCatImage)
+ add_executable(clitkCatImage clitkCatImage.cxx ${clitkCatImage_GGO_C})
+ target_link_libraries(clitkCatImage clitkCommon)
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkCatImage)
WRAP_GGO(clitkAnisotropicDiffusion_GGO_C clitkAnisotropicDiffusion.ggo)
- ADD_EXECUTABLE(clitkAnisotropicDiffusion clitkAnisotropicDiffusion.cxx
+ add_executable(clitkAnisotropicDiffusion clitkAnisotropicDiffusion.cxx
clitkAnisotropicDiffusionGenericFilter.cxx
${clitkAnisotropicDiffusion_GGO_C})
- TARGET_LINK_LIBRARIES(clitkAnisotropicDiffusion clitkCommon)
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkAnisotropicDiffusion)
+ target_link_libraries(clitkAnisotropicDiffusion clitkCommon)
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkAnisotropicDiffusion)
WRAP_GGO(clitkChangeImageInfo_GGO_C clitkChangeImageInfo.ggo)
- ADD_EXECUTABLE(clitkChangeImageInfo clitkChangeImageInfo.cxx
+ add_executable(clitkChangeImageInfo clitkChangeImageInfo.cxx
clitkChangeImageInfoGenericFilter.cxx
${clitkChangeImageInfo_GGO_C})
- TARGET_LINK_LIBRARIES(clitkChangeImageInfo clitkCommon)
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkChangeImageInfo)
+ target_link_libraries(clitkChangeImageInfo clitkCommon)
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkChangeImageInfo)
WRAP_GGO(clitkMergeAsciiDoseActor_GGO_C clitkMergeAsciiDoseActor.ggo)
- ADD_EXECUTABLE(clitkMergeAsciiDoseActor clitkMergeAsciiDoseActor.cxx ${clitkMergeAsciiDoseActor_GGO_C})
- TARGET_LINK_LIBRARIES(clitkMergeAsciiDoseActor ITKCommon clitkCommon)
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMergeAsciiDoseActor)
+ add_executable(clitkMergeAsciiDoseActor clitkMergeAsciiDoseActor.cxx ${clitkMergeAsciiDoseActor_GGO_C})
+ target_link_libraries(clitkMergeAsciiDoseActor ITKCommon clitkCommon)
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMergeAsciiDoseActor)
WRAP_GGO(clitkImageUncertainty_GGO_C clitkImageUncertainty.ggo)
- ADD_EXECUTABLE(clitkImageUncertainty clitkImageUncertainty.cxx clitkImageUncertainty_ggo.c)
- TARGET_LINK_LIBRARIES(clitkImageUncertainty clitkCommon ${ITK_LIBRARIES})
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageUncertainty)
+ add_executable(clitkImageUncertainty clitkImageUncertainty.cxx clitkImageUncertainty_ggo.c)
+ target_link_libraries(clitkImageUncertainty clitkCommon ${ITK_LIBRARIES})
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageUncertainty)
WRAP_GGO(clitkNormalizeImageFilter_GGO_C clitkNormalizeImageFilter.ggo)
- ADD_EXECUTABLE(clitkNormalizeImageFilter clitkNormalizeImageFilter.cxx ${clitkNormalizeImageFilter_GGO_C})
- TARGET_LINK_LIBRARIES(clitkNormalizeImageFilter clitkCommon )
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkNormalizeImageFilter)
+ add_executable(clitkNormalizeImageFilter clitkNormalizeImageFilter.cxx ${clitkNormalizeImageFilter_GGO_C})
+ target_link_libraries(clitkNormalizeImageFilter clitkCommon )
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkNormalizeImageFilter)
WRAP_GGO(clitkImageGradientMagnitude_GGO_C clitkImageGradientMagnitude.ggo)
- ADD_EXECUTABLE(clitkImageGradientMagnitude clitkImageGradientMagnitude.cxx ${clitkImageGradientMagnitude_GGO_C})
- TARGET_LINK_LIBRARIES(clitkImageGradientMagnitude clitkCommon )
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageGradientMagnitude)
+ add_executable(clitkImageGradientMagnitude clitkImageGradientMagnitude.cxx ${clitkImageGradientMagnitude_GGO_C})
+ target_link_libraries(clitkImageGradientMagnitude clitkCommon )
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageGradientMagnitude)
WRAP_GGO(clitkImageLaplacian_GGO_C clitkImageLaplacian.ggo)
- ADD_EXECUTABLE(clitkImageLaplacian clitkImageLaplacian.cxx ${clitkImageLaplacian_GGO_C})
- TARGET_LINK_LIBRARIES(clitkImageLaplacian clitkCommon )
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageLaplacian)
+ add_executable(clitkImageLaplacian clitkImageLaplacian.cxx ${clitkImageLaplacian_GGO_C})
+ target_link_libraries(clitkImageLaplacian clitkCommon )
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageLaplacian)
WRAP_GGO(clitkImageIntensityWindowing_GGO_C clitkImageIntensityWindowing.ggo)
- ADD_EXECUTABLE(clitkImageIntensityWindowing clitkImageIntensityWindowing.cxx ${clitkImageIntensityWindowing_GGO_C})
- TARGET_LINK_LIBRARIES(clitkImageIntensityWindowing clitkCommon )
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageIntensityWindowing)
+ add_executable(clitkImageIntensityWindowing clitkImageIntensityWindowing.cxx ${clitkImageIntensityWindowing_GGO_C})
+ target_link_libraries(clitkImageIntensityWindowing clitkCommon )
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageIntensityWindowing)
WRAP_GGO(clitkBlurImage_GGO_C clitkBlurImage.ggo)
- ADD_EXECUTABLE(clitkBlurImage clitkBlurImage.cxx ${clitkBlurImage_GGO_C})
- TARGET_LINK_LIBRARIES(clitkBlurImage clitkCommon )
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkBlurImage)
+ add_executable(clitkBlurImage clitkBlurImage.cxx ${clitkBlurImage_GGO_C})
+ target_link_libraries(clitkBlurImage clitkCommon )
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkBlurImage)
#=========================================================
option(CLITK_USE_ROOT "Build experimental tools using root" OFF)
if (CLITK_USE_ROOT)
- FIND_PACKAGE(ROOT REQUIRED)
+ find_package(ROOT REQUIRED)
if(ROOT_FOUND)
- MESSAGE(STATUS "ROOT found : ${ROOT_LIBRARY_DIR} ${ROOT_INCLUDE_DIR} ${ROOT_LIBRARIES}")
- ELSE(ROOT_FOUND)
- MESSAGE(FATAL_ERROR
+ message(STATUS "ROOT found : ${ROOT_LIBRARY_DIR} ${ROOT_INCLUDE_DIR} ${ROOT_LIBRARIES}")
+ else(ROOT_FOUND)
+ message(FATAL_ERROR
"Cannot build without ROOT. Please set ROOTSYS environement variable.")
endif(ROOT_FOUND)
- INCLUDE_DIRECTORIES(${ROOT_INCLUDE_DIR})
- LINK_DIRECTORIES(${ROOT_LIBRARY_DIR})
+ include_directories(${ROOT_INCLUDE_DIR})
+ link_directories(${ROOT_LIBRARY_DIR})
WRAP_GGO(clitkMergeRootFiles_GGO_C clitkMergeRootFiles.ggo)
- ADD_EXECUTABLE(clitkMergeRootFiles clitkMergeRootFiles.cxx GateMergeManager.cc ${clitkMergeRootFiles_GGO_C})
- TARGET_LINK_LIBRARIES(clitkMergeRootFiles ${ROOT_LIBRARIES})
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMergeRootFiles)
+ add_executable(clitkMergeRootFiles clitkMergeRootFiles.cxx GateMergeManager.cc ${clitkMergeRootFiles_GGO_C})
+ target_link_libraries(clitkMergeRootFiles ${ROOT_LIBRARIES})
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMergeRootFiles)
endif()
#=========================================================
#=========================================================
- IF(CLITK_EXPERIMENTAL)
+ if(CLITK_EXPERIMENTAL)
WRAP_GGO(clitkBinaryImageToMesh_GGO_C clitkBinaryImageToMesh.ggo)
- ADD_EXECUTABLE(clitkBinaryImageToMesh clitkBinaryImageToMesh.cxx ${clitkBinaryImageToMesh_GGO_C})
- TARGET_LINK_LIBRARIES(clitkBinaryImageToMesh clitkCommon)
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkBinaryImageToMesh)
+ add_executable(clitkBinaryImageToMesh clitkBinaryImageToMesh.cxx ${clitkBinaryImageToMesh_GGO_C})
+ target_link_libraries(clitkBinaryImageToMesh clitkCommon)
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkBinaryImageToMesh)
WRAP_GGO(clitkMeshToBinaryImage_GGO_C clitkMeshToBinaryImage.ggo)
- ADD_EXECUTABLE(clitkMeshToBinaryImage clitkMeshToBinaryImage.cxx ${clitkMeshToBinaryImage_GGO_C})
- TARGET_LINK_LIBRARIES(clitkMeshToBinaryImage clitkCommon)
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMeshToBinaryImage)
+ add_executable(clitkMeshToBinaryImage clitkMeshToBinaryImage.cxx ${clitkMeshToBinaryImage_GGO_C})
+ target_link_libraries(clitkMeshToBinaryImage clitkCommon)
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMeshToBinaryImage)
WRAP_GGO(clitkMeshViewer_GGO_C clitkMeshViewer.ggo)
- ADD_EXECUTABLE(clitkMeshViewer clitkMeshViewer.cxx ${clitkMeshViewer_GGO_C})
- TARGET_LINK_LIBRARIES(clitkMeshViewer clitkCommon)
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMeshViewer)
- ENDIF(CLITK_EXPERIMENTAL)
+ add_executable(clitkMeshViewer clitkMeshViewer.cxx ${clitkMeshViewer_GGO_C})
+ target_link_libraries(clitkMeshViewer clitkCommon)
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMeshViewer)
+ endif(CLITK_EXPERIMENTAL)
#=========================================================
#=========================================================
- IF(ITK_VERSION_MAJOR VERSION_LESS 4)
- MESSAGE("clitkDice is not compatible with ITK<4. It will not be built.")
- MESSAGE("clitkDicomRTPlan2Gate is not compatible with GDCM<2 (ITK<4). It will not be built.")
- ELSE(ITK_VERSION_MAJOR VERSION_LESS 4)
+ if(ITK_VERSION_MAJOR VERSION_LESS 4)
+ message("clitkDice is not compatible with ITK<4. It will not be built.")
+ message("clitkDicomRTPlan2Gate is not compatible with GDCM<2 (ITK<4). It will not be built.")
+ else(ITK_VERSION_MAJOR VERSION_LESS 4)
WRAP_GGO(clitkDice_GGO_C clitkDice.ggo)
- ADD_EXECUTABLE(clitkDice clitkDice.cxx ${clitkDice_GGO_C})
- TARGET_LINK_LIBRARIES(clitkDice clitkSegmentationGgoLib clitkCommon ${ITK_LIBRARIES} )
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkDice)
+ add_executable(clitkDice clitkDice.cxx ${clitkDice_GGO_C})
+ target_link_libraries(clitkDice clitkSegmentationGgoLib clitkCommon ${ITK_LIBRARIES} )
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkDice)
WRAP_GGO(clitkDicomRTPlan2Gate_GGO_C clitkDicomRTPlan2Gate.ggo)
- ADD_EXECUTABLE(clitkDicomRTPlan2Gate clitkDicomRTPlan2Gate.cxx clitkDicomRTPlan2Gate_ggo.c)
- TARGET_LINK_LIBRARIES(clitkDicomRTPlan2Gate clitkCommon)
- SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkDicomRTPlan2Gate)
- ENDIF(ITK_VERSION_MAJOR VERSION_LESS 4)
+ add_executable(clitkDicomRTPlan2Gate clitkDicomRTPlan2Gate.cxx clitkDicomRTPlan2Gate_ggo.c)
+ target_link_libraries(clitkDicomRTPlan2Gate clitkCommon)
+ set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkDicomRTPlan2Gate)
+ endif(ITK_VERSION_MAJOR VERSION_LESS 4)
#=========================================================
- INSTALL (TARGETS ${TOOLS_INSTALL} DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
+ install(TARGETS ${TOOLS_INSTALL} DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
-ENDIF(CLITK_BUILD_TOOLS)
+endif(CLITK_BUILD_TOOLS)
-INCLUDE(../../cmake/common.cmake)
+include(../../cmake/common.cmake)
-ADD_LIBRARY(clitkCxImage STATIC
+add_library(clitkCxImage STATIC
ximaenc.cpp
ximatran.cpp
ximath.cpp
ximasel.cpp
xmemfile.cpp
)
-INCLUDE_DIRECTORIES(.)
+include_directories(.)
# Gengetopt: http://www.gnu.org/software/gengetopt/
-ADD_DEFINITIONS(-DPACKAGE=\"gengetopt\")
-ADD_DEFINITIONS(-DVERSION=\"2.22.4\")
-ADD_DEFINITIONS(-DHAVE_SSTREAM)
-ADD_DEFINITIONS(-DHAVE_NAMESPACES)
+add_definitions(-DPACKAGE=\"gengetopt\")
+add_definitions(-DVERSION=\"2.22.4\")
+add_definitions(-DHAVE_SSTREAM)
+add_definitions(-DHAVE_NAMESPACES)
# Remove compiler warnings
-STRING(REPLACE "/W3" "/w" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
-STRING(REPLACE "/W3" "/w" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
-STRING(REPLACE "-Wall" "-w" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
-STRING(REPLACE "-Wall" "-w" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
+string(REPLACE "/W3" "/w" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+string(REPLACE "/W3" "/w" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
+string(REPLACE "-Wall" "-w" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+string(REPLACE "-Wall" "-w" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
# MSVC specific issues
-IF(MSVC)
- ADD_DEFINITIONS(-DHAVE_STRING_H)
- ADD_DEFINITIONS(-DYY_NO_UNISTD_H)
- ADD_DEFINITIONS(-Disatty=!)
-ENDIF(MSVC)
+if(MSVC)
+ add_definitions(-DHAVE_STRING_H)
+ add_definitions(-DYY_NO_UNISTD_H)
+ add_definitions(-Disatty=!)
+endif(MSVC)
-ADD_EXECUTABLE(gengetopt
+add_executable(gengetopt
./cmdline.c
./ggos.cpp
./scanner.cc
./yyerror.cc
./parser.cc)
-INCLUDE_DIRECTORIES(.)
-INCLUDE_DIRECTORIES(skels)
-#INCLUDE_DIRECTORIES(includes)
+include_directories(.)
+include_directories(skels)
+#include_directories(includes)
#=========================================================
#List of vv tools to compile
-SET(vv_TOOLS
+set(vv_TOOLS
vvToolMedianFilter
vvToolRigidReg
vvToolCropImage
# vvToolFoo
# vvToolFooWithWidgetBase
# vvToolPlastimatch
- # vvToolConnectedComponentLabeling
+ # vvToolConnectedComponentLabeling
## these ones are old ones
# vvToolExtractPatient
# vvToolExtractLung
# dependencies of the tools
# Future issues : when tool depend on other tools ... how to manage that ?
# >> add the relevant $_LIBS variable to the tool that has dependencies?
-SET(vvToolBinarize_LIBS clitkBinarizeImageLib)
-SET(vvToolResample_LIBS clitkResampleImageLib)
-SET(vvToolConvert_LIBS clitkImageConvertLib)
-SET(vvToolExtractPatient_LIBS clitkSegmentationGgoLib)
-SET(vvToolExtractLung_LIBS clitkSegmentationGgoLib)
-SET(vvToolCropImage_LIBS clitkCropImageLib)
-SET(vvToolMIP_LIBS clitkMIPLib)
-SET(vvToolMedianFilter_LIBS clitkMedianImageFilterLib)
-SET(vvToolImageArithm_LIBS clitkImageArithmImageLib)
-SET(vvToolROIManager_LIBS clitkDicomRTStruct)
+set(vvToolBinarize_LIBS clitkBinarizeImageLib)
+set(vvToolResample_LIBS clitkResampleImageLib)
+set(vvToolConvert_LIBS clitkImageConvertLib)
+set(vvToolExtractPatient_LIBS clitkSegmentationGgoLib)
+set(vvToolExtractLung_LIBS clitkSegmentationGgoLib)
+set(vvToolCropImage_LIBS clitkCropImageLib)
+set(vvToolMIP_LIBS clitkMIPLib)
+set(vvToolMedianFilter_LIBS clitkMedianImageFilterLib)
+set(vvToolImageArithm_LIBS clitkImageArithmImageLib)
+set(vvToolROIManager_LIBS clitkDicomRTStruct)
#=========================================================
# List of vv source files
# in COMMON_WITH_UI -> must have .h and .cxx and .ui
-SET(vv_COMMON_WITH_UI
+set(vv_COMMON_WITH_UI
vvInfoPanel
- vvMainWindow
- vvLinkPanel
- vvOverlayPanel
- vvLandmarksPanel
- vvProgressDialog
+ vvMainWindow
+ vvLinkPanel
+ vvOverlayPanel
+ vvLandmarksPanel
+ vvProgressDialog
vvSegmentationDialog
vvSurfaceViewerDialog
vvDeformationDialog
vvStructSelector
vvIntensityValueSlider
vvLabelImageLoaderWidget
- vvToolWidgetBase
+ vvToolWidgetBase
vvToolSimpleInputSelectorWidget
vvToolInputSelectorWidget
vvRegisterForm
)
# All others sources
-SET(vv_SRCS
+set(vv_SRCS
vvQProgressDialogITKCommand.cxx
vvQDicomSeriesSelector.cxx
QTreePushButton.cxx
#=========================================================
# Qt related commands
-FIND_PACKAGE(Qt4 REQUIRED)
-LINK_DIRECTORIES(${QT_LIBRARY_DIR})
+find_package(Qt4 REQUIRED)
+link_directories(${QT_LIBRARY_DIR})
-QT4_WRAP_CPP(vv_SRCS
- vvMainWindowBase.h
- QTreePushButton.h
- vvDocumentation.h
- vvHelpDialog.h
- vvQDicomSeriesSelector.h
+QT4_WRAP_CPP(vv_SRCS
+ vvMainWindowBase.h
+ QTreePushButton.h
+ vvDocumentation.h
+ vvHelpDialog.h
+ vvQDicomSeriesSelector.h
vvSlicerManager.h
vvStructureSetActor.h
vvROIActor.h
vvToolCreatorBase.h
)
-QT4_WRAP_UI(vv_UI_CXX
- qt_ui/vvHelpDialog.ui
- qt_ui/vvDocumentation.ui
- qt_ui/vvDicomSeriesSelector.ui
+QT4_WRAP_UI(vv_UI_CXX
+ qt_ui/vvHelpDialog.ui
+ qt_ui/vvDocumentation.ui
+ qt_ui/vvDicomSeriesSelector.ui
qt_ui/vvDummyWindow.ui #For testing
)
if(${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt IS_NEWER_THAN ${CMAKE_CURRENT_BINARY_DIR}/vvToolsList.h)
file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/vvToolsList.h)
foreach(tool ${vv_TOOLS})
- FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/vvToolsList.h "#include \"${tool}.h\"\n")
- FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/vvToolsList.h "extern const vvToolCreator<${tool}> *dummy${tool};\n")
- FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/vvToolsList.h "const vvToolCreator<${tool}> *dummy${tool}2 = dummy${tool};\n\n")
+ file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/vvToolsList.h "#include \"${tool}.h\"\n")
+ file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/vvToolsList.h "extern const vvToolCreator<${tool}> *dummy${tool};\n")
+ file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/vvToolsList.h "const vvToolCreator<${tool}> *dummy${tool}2 = dummy${tool};\n\n")
endforeach(tool)
endif(${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt IS_NEWER_THAN ${CMAKE_CURRENT_BINARY_DIR}/vvToolsList.h)
# Add the autotools and the common files ui
foreach(tool ${vv_TOOLS} ${vv_COMMON_WITH_UI})
- SET(vv_SRCS ${vv_SRCS} ${tool}.cxx)
+ set(vv_SRCS ${vv_SRCS} ${tool}.cxx)
QT4_WRAP_CPP(vv_SRCS ${tool}.h)
QT4_WRAP_UI(vv_UI_CXX qt_ui/${tool}.ui)
endforeach(tool)
# Add the common source files
foreach(tool ${vv_COMMON})
- SET(vv_SRCS ${vv_SRCS} ${tool}.cxx)
+ set(vv_SRCS ${vv_SRCS} ${tool}.cxx)
QT4_WRAP_CPP(vv_SRCS ${tool}.h)
endforeach(tool)
# if Windows and Qt was built as a static lib then don't set QT_DLL flag
-SET(QT_STATIC 0)
-IF (WIN32)
- IF(EXISTS ${QT_LIBRARY_DIR}/QtCore.prl)
- FILE(READ ${QT_LIBRARY_DIR}/QtCore.prl QT_CORE_PRL)
- IF(${QT_CORE_PRL} MATCHES "static")
- SET(QT_STATIC 1)
- ENDIF(${QT_CORE_PRL} MATCHES "static")
- ENDIF(EXISTS ${QT_LIBRARY_DIR}/QtCore.prl)
-ENDIF(WIN32)
-IF(NOT QT_STATIC)
- ADD_DEFINITIONS(-DQT_DLL)
-ENDIF(NOT QT_STATIC)
+set(QT_STATIC 0)
+if(WIN32)
+ if(EXISTS ${QT_LIBRARY_DIR}/QtCore.prl)
+ file(READ ${QT_LIBRARY_DIR}/QtCore.prl QT_CORE_PRL)
+ if(${QT_CORE_PRL} MATCHES "static")
+ set(QT_STATIC 1)
+ endif(${QT_CORE_PRL} MATCHES "static")
+ endif(EXISTS ${QT_LIBRARY_DIR}/QtCore.prl)
+endif(WIN32)
+if(NOT QT_STATIC)
+ add_definitions(-DQT_DLL)
+endif(NOT QT_STATIC)
-ADD_DEFINITIONS(-DQT_THREAD_SUPPORT)
+add_definitions(-DQT_THREAD_SUPPORT)
-INCLUDE_DIRECTORIES(
+include_directories(
${QT_INCLUDES}
${QT_INCLUDE_DIR}
${QT_QTGUI_INCLUDE_DIR}
#=========================================================
#support for parallel deformable registration with OpenMP
-IF(NOT APPLE)
-IF(CMAKE_COMPILER_IS_GNUCC)
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
-ENDIF(CMAKE_COMPILER_IS_GNUCC)
-ENDIF(NOT APPLE)
+if(NOT APPLE)
+if(CMAKE_COMPILER_IS_GNUCC)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
+endif(CMAKE_COMPILER_IS_GNUCC)
+endif(NOT APPLE)
#=========================================================
#=========================================================
-INCLUDE_DIRECTORIES(
+include_directories(
../common
../tools
../segmentation
#=========================================================
#Add each tool's dependencies
foreach(tool ${vv_TOOLS})
- SET(toolLibs ${toolLibs} ${${tool}_LIBS})
+ set(toolLibs ${toolLibs} ${${tool}_LIBS})
endforeach(tool)
#=========================================================
#Add Foundation Libraries (this should be after our libraries, since we depend
#on them)
-SET(foundationLibraries clitkCommon ${ITK_LIBRARIES} QVTK vtkHybrid)
+set(foundationLibraries clitkCommon ${ITK_LIBRARIES} QVTK vtkHybrid)
#=========================================================
# Use CxImage to create animated gifs
-IF(CLITK_EXPERIMENTAL)
- SET(vvCxImage clitkCxImage)
- SET(vv_SRCS ${vv_SRCS} vvAnimatedGIFWriter.cxx)
- INCLUDE_DIRECTORIES(${CLITK_SOURCE_DIR}/utilities/CxImage)
- ADD_SUBDIRECTORY(${CLITK_SOURCE_DIR}/utilities/CxImage ${PROJECT_BINARY_DIR}/utilities/CxImage)
-ENDIF(CLITK_EXPERIMENTAL)
+if(CLITK_EXPERIMENTAL)
+ set(vvCxImage clitkCxImage)
+ set(vv_SRCS ${vv_SRCS} vvAnimatedGIFWriter.cxx)
+ include_directories(${CLITK_SOURCE_DIR}/utilities/CxImage)
+ add_subdirectory(${CLITK_SOURCE_DIR}/utilities/CxImage ${PROJECT_BINARY_DIR}/utilities/CxImage)
+endif(CLITK_EXPERIMENTAL)
#=========================================================
#-----------------------------------------------------------------------------
# See http://wiki.finkproject.org/index.php/Fink:Packaging:Preparing_for_10.5#OpenGL_Bug
#
if(APPLE)
- FIND_LIBRARY(CoreFoundation_LIBRARY CoreFoundation REQUIRED)
- FIND_LIBRARY(ApplicationServices_LIBRARY ApplicationServices REQUIRED)
- FIND_LIBRARY(SystemConfiguration_LIBRARY SystemConfiguration REQUIRED)
- FIND_LIBRARY(Security_LIBRARY Security REQUIRED)
- set(APPLE_FRAMEWORKS ${CoreFoundation_LIBRARY}
- ${ApplicationServices_LIBRARY}
+ find_library(CoreFoundation_LIBRARY CoreFoundation REQUIRED)
+ find_library(ApplicationServices_LIBRARY ApplicationServices REQUIRED)
+ find_library(SystemConfiguration_LIBRARY SystemConfiguration REQUIRED)
+ find_library(Security_LIBRARY Security REQUIRED)
+ set(APPLE_FRAMEWORKS ${CoreFoundation_LIBRARY}
+ ${ApplicationServices_LIBRARY}
${SystemConfiguration_LIBRARY}
${Security_LIBRARY}
)
endif()
#=========================================================
#Create binary and libs for tests
-SET(vvExternalLibs clitkSegmentationGgoLib ${toolLibs} ${foundationLibraries} ${vvCxImage} ${QT_LIBRARIES} ${QT_QTNETWORK_LIBRARY} ${APPLE_FRAMEWORKS})
+set(vvExternalLibs clitkSegmentationGgoLib ${toolLibs} ${foundationLibraries} ${vvCxImage} ${QT_LIBRARIES} ${QT_QTNETWORK_LIBRARY} ${APPLE_FRAMEWORKS})
# QtNetwork is required by vvRegisterForm
-ADD_LIBRARY(vvLib ${vv_SRCS} ${vv_UI_CXX})
-TARGET_LINK_LIBRARIES(vvLib ${vvExternalLibs})
+add_library(vvLib ${vv_SRCS} ${vv_UI_CXX})
+target_link_libraries(vvLib ${vvExternalLibs})
-IF(WIN32)
- ADD_EXECUTABLE(vv WIN32 vv.cxx vvIcon.rc)
-ELSE(WIN32)
- ADD_EXECUTABLE(vv vv.cxx)
-ENDIF(WIN32)
+if(WIN32)
+ add_executable(vv WIN32 vv.cxx vvIcon.rc)
+else(WIN32)
+ add_executable(vv vv.cxx)
+endif(WIN32)
-TARGET_LINK_LIBRARIES(vv vvLib)
+target_link_libraries(vv vvLib)
#=========================================================
# Install options (also used by CPack)
-INSTALL (TARGETS vv DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE)
+install(TARGETS vv DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE)
#=========================================================
#=========================================================
# CPack options
-SET(CPACK_PACKAGE_NAME "vv")
-SET(CPACK_SOURCE_PACKAGE_FILE_NAME "vv-src")
-SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "vv, the 4D slicer : let's jump into a new dimension !")
-SET(CPACK_PACKAGE_VENDOR "Creatis-CLB")
-SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/ReadMe.txt")
-SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/License.txt")
-SET(CPACK_PACKAGE_VERSION_MAJOR "1")
-SET(CPACK_PACKAGE_VERSION_MINOR "3")
-SET(CPACK_PACKAGE_VERSION_PATCH "0")
-IF(NIGHTLY)
- SET(CPACK_PACKAGE_INSTALL_DIRECTORY "vv-nightly")
-ELSE(NIGHTLY)
- SET(CPACK_PACKAGE_INSTALL_DIRECTORY "vv")
-ENDIF(NIGHTLY)
-SET(CPACK_STRIP_FILES TRUE)
+set(CPACK_PACKAGE_NAME "vv")
+set(CPACK_SOURCE_PACKAGE_FILE_NAME "vv-src")
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "vv, the 4D slicer : let's jump into a new dimension !")
+set(CPACK_PACKAGE_VENDOR "Creatis-CLB")
+set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/ReadMe.txt")
+set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/License.txt")
+set(CPACK_PACKAGE_VERSION_MAJOR "1")
+set(CPACK_PACKAGE_VERSION_MINOR "3")
+set(CPACK_PACKAGE_VERSION_PATCH "0")
+if(NIGHTLY)
+ set(CPACK_PACKAGE_INSTALL_DIRECTORY "vv-nightly")
+else(NIGHTLY)
+ set(CPACK_PACKAGE_INSTALL_DIRECTORY "vv")
+endif(NIGHTLY)
+set(CPACK_STRIP_FILES TRUE)
-IF(WIN32)
+if(WIN32)
# There is a bug in NSI that does not handle full unix paths properly. Make
# sure there is at least one set of four (4) backlasshes.
- SET(CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_SOURCE_DIR}\\\\icons\\\\ducky.ico")
- SET(CPACK_NSIS_INSTALLED_ICON_NAME "vv.exe")
-IF(NIGHTLY)
- SET(CPACK_NSIS_DISPLAY_NAME "vv - The 4D slicer (nightly)")
-ELSE(NIGHTLY)
- SET(CPACK_NSIS_DISPLAY_NAME "vv - The 4D slicer")
-ENDIF(NIGHTLY)
- SET(CPACK_NSIS_HELP_LINK "http://www.creatis.insa-lyon.fr/rio/vv")
- SET(CPACK_NSIS_URL_INFO_ABOUT "http://www.creatis.insa-lyon.fr/rio")
- SET(CPACK_NSIS_CONTACT "vv@creatis.insa-lyon.fr")
- SET(CPACK_NSIS_CREATE_ICONS_EXTRA "CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\vv.lnk\\\" \\\"$INSTDIR\\\\bin\\\\vv.exe\\\" ")
- SET(CPACK_NSIS_DELETE_ICONS_EXTRA "Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\vv.lnk\\\" ")
- #SET(CPACK_NSIS_MODIFY_PATH ON) SR: buggy, wait for cmake updates for a fix
- #SET(CPACK_BINARY_ZIP ON)
-ELSE(WIN32)
- SET(CPACK_GENERATOR "STGZ")
- SET(CPACK_SOURCE_GENERATOR "TGZ")
-ENDIF(WIN32)
-INCLUDE(CPack)
+ set(CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_SOURCE_DIR}\\\\icons\\\\ducky.ico")
+ set(CPACK_NSIS_INSTALLED_ICON_NAME "vv.exe")
+if(NIGHTLY)
+ set(CPACK_NSIS_DISPLAY_NAME "vv - The 4D slicer (nightly)")
+else(NIGHTLY)
+ set(CPACK_NSIS_DISPLAY_NAME "vv - The 4D slicer")
+endif(NIGHTLY)
+ set(CPACK_NSIS_HELP_LINK "http://www.creatis.insa-lyon.fr/rio/vv")
+ set(CPACK_NSIS_URL_INFO_ABOUT "http://www.creatis.insa-lyon.fr/rio")
+ set(CPACK_NSIS_CONTACT "vv@creatis.insa-lyon.fr")
+ set(CPACK_NSIS_CREATE_ICONS_EXTRA "CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\vv.lnk\\\" \\\"$INSTDIR\\\\bin\\\\vv.exe\\\" ")
+ set(CPACK_NSIS_DELETE_ICONS_EXTRA "Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\vv.lnk\\\" ")
+ #set(CPACK_NSIS_MODIFY_PATH ON) SR: buggy, wait for cmake updates for a fix
+ #set(CPACK_BINARY_ZIP ON)
+else(WIN32)
+ set(CPACK_GENERATOR "STGZ")
+ set(CPACK_SOURCE_GENERATOR "TGZ")
+endif(WIN32)
+include(CPack)
#=========================================================
#=========================================================
configure_file(vvConfiguration.h.in vvConfiguration.h)