diff --git a/CMakeLists.txt b/CMakeLists.txt index 6351ea94f..4e32b1349 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,17 +1,9 @@ -cmake_minimum_required( VERSION 2.8 ) +cmake_minimum_required( VERSION 3.5.1 ) project( elastix ) #--------------------------------------------------------------------- cmake_policy( SET CMP0012 NEW ) -if( POLICY CMP0033 ) - # This policy was introduced in cmake 3, so we need to check for its - # existence. When the minimum cmake version above is upgraded to 3 - # this if(POLICY) check can be removed. - cmake_policy( SET CMP0033 OLD ) -endif() - -cmake_policy( SET CMP0007 OLD ) cmake_policy( SET CMP0042 NEW ) #--------------------------------------------------------------------- @@ -570,9 +562,7 @@ endif() # Make it easier to include elastix functionality in other programs. # Save library dependencies. -# The library dependencies file. -set( elxLIBRARY_DEPENDS_FILE ${elastix_BINARY_DIR}/elxLibraryDepends.cmake ) -export_library_dependencies( ${elxLIBRARY_DEPENDS_FILE} ) + # The build settings file. (necessary for elastix?) #set( ITK_BUILD_SETTINGS_FILE ${ITK_BINARY_DIR}/ITKBuildSettings.cmake ) @@ -580,10 +570,6 @@ export_library_dependencies( ${elxLIBRARY_DEPENDS_FILE} ) elastix_export_target( elastix ) elastix_export_target( transformix ) -foreach( LIB IN LISTS AllComponentLibs ) - elastix_export_target( ${LIB} ) -endforeach() - configure_file( ${CMAKE_SOURCE_DIR}/ElastixConfig.cmake.in ${CMAKE_BINARY_DIR}/ElastixConfig.cmake @ONLY ) configure_file( ${CMAKE_SOURCE_DIR}/ElastixConfigVersion.cmake.in ${CMAKE_BINARY_DIR}/ElastixConfigVersion.cmake @ONLY ) configure_file( ${CMAKE_SOURCE_DIR}/UseElastix.cmake.in ${CMAKE_BINARY_DIR}/UseElastix.cmake @ONLY ) diff --git a/ElastixConfig.cmake.in b/ElastixConfig.cmake.in index 70193fde0..e540105aa 100644 --- a/ElastixConfig.cmake.in +++ b/ElastixConfig.cmake.in @@ -21,7 +21,3 @@ set( ELASTIX_USE_OPENCL @ELASTIX_USE_OPENCL@ ) set( ELASTIX_USE_MEVISDICOMTIFF @ELASTIX_USE_MEVISDICOMTIFF@ ) set( ELASTIX_DOX_DIR @ELASTIX_DOX_DIR@ ) set( ELASTIX_HELP_DIR @ELASTIX_HELP_DIR@ ) - -# Maintain backwards compatibility by also exporting old-style target information -set( ELASTIX_ALL_COMPONENT_LIBS @AllComponentLibs@ ) -set( elxLIBRARY_DEPENDS_FILE @elxLIBRARY_DEPENDS_FILE@ ) diff --git a/UseElastix.cmake.in b/UseElastix.cmake.in index 5614aa256..56bcd09fa 100644 --- a/UseElastix.cmake.in +++ b/UseElastix.cmake.in @@ -13,14 +13,5 @@ include_directories( ${ELASTIX_INCLUDE_DIRS} ) # Add library dirs link_directories( ${ELASTIX_LIBRARY_DIRS} ) -# If Elastix_FOUND is set, this file is included via find_package() which provides -# ELASTIX_CONFIG_TARGETS_FILE and elxLIBRARY_DEPENDS_FILE. Guarding the following -# include statements allow users to include this file directly for backwards -# compatibility. -if( Elastix_FOUND ) - # This file was found by find_package - include( ${ELASTIX_CONFIG_TARGETS_FILE} ) -else() - # Include linking dependency info for backwards compatibility - include( ${elxLIBRARY_DEPENDS_FILE} ) -endif() +# This file was found by find_package +include( ${ELASTIX_CONFIG_TARGETS_FILE} ) diff --git a/dox/externalproject/CMakeLists.txt b/dox/externalproject/CMakeLists.txt index bf7bc5bc8..ef8532d41 100644 --- a/dox/externalproject/CMakeLists.txt +++ b/dox/externalproject/CMakeLists.txt @@ -1,7 +1,7 @@ # Example project for using elastix code from external projects. PROJECT( elxExternalProject ) -CMAKE_MINIMUM_REQUIRED( VERSION 2.8 ) +CMAKE_MINIMUM_REQUIRED( VERSION 3.5.1 ) # Find TIK FIND_PACKAGE( ITK REQUIRED )