elastix icon indicating copy to clipboard operation
elastix copied to clipboard

Missing CMake package config files after installing

Open poretga99 opened this issue 3 years ago • 2 comments

This issue re-raises the already closed issue .

After installing Elastix as a library, the .cmake config files are missing:

ElastixConfig.cmake
ElastixConfigVersion.cmake
ElastixTargets.cmake

Current source CMake file correctly handles the build tree, whereas the install tree ignores the .cmake files.

poretga99 avatar Feb 08 '22 17:02 poretga99

set( ELASTIX_BUILD_DIR "" CACHE PATH "Path to elastix build folder" )
set( ELASTIX_USE_FILE ${ELASTIX_BUILD_DIR}/UseElastix.cmake )
if( EXISTS ${ELASTIX_USE_FILE} )
include( ${ELASTIX_USE_FILE} )
link_libraries( param )
link_libraries( elastix )
link_libraries( transformix )
endif()

Adding this to your own CMakeLists.txt, thus you can see the ELASTIX_ BUILD_ DIR, which needs to be provided by the user when running cmake.

Li-chunming avatar Feb 14 '22 10:02 Li-chunming

As stated in the initial comment, the build tree is not problematic. If you want to install elastix via make install or any other way, you end up with all the headers, libraries and executables, but no CMake config files. The base CMake file should be updated so that the install tree also takes care of the .cmake files.

poretga99 avatar Feb 14 '22 15:02 poretga99

Thanks for reporting. As far as I can see, it is fixed by now, by https://github.com/SuperElastix/elastix/pull/655 (by Bradley Lowekamp).

Please reopen, if you think otherwise.

N-Dekker avatar Jan 13 '23 15:01 N-Dekker