Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
cmake_minimum_required( VERSION 2.8 )
cmake_minimum_required( VERSION 3.5.1 )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this strictly necessary? If so, fine, if not, it might be annoying to users to work around.


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 )

#---------------------------------------------------------------------
Expand Down Expand Up @@ -549,9 +541,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 )
Expand Down
1 change: 0 additions & 1 deletion ElastixConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ set( ELASTIX_HELP_DIR @ELASTIX_HELP_DIR@ )

# Maintain backwards compatibility by also exporting old-style target information
set( ELASTIX_ALL_COMPONENT_LIBS @AllComponentLibs@ )
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kaspermarstal Should this line with ELASTIX_ALL_COMPONENT_LIBS also be removed? But if so, what about @AllComponentLibs@?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything allcomponentlibs-related should be removed :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set( elxLIBRARY_DEPENDS_FILE @elxLIBRARY_DEPENDS_FILE@ )
7 changes: 1 addition & 6 deletions UseElastix.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,8 @@ include_directories( ${ELASTIX_INCLUDE_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.
# ELASTIX_CONFIG_TARGETS_FILE.
if( Elastix_FOUND )
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kaspermarstal Should the if be removed, now that I removed the entire else clause?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Marius wondered if there shouldn't be an else-clause, producing an error message when Elastix is not found. But you think that's not necessary, right?

# 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()
2 changes: 1 addition & 1 deletion dox/externalproject/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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 )
Expand Down