The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=13747 ====================================================================== Reported By: Stephen Kelly Assigned To: ====================================================================== Project: CMake Issue ID: 13747 Category: CMake Reproducibility: have not tried Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2012-11-27 09:19 EST Last Modified: 2012-11-27 09:19 EST ====================================================================== Summary: export(PACKAGE) prioritizes build-tree over install-tree Description:
The package BoostAny depends on BoostCore. Both packages create a Config file in the build tree and install one in the install tree. There is a export(PACKAGE) call for each of them. If I set CMAKE_PREFIX_PATH to the install location of BoostAny, I can use find_package(BoostAny) and it will find it in the install location. However, as BoostAnyConfig.cmake has a find_package(BoostCore) inside it, the BoostCore package is found in the build-tree instead of the install tree. As the BoostAny and BoostCore packages are both installed and beside each other in the filesystem, this is an unintuitive result. The find_package documentation does not state the order of prefixes searched for packages. It seems to me that the export(PACKAGE) prefixes should be a fallback after trying in the CMAKE_PREFIX_PATH, but I don't know if that can be changed now. It would be possible to use find_package( ... PATHS ${CMAKE_CURRENT_LIST_DIR} ) in BoostAnyConfig.cmake, but that would require that all Boost packages be installed to the same prefix. It may be that they want to be able to install different libraries to different prefixes (I don't know, but I think CMake should allow it). ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2012-11-27 09:19 Stephen Kelly New Issue ====================================================================== -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers