diff --git a/CMakeLists.txt b/CMakeLists.txt index 4b87829..f12043c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,292 +1,298 @@ #----------------------------------------------------------------------------- # This is the root RTToolbox CMakeList file. #----------------------------------------------------------------------------- PROJECT(RTToolbox) -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) -IF(CMAKE_BACKWARDS_COMPATIBILITY GREATER 2.8) - SET(CMAKE_BACKWARDS_COMPATIBILITY 2.8 CACHE STRING "Latest version of CMake when this project was released." FORCE) -ENDIF(CMAKE_BACKWARDS_COMPATIBILITY GREATER 2.8) +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11.2) +IF(CMAKE_BACKWARDS_COMPATIBILITY GREATER 2.8.11.2) + SET(CMAKE_BACKWARDS_COMPATIBILITY 2.8.11.2 CACHE STRING "Latest version of CMake when this project was released." FORCE) +ENDIF(CMAKE_BACKWARDS_COMPATIBILITY GREATER 2.8.11.2) # RTToolbox version number. SET(RTToolbox_VERSION_MAJOR "4") SET(RTToolbox_VERSION_MINOR "0") SET(RTToolbox_VERSION_PATCH "0") # Version string should not include patch level. The major.minor is # enough to distinguish available features of the toolbox. SET(RTToolbox_VERSION_STRING "${RTToolbox_VERSION_MAJOR}.${RTToolbox_VERSION_MINOR}") SET(RTToolbox_FULL_VERSION_STRING "${RTToolbox_VERSION_MAJOR}.${RTToolbox_VERSION_MINOR}.${RTToolbox_VERSION_PATCH}") # default build type SET(CMAKE_BUILD_TYPE Release) MARK_AS_ADVANCED(BUILD_SHARED_LIBS) IF (WIN32) IF (MSVC_VERSION LESS 1600) MESSAGE(FATAL_ERROR "RTToolbox requires at least Visual Studio 2010.") ENDIF(MSVC_VERSION LESS 1600) add_definitions(-D_SCL_SECURE_NO_WARNINGS) +ELSE (WIN32) + IF (CMAKE_COMPILER_IS_GNUCC) + IF (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.6 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 5.0 OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 5.0) + MESSAGE(AUTHOR_WARNING "RTToolbox was only tested with GCC 4.6 and GCC 4.9. You are using GCC " ${CMAKE_CXX_COMPILER_VERSION} ". This compiler version might not work.") + ENDIF() + ENDIF() ENDIF(WIN32) + IF (NOT (CMAKE_MAJOR_VERSION LESS 3)) IF(COMMAND CMAKE_POLICY) # Enable old CMake behaviour when dealing with export_library_dependencies(). # This is necessary to avoid warnings in CMake versions # greater than 3.0 # See http://www.cmake.org/cmake/help/v3.0/policy/CMP0033.html CMAKE_POLICY(SET CMP0033 OLD) ENDIF(COMMAND CMAKE_POLICY) ENDIF() IF(BUILD_SHARED_LIBS) IF(WIN32) MESSAGE(FATAL_ERROR "RTToolbox currently does not support a dynamic build on Windows. We are working on that...") ENDIF(WIN32) ELSE(BUILD_SHARED_LIBS) IF(UNIX) MESSAGE(FATAL_ERROR "RTToolbox currently does not support a static build on unix like systems. We are working on that...") ENDIF(UNIX) ENDIF(BUILD_SHARED_LIBS) message(STATUS ${CMAKE_BUILD_TYPE}) #----------------------------------------------------------------------------- # CMake Function(s) and Macro(s) #----------------------------------------------------------------------------- include(cmake/MacroParseArguments.cmake) include(cmake/rttbMacroCreateModuleConf.cmake) include(cmake/rttbMacroCreateModule.cmake) include(cmake/rttbMacroCreateApplication.cmake) include(cmake/rttbMacroCheckModule.cmake) include(cmake/rttbMacroUseModule.cmake) include(cmake/rttbMacroCreateTestModule.cmake) include(cmake/rttbFunctionOrganizeSources.cmake) #----------------------------------------------------------------------------- # Basis config RTTB module infrastructure #----------------------------------------------------------------------------- set(RTTB_MODULES_CONF_DIR ${RTToolbox_BINARY_DIR}/modulesConf CACHE INTERNAL "Modules Conf") set(RTTB_MODULES_PACKAGE_DEPENDS_DIR ${RTToolbox_SOURCE_DIR}/cmake/PackageDepends) set(MODULES_PACKAGE_DEPENDS_DIRS ${RTTB_MODULES_PACKAGE_DEPENDS_DIR}) - #----------------------------------------------------------------------------- # Testing setup # Configure Dart testing support. This should be done before any # MESSAGE(FATAL_ERROR ...) commands are invoked. #----------------------------------------------------------------------------- - SET(CTEST_NEW_FORMAT 1) INCLUDE(CTest) ENABLE_TESTING() + IF(BUILD_TESTING) CONFIGURE_FILE(${RTToolbox_SOURCE_DIR}/cmake/RemoveTemporaryFiles.cmake.in ${RTToolbox_BINARY_DIR}/cmake/RemoveTemporaryFiles.cmake @ONLY IMMEDIATE) CONFIGURE_FILE(${RTToolbox_SOURCE_DIR}/cmake/rttbSampleBuildTest.cmake.in ${RTToolbox_BINARY_DIR}/cmake/rttbSampleBuildTest.cmake @ONLY) CONFIGURE_FILE(${RTToolbox_SOURCE_DIR}/cmake/CTestCustom.ctest.in ${RTToolbox_BINARY_DIR}/cmake/CTestCustom.ctest @ONLY) FILE(WRITE ${RTToolbox_BINARY_DIR}/CTestCustom.cmake "INCLUDE(\"${RTToolbox_BINARY_DIR}/cmake/CTestCustom.ctest\")\n") SET(BUILDNAME "${BUILDNAME}" CACHE STRING "Name of build on the dashboard") MARK_AS_ADVANCED(BUILDNAME) ENDIF(BUILD_TESTING) #----------------------------------------------------------------------------- # Output directories. #----------------------------------------------------------------------------- IF(NOT LIBRARY_OUTPUT_PATH) SET (LIBRARY_OUTPUT_PATH ${RTToolbox_BINARY_DIR}/bin CACHE PATH "Single output directory for building all libraries.") ENDIF(NOT LIBRARY_OUTPUT_PATH) IF(NOT EXECUTABLE_OUTPUT_PATH) SET (EXECUTABLE_OUTPUT_PATH ${RTToolbox_BINARY_DIR}/bin CACHE PATH "Single output directory for building all executables.") ENDIF(NOT EXECUTABLE_OUTPUT_PATH) MARK_AS_ADVANCED(EXECUTABLE_OUTPUT_PATH LIBRARY_OUTPUT_PATH) MARK_AS_ADVANCED(LIBRARY_OUTPUT_PATH EXECUTABLE_OUTPUT_PATH) SET(RTToolbox_LIBRARY_PATH "${LIBRARY_OUTPUT_PATH}") SET(RTToolbox_EXECUTABLE_PATH "${EXECUTABLE_OUTPUT_PATH}") #----------------------------------------------------------------------------- # Find Doxygen. #----------------------------------------------------------------------------- FIND_PROGRAM(DOXYGEN_EXECUTABLE "doxygen") #----------------------------------------------------------------------------- # Installation vars. # RTToolbox_INSTALL_BIN_DIR - binary dir (executables) # RTToolbox_INSTALL_LIB_DIR - library dir (libs) # RTToolbox_INSTALL_INCLUDE_DIR - include dir (headers) # RTToolbox_INSTALL_NO_DEVELOPMENT - do not install development files # RTToolbox_INSTALL_NO_RUNTIME - do not install runtime files # RTToolbox_INSTALL_NO_DOCUMENTATION - do not install documentation files # Remark: needs directory are stored with no leading slash (CMake 2.4 and newer) #----------------------------------------------------------------------------- IF(NOT RTTOOLBOX_INSTALL_BIN_DIR) SET(RTTOOLBOX_INSTALL_BIN_DIR "bin") ENDIF(NOT RTTOOLBOX_INSTALL_BIN_DIR) IF(NOT RTTOOLBOX_INSTALL_LIB_DIR) SET(RTTOOLBOX_INSTALL_LIB_DIR "lib") ENDIF(NOT RTTOOLBOX_INSTALL_LIB_DIR) IF(NOT RTTOOLBOX_INSTALL_PACKAGE_DIR) SET(RTTOOLBOX_INSTALL_PACKAGE_DIR "lib") ENDIF(NOT RTTOOLBOX_INSTALL_PACKAGE_DIR) IF(NOT RTTOOLBOX_INSTALL_INCLUDE_DIR) SET(RTTOOLBOX_INSTALL_INCLUDE_DIR "include") ENDIF(NOT RTTOOLBOX_INSTALL_INCLUDE_DIR) IF(NOT RTTOOLBOX_INSTALL_NO_DEVELOPMENT) SET(RTTOOLBOX_INSTALL_NO_DEVELOPMENT 0) ENDIF(NOT RTTOOLBOX_INSTALL_NO_DEVELOPMENT) IF(NOT RTTOOLBOX_INSTALL_NO_RUNTIME) SET(RTTOOLBOX_INSTALL_NO_RUNTIME 0) ENDIF(NOT RTTOOLBOX_INSTALL_NO_RUNTIME) IF(NOT RTTOOLBOX_INSTALL_NO_DOCUMENTATION) SET(RTTOOLBOX_INSTALL_NO_DOCUMENTATION 0) ENDIF(NOT RTTOOLBOX_INSTALL_NO_DOCUMENTATION) SET(RTTOOLBOX_INSTALL_NO_LIBRARIES) IF(RTTOOLBOX_BUILD_SHARED_LIBS) IF(RTTOOLBOX_INSTALL_NO_RUNTIME AND RTTOOLBOX_INSTALL_NO_DEVELOPMENT) SET(RTTOOLBOX_INSTALL_NO_LIBRARIES 1) ENDIF(RTTOOLBOX_INSTALL_NO_RUNTIME AND RTTOOLBOX_INSTALL_NO_DEVELOPMENT) ELSE(RTTOOLBOX_BUILD_SHARED_LIBS) IF(RTTOOLBOX_INSTALL_NO_DEVELOPMENT) SET(RTTOOLBOX_INSTALL_NO_LIBRARIES 1) ENDIF(RTTOOLBOX_INSTALL_NO_DEVELOPMENT) ENDIF(RTTOOLBOX_BUILD_SHARED_LIBS) # set RTToolbox_DIR so it can be used by subprojects SET(RTToolbox_DIR "${CMAKE_BINARY_DIR}" CACHE INTERNAL "RTToolbox dir to be used by subprojects") #----------------------------------------------------------------------------- # DCMTK MT-Flag treat #----------------------------------------------------------------------------- option(RTTB_DCMTK_COMPLIANCE_ENFORCE_MT "This enforces the whole RTToolbox to be compiled with /MT,/MTd to be compliant with DCMTK" OFF) string(FIND ${CMAKE_GENERATOR} "Visual Studio" RTTB_VS_USED) if(RTTB_DCMTK_COMPLIANCE_ENFORCE_MT AND RTTB_VS_USED EQUAL 0) message(STATUS "Enforce DCMTK compliance: /MT and /MTd flags are used") string(REPLACE "/MD" "/MT" CMAKE_C_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG}) message(STATUS "CMAKE_C_FLAGS_DEBUG set to: ${CMAKE_C_FLAGS_DEBUG}") string(REPLACE "/MD" "/MT" CMAKE_C_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE}) message(STATUS "CMAKE_C_FLAGS_RELEASE set to: ${CMAKE_C_FLAGS_RELEASE}") string(REPLACE "/MD" "/MT" CMAKE_C_FLAGS_MINSIZEREL ${CMAKE_C_FLAGS_MINSIZEREL}) message(STATUS "CMAKE_C_FLAGS_MINSIZEREL set to: ${CMAKE_C_FLAGS_MINSIZEREL}") string(REPLACE "/MD" "/MT" CMAKE_C_FLAGS_RELWITHDEBINFO ${CMAKE_C_FLAGS_RELWITHDEBINFO}) message(STATUS "CMAKE_C_FLAGS_RELWITHDEBINFO set to: ${CMAKE_C_FLAGS_RELWITHDEBINFO}") string(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG}) message(STATUS "CMAKE_CXX_FLAGS_DEBUG set to: ${CMAKE_CXX_FLAGS_DEBUG}") string(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE}) message(STATUS "CMAKE_CXX_FLAGS_RELEASE set to: ${CMAKE_CXX_FLAGS_RELEASE}") string(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_MINSIZEREL ${CMAKE_CXX_FLAGS_MINSIZEREL}) message(STATUS "CMAKE_CXX_FLAGS_MINSIZEREL set to: ${CMAKE_CXX_FLAGS_MINSIZEREL}") string(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}) message(STATUS "CMAKE_CXX_FLAGS_RELWITHDEBINFO set to: ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") endif() #----------------------------------------------------------------------------- # Advanced RTToolbox configuration #----------------------------------------------------------------------------- #----------------------------------------------------------------------------- # RTToolbox build configuration options. IF (WIN32) OPTION(BUILD_SHARED_LIBS "Build RTToolbox with shared libraries." OFF) ELSE (WIN32) OPTION(BUILD_SHARED_LIBS "Build RTToolbox with shared libraries." ON) ENDIF (WIN32) SET(RTToolbox_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS}) IF(NOT RTToolbox_NO_LIBRARY_VERSION) # This setting of SOVERSION assumes that any API change # will increment either the minor or major version number of RTToolbox. SET(RTToolbox_LIBRARY_PROPERTIES VERSION "${RTToolbox_VERSION_MAJOR}.${RTToolbox_VERSION_MINOR}.${RTToolbox_VERSION_PATCH}" SOVERSION "${RTToolbox_VERSION_MAJOR}.${RTToolbox_VERSION_MINOR}" ) ENDIF(NOT RTToolbox_NO_LIBRARY_VERSION) #----------------------------------------------------------------------------- # Configure files with settings for use by the build. # #----------------------------------------------------------------------------- CONFIGURE_FILE(${RTToolbox_SOURCE_DIR}/RTToolboxConfigure.h.in ${RTToolbox_BINARY_DIR}/RTToolboxConfigure.h) IF(NOT RTTOOLBOX_INSTALL_NO_DEVELOPMENT) INSTALL(FILES ${RTToolbox_BINARY_DIR}/RTToolboxConfigure.h DESTINATION ${RTTOOLBOX_INSTALL_INCLUDE_DIR} COMPONENT Development) ENDIF(NOT RTTOOLBOX_INSTALL_NO_DEVELOPMENT) #----------------------------------------------------------------------------- # The entire RTToolbox tree should use the same include path #----------------------------------------------------------------------------- #Default include dir. Others dirs will be defined by activated subprojects INCLUDE_DIRECTORIES(${RTToolbox_BINARY_DIR}) LINK_DIRECTORIES(${LIBARY_OUTPUT_PATH}) #Prepare the correct target information export by the subprojects SET(RTToolbox_TARGETS_FILE "${RTToolbox_BINARY_DIR}/RTToolboxTargets.cmake") FILE(WRITE ${RTToolbox_TARGETS_FILE} "# Generated by CMake, do not edit!") #----------------------------------------------------------------------------- # Dispatch the build into the proper subdirectories. #----------------------------------------------------------------------------- MESSAGE (STATUS "generating Project RTToolbox") ADD_SUBDIRECTORY (code) ADD_SUBDIRECTORY (demoapps) IF (BUILD_TESTING) ADD_SUBDIRECTORY (testing) ENDIF (BUILD_TESTING) ADD_SUBDIRECTORY (documentation) #----------------------------------------------------------------------------- # Help other projects use RTToolbox. #----------------------------------------------------------------------------- EXPORT(PACKAGE RTToolbox) # Copy the UseRTToolbox.cmake file to the binary tree for backward compatability. CONFIGURE_FILE(${RTToolbox_SOURCE_DIR}/UseRTToolbox.cmake.in ${RTToolbox_BINARY_DIR}/UseRTToolbox.cmake COPYONLY IMMEDIATE) # Save library dependencies. EXPORT_LIBRARY_DEPENDENCIES(${RTToolbox_BINARY_DIR}/RTToolboxLibraryDepends.cmake) # Create the RTToolboxConfig.cmake file containing the RTToolbox configuration. INCLUDE (${RTToolbox_SOURCE_DIR}/rttbGenerateRTToolboxConfig.cmake) IF(NOT RTToolbox_INSTALL_NO_DEVELOPMENT) INSTALL(FILES ${RTToolbox_BINARY_DIR}/RTToolboxConfig.cmake ${RTToolbox_BINARY_DIR}/RTToolboxTargets.cmake ${RTToolbox_BINARY_DIR}/RTToolboxLibraryDepends.cmake ${RTToolbox_BINARY_DIR}/UseRTToolbox.cmake DESTINATION ${RTTOOLBOX_INSTALL_PACKAGE_DIR} COMPONENT Development ) -ENDIF(NOT RTToolbox_INSTALL_NO_DEVELOPMENT) +ENDIF(NOT RTToolbox_INSTALL_NO_DEVELOPMENT) \ No newline at end of file diff --git a/ReadMe.txt b/ReadMe.txt index 0358994..c42645a 100644 --- a/ReadMe.txt +++ b/ReadMe.txt @@ -1,174 +1,174 @@ RTToolbox - Read Me ---------------------------- ---------------------------- Compiler tests ---------------------------- RTToolbox is currently tested with the following compilers (only x64): - Visual Studio 2010 - Visual Studio 2013 - GCC 4.6 - GCC 4.9 Needed Third Party Libraries ---------------------------- Please load and compile the following third party libraries/tools: Required: -1. CMake (version 2.8.3 or higher) +1. CMake (version 2.8.11.2 or higher) 2. boost (version 1.56.0 or higher) Optional: [3. Litmus (in this distribution; see \utilities\Litmus; if you want tests)] [4. dcmtk (with RT support - 3.6.1 or newer; if you want DICOM support)] [5. ITK (version 4.4 or higher; if you want DoseInterpolation support with itk::Transform or ITK File IO support)] [6. MatchPoint (version 0.11 or higher, see http://sourceforge.net/projects/matchpoint/; if you want DoseInterpolation support with MatchPoint Registration objects)] [7. doxygen (if you want to generate a source code documentation)] Installation Instruction ------------------------ Remark: To make sure everything runs smoothly, please make sure that all libraries and the RTToolbox are either compiled with \MD or \MT flags. If third party library packages cannot be found automatically, cmake will ask for them. Please give the location of the root folder, where the libraries where built for dcmtk, and Litmus. [A. If you build tests - Litmus] A.1. Configure Litmus with CMake (separated binary folder recommended) A.2. Build Litmus A.3. Enable BUILD_TESTING A.4. Press Configure A.5. Enable tests of interest A.6. Enable BUILD_RTToolbox_Test_examples if you want examples [B. If you build Helax or DICOM support - Boost] B.1. Build (using the same compiler options as RTToolbox, usually STATIC LINKING and x64 architecture). The component "filesystem" needs compilation. For all other modules, only the headers are required. [C. If you want DICOM support - DCMTK] For Windows: To compile DCMTK with \MD flags (standard for all other libs), you need to patch the CMAKE options of DCMTK (\\DCMTK\CMake\dcmtkPrepare.cmake), either by replacing "/MT" with "/MD" or by explicitly replacing lines 135 to 171 with the following lines: IF(DCMTK_OVERWRITE_WIN32_COMPILER_FLAGS AND NOT BUILD_SHARED_LIBS) # settings for Microsoft Visual Studio IF(CMAKE_GENERATOR MATCHES "Visual Studio .*") # get Visual Studio Version STRING(REGEX REPLACE "Visual Studio ([0-9]+).*" "\\1" VS_VERSION "${CMAKE_GENERATOR}") # these settings never change even for C or C++ SET(CMAKE_C_FLAGS_DEBUG "/MDd /Z7 /Od") SET(CMAKE_C_FLAGS_RELEASE "/DNDEBUG /MD /O2") SET(CMAKE_C_FLAGS_MINSIZEREL "/DNDEBUG /MD /O2") SET(CMAKE_C_FLAGS_RELWITHDEBINFO "/DNDEBUG /MDd /Z7 /Od") SET(CMAKE_CXX_FLAGS_DEBUG "/MDd /Z7 /Od") SET(CMAKE_CXX_FLAGS_RELEASE "/DNDEBUG /MD /O2") SET(CMAKE_CXX_FLAGS_MINSIZEREL "/DNDEBUG /MD /O2") SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/DNDEBUG /MDd /Z7 /Od") # specific settings for the various Visual Studio versions IF(VS_VERSION EQUAL 6) SET(CMAKE_C_FLAGS "/nologo /W3 /GX /Gy /YX") SET(CMAKE_CXX_FLAGS "/nologo /W3 /GX /Gy /YX /Zm500") # /Zm500 increments heap size which is needed on some system to compile templates in dcmimgle ENDIF(VS_VERSION EQUAL 6) IF(VS_VERSION EQUAL 7) SET(CMAKE_C_FLAGS "/nologo /W3 /Gy") SET(CMAKE_CXX_FLAGS "/nologo /W3 /Gy") ENDIF(VS_VERSION EQUAL 7) IF(VS_VERSION GREATER 7) SET(CMAKE_C_FLAGS "/nologo /W3 /Gy /EHsc") SET(CMAKE_CXX_FLAGS "/nologo /W3 /Gy /EHsc") ENDIF(VS_VERSION GREATER 7) ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio .*") ENDIF(DCMTK_OVERWRITE_WIN32_COMPILER_FLAGS AND NOT BUILD_SHARED_LIBS) C.1. Configure DCMTK with CMake For unix-like systems: Set the CMake parameter DCMTK_FORCE_FPIC_ON_UNIX to true (It is an advanced parameter) C.2. Build DCMTK [D. If you want ITKIO or DoseInterpolation support with itk::Transform - ITK] D.1. Build ITK. [E. If you want support of DoseInterpolation with MatchPoint Registration objects - MatchPoint] E.1. Build MatchPoint. [F. Configure/Build RTToolbox] F.1. Configure with CMake F.1.1. Set BOOST_INCLUDE_DIR to the main boost directory (where "boost_build.jam" is located) REMARK: For the current version of the RTToolbox you do need to build boost only if you want to use the provided Helax-Dicom or DICOM data support. Otherwise you can use headers only. F.2. Select all packages you like to build (Parameters "BUILD_*"; e.g. BUILD_IO_Dicom) F.2.1. If you select BUILD_IO_DICOM the configuration will ask you for the DCMTK main directory (parameter DCMTK_DIR; where you have built DCMTK). REMARK: If you have built DCMTK as out source build you have to also set the CMake parameter DCMTK_SOURCE_DIR to the root directory of the DCMTK source. F.2.3. If you select BUILD_ITKBinding or BUILD_IO_ITK, set ITK_DIR to the binary directory of ITK F.2.3. If you select BUILD_MatchPointBinding, set MatchPoint_DIR to the binary directory of MatchPoint F.3. Generate CMake configuration F.4. Build RTToolbox and have fun! [G. Documentation] G.1. Generate the documentation using doxygen and the configuration found in "RTTB_binary_dir/documentation/doxygen.config". [H. Tests] H.1. Run tests (build RUN_TESTS project or ctest) to ensure that everything is correct. [I. Examples] I.1. Run tests (build RUN_TESTS project) to also build the examples. Be sure to have switched it on before (see A.6). These examples are a good starting point for own projects and show basic functionality of RTToolbox like DVH generation. Remarks ------- R.1. Virtuos Support: Virtuos is a proprietary data format and therefore not included in the RTToolbox. R.2. ITK Version: Only use one ITK version consistently throughout all libraries and RTToolbox! Otherwise, this will lead to linker errors. diff --git a/cmake/PackageDepends/RTTB_BoostBinaries_Config.cmake b/cmake/PackageDepends/RTTB_BoostBinaries_Config.cmake index 7a9bd23..3da814d 100644 --- a/cmake/PackageDepends/RTTB_BoostBinaries_Config.cmake +++ b/cmake/PackageDepends/RTTB_BoostBinaries_Config.cmake @@ -1,28 +1,29 @@ IF(NOT BoostBinaries_FOUND) IF(DEFINED Boost_INCLUDE_DIR) IF(NOT IS_ABSOLUTE ${Boost_INCLUDE_DIR}) SET(Boost_INCLUDE_DIR "${RTToolbox_BINARY_DIR}/${Boost_INCLUDE_DIR}") ENDIF(NOT IS_ABSOLUTE ${Boost_INCLUDE_DIR}) ENDIF(DEFINED Boost_INCLUDE_DIR) IF(BUILD_SHARED_LIBS) SET(Boost_USE_STATIC_LIBS OFF) ELSE(BUILD_SHARED_LIBS) SET(Boost_USE_STATIC_LIBS ON) ENDIF(BUILD_SHARED_LIBS) - FIND_PACKAGE(Boost REQUIRED COMPONENTS filesystem) + SET(BOOST_MIN_VERSION "1.56.0") + FIND_PACKAGE(Boost ${BOOST_MIN_VERSION} REQUIRED COMPONENTS filesystem) LIST(APPEND ALL_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIRS}) LIST(APPEND ALL_LIBRARIES ${Boost_LIBRARIES}) link_directories(${Boost_LIBRARY_DIRS}) MARK_AS_ADVANCED(CLEAR Boost_INCLUDE_DIR) SET(BoostBinaries_FOUND TRUE) ENDIF(NOT BoostBinaries_FOUND) diff --git a/cmake/PackageDepends/RTTB_Boost_Config.cmake b/cmake/PackageDepends/RTTB_Boost_Config.cmake index 19684ab..5136470 100644 --- a/cmake/PackageDepends/RTTB_Boost_Config.cmake +++ b/cmake/PackageDepends/RTTB_Boost_Config.cmake @@ -1,21 +1,17 @@ IF(NOT Boost_FOUND) IF(DEFINED Boost_INCLUDE_DIR) IF(NOT IS_ABSOLUTE ${Boost_INCLUDE_DIR}) SET(Boost_INCLUDE_DIR "${RTToolbox_BINARY_DIR}/${Boost_INCLUDE_DIR}") ENDIF(NOT IS_ABSOLUTE ${Boost_INCLUDE_DIR}) ENDIF(DEFINED Boost_INCLUDE_DIR) SET(BOOST_MIN_VERSION "1.56.0") - FIND_PACKAGE(Boost ${BOOST_MIN_VERSION} REQUIRED) LIST(APPEND ALL_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIRS}) - # this is only necessary if we use more than just the headers - LIST(APPEND ALL_LIBRARIES ${Boost_LIBRARIES}) - link_directories(${Boost_LIBRARY_DIRS}) MARK_AS_ADVANCED(CLEAR Boost_INCLUDE_DIR) ENDIF(NOT Boost_FOUND) diff --git a/cmake/PackageDepends/RTTB_PostgreSQL_Config.cmake b/cmake/PackageDepends/RTTB_PostgreSQL_Config.cmake deleted file mode 100644 index d815cdb..0000000 --- a/cmake/PackageDepends/RTTB_PostgreSQL_Config.cmake +++ /dev/null @@ -1,17 +0,0 @@ -#use postgresql -#if using Win64 generator -IF(CMAKE_CL_64) - SET(POSTGRESQL_DIR ${RTToolbox_SOURCE_DIR}/../PostgreSQL-8.4-64) -ELSE() - SET(POSTGRESQL_DIR ${RTToolbox_SOURCE_DIR}/../postgresql-8.3.8-1) -ENDIF(CMAKE_CL_64) - -LIST(APPEND ALL_INCLUDE_DIRECTORIES ${POSTGRESQL_DIR}/include) - -IF(CMAKE_CL_64) - LIST(APPEND ALL_LIBRARIES libpq libpqdll) -ELSE() - LIST(APPEND ALL_LIBRARIES libpq) -ENDIF(CMAKE_CL_64) - -LINK_DIRECTORIES(${POSTGRESQL_DIR}/lib) diff --git a/code/io/CMakeLists.txt b/code/io/CMakeLists.txt index c2e03cb..4c8436b 100644 --- a/code/io/CMakeLists.txt +++ b/code/io/CMakeLists.txt @@ -1,22 +1,22 @@ MESSAGE (STATUS "processing RTToolbox io") ADD_SUBDIRECTORY (other) -OPTION(BUILD_IO_Dicom "Determine if the IO class wrappers for DICOM format will be generated." OFF) +OPTION(BUILD_IO_Dicom "Determine if the IO class wrappers for DICOM format will be generated." ON) IF(BUILD_IO_Dicom) ADD_SUBDIRECTORY(dicom) OPTION(BUILD_IO_HELAX "Determine if the IO class wrappers for HELAX format will be generated." OFF) IF(BUILD_IO_HELAX) ADD_SUBDIRECTORY(helax) ENDIF(BUILD_IO_HELAX) ENDIF(BUILD_IO_Dicom) OPTION(BUILD_IO_ITK "Determine if the IO class wrappers for ITK image formats will be generated." OFF) IF(BUILD_IO_ITK) ADD_SUBDIRECTORY(itk) ENDIF(BUILD_IO_ITK) OPTION(BUILD_IO_Virtuos "Determine if the IO class wrappers for Virtuos format will be generated." OFF) IF(BUILD_IO_Virtuos) ADD_SUBDIRECTORY(virtuos) ENDIF(BUILD_IO_Virtuos) diff --git a/code/masks/CMakeLists.txt b/code/masks/CMakeLists.txt index eb03da7..2448ec2 100644 --- a/code/masks/CMakeLists.txt +++ b/code/masks/CMakeLists.txt @@ -1,17 +1,17 @@ MESSAGE (STATUS "processing RTToolbox mask") RTTB_CREATE_MODULE(RTTBMasks DEPENDS RTTBCore PACKAGE_DEPENDS boost) -OPTION(BUILD_MASK_BOOST "Determine if the boost mask voxelization will be supported." ON) -IF(BUILD_MASK_BOOST) +OPTION(BUILD_Masks_Boost "Determine if the boost mask voxelization will be supported." ON) +IF(BUILD_Masks_Boost) ADD_SUBDIRECTORY(boost) -ENDIF(BUILD_MASK_BOOST) +ENDIF(BUILD_Masks_Boost) -OPTION(BUILD_OTBMASK "Determine if the rttb OTB mask voxalization will be supported." ON) -IF(BUILD_OTBMASK) +OPTION(BUILD_Masks_OTB "Determine if the rttb OTB mask voxalization will be supported." OFF) +IF(BUILD_Masks_OTB) ADD_SUBDIRECTORY(legacy) -ENDIF(BUILD_OTBMASK) +ENDIF(BUILD_Masks_OTB)