SyneRBI / SIRF-SuperBuild

SIRF CMake SuperBuild
http://www.ccpsynerbi.ac.uk
Apache License 2.0
15 stars 18 forks source link

When USE_SYSTEM_ITK=OFF, find_package can find an older version in the install directory #817

Open KrisThielemans opened 1 year ago

KrisThielemans commented 1 year ago

I ran the SB previously, which installed ITK-4.13. Now it builds ITK-5.2. However, STIR's find_package(ITK) still find 4.13. Similar things might happen with other versioned packages.

Ideally we'd set ITK_DIR to the version we built/installed, but that's not so easy as we don't really know what version that will be if someone sets ITK_TAG.

At present, the only solutions are

KrisThielemans commented 1 year ago

somewhat similar problem for ROOT, but as it doesn't install in a versioned directory, we can presumably set ROOT_DIR=${CMAKE_INSTALL_PREFIX}/cmake (note: no lib)