elastix
elastix copied to clipboard
Missing CMake package config files after installing
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.
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.
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.
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.