[cmake-developers] find_package without REQUIRED can cause fatal error now
developerchris at rebel.com.au
Wed Apr 24 23:17:23 EDT 2013
Alexander Neundorf <neundorf at ...> writes:
> > We need to figure out what tells find_package to look for and
> > load KActivitiesConfig.cmake from a path with no drive letter
> > in the first place.
> Is it this one http://public.kitware.com/Bug/view.php?id=10994 ?
> Powered by www.kitware.com
> Visit other Kitware open-source projects at
> Please keep messages on-topic and check the CMake FAQ at:
> Follow this link to subscribe/unsubscribe:
It appears the issue is in the find_package function it is incorrectly
changing the CMAKE_CURRENT_LIST_FILE and dropping the drive letter and colon
cmake called with...
cmake -G "MinGW Makefiles" -DBUILD_doc=OFF -DCMAKE_INSTALL_PREFIX="r:/"
-DCMAKE_PREFIX_PATH="r:/" -DCMAKE_BUILD_TYPE=RelWithDebInfo "q:\kate"
macro_optional_find_package(KActivities 6.1.0) is called from
q:/kate/CMakeLists.txt at that point CMAKE_CURRENT_LIST_FILE is set to
macro_optional_find_package calls find_package(KActivities) at that point
CMAKE_CURRENT_LIST_FILE is still set to q:/kate/CMakeLists.txt
when find_package calls r:\lib\cmake\KActivities\KActivitiesConfig.cmake
CMAKE_CURRENT_LIST_FILE is changed to
The call stack below shows that change occuring.
I cannot find any point where the change occurs. I can only assume its
log output with extra messages inserted
-- Found the KDE4 kconfig_compiler preprocessor: r://bin/kconfig_compiler.exe
-- Found automoc4: R:/bin/automoc4.exe
-- CMAKE_CURRENT_LIST_FILE : q:/kate/CMakeLists.txt
-- MACRO_OPTIONAL_FIND_PACKAGE KActivities
-- finding package KActivities 6.1.0 CMAKE_CURRENT_LIST_FILE :
-- setting rootDir : /lib/cmake/KActivities and myDir :
/lib/cmake/KActivities taken from CMAKE_CURRENT_LIST_FILE :
CMake Error at /lib/cmake/KActivities/KActivitiesLibraryTargets.cmake:63
The imported target "kactivities" references the file
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
but not all the files it references.
Call Stack (most recent call first):
More information about the cmake-developers