Skip to content

Including elastix by another project failed #44

@F462

Description

@F462

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions