[cmake-developers] _IMPORT_PREFIX and using full paths
Arkadiusz Miśkiewicz
arekm at maven.pl
Thu Nov 20 08:10:55 EST 2014
Hello.
Trying to build kde frameworks and got weird problem, when building kauth
which uses kcoreaddons :
"CMake Error in src/CMakeLists.txt:
Imported target "KF5::CoreAddons" includes non-existent path
"/include/KF5/KCoreAddons"
in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:
* The path was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and references files it does not
provide.
"
that's because:
/usr/lib64/cmake/KF5CoreAddons/KF5CoreAddonsTargets.cmake contains:
44 set_target_properties(KF5::CoreAddons PROPERTIES
45 INTERFACE_COMPILE_DEFINITIONS "KCOREADDONS_LIB"
46 INTERFACE_INCLUDE_DIRECTORIES
"${_IMPORT_PREFIX}/include/KF5/KCoreAddons;${_IMPORT_PREFIX}/include/KF5"
47 INTERFACE_LINK_LIBRARIES "Qt5::Core"
48 )
49
and since I'm using full paths (and not relative paths) the _IMPORT_PREFIX is
empty [1] thus I'm ending up with invalid "/include/KF5" path.
Shouldn't cmake generate full paths like
INTERFACE_INCLUDE_DIRECTORIES "/usr/include/KF5/KCoreAddons;/usr/include/KF5"
in such case?
Tested on 3.0.2 and 3.1.0rc2.
1.
http://www.cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmExportInstallFileGenerator.cxx;h=89071c052ce28a82f57e06d96b2b7d519259c2f0;hb=HEAD#l72
KF5CoreAddonsTargets.cmake file: http://sprunge.us/bGDE
kcoreaddons build log, including cmake options used: http://sprunge.us/hINb
irc discussion about the problem: http://sprunge.us/ZKBa
--
Arkadiusz Miśkiewicz, arekm / ( maven.pl | pld-linux.org )
More information about the cmake-developers
mailing list