-
Notifications
You must be signed in to change notification settings - Fork 127
Description
When trying to include elastix by another project the following cmake error occurs:
-- Including Elastix settings.
CMake Error at src/elastix/build/UseElastix.cmake:25 (include):
include called with wrong number of arguments. include() only takes one
file.
Call Stack (most recent call first):
CMakeLists.txt:273 (INCLUDE)
with the following include by the other project:
SET(ELASTIX_BINARY_DIR [PATH TO ELASTIX]/build)
SET( ELASTIX_USE_FILE ${ELASTIX_BINARY_DIR}/UseElastix.cmake )
INCLUDE( ${ELASTIX_USE_FILE} )
Including the following line at the beginning of the file build/UseElastix.cmake solves the problem for me:
include( [PATH TO ELASTIX]/build/ElastixConfig.cmake )
Maybe you want to change UseElastix.cmake.in with appropriate cmake variables to keep it general?