| Summary: | [CMake 2.8.8] Support new target property INCLUDE_DIRECTORIES. | ||
|---|---|---|---|
| Product: | [Applications] kdevelop | Reporter: | bungeman |
| Component: | Build tools: CMake | Assignee: | kdevelop-bugs-null |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | 4.3.60 | ||
| Target Milestone: | 4.3.0 | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | http://commits.kde.org/kdevelop/08abdf880e4c0889cfc0383ee6b331db3aad548b | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
For a complete example, see the testcase at http://cmake.org/gitweb?p=cmake.git;a=tree;f=Tests/IncludeDirectories/TargetIncludeDirectories;h=1eb23f636ed2bd611477c2127b7c0b8da59af5a6;hb=a7d0fb1470cc7c900abfff14a87039d353a8c2b3 Git commit 08abdf880e4c0889cfc0383ee6b331db3aad548b by Milian Wolff, on behalf of Ben Wagner. Committed on 29/04/2012 at 07:08. Pushed by mwolff into branch '4.3'. Add support for cmake target include_directories. REVIEW: 104777 M +51 -40 projectmanagers/cmake/cmakemanager.cpp M +25 -6 projectmanagers/cmake/cmakemodelitems.cpp M +14 -7 projectmanagers/cmake/cmakemodelitems.h M +1 -1 projectmanagers/cmake/tests/CMakeLists.txt M +44 -0 projectmanagers/cmake/tests/cmakemanagertest.cpp M +1 -0 projectmanagers/cmake/tests/cmakemanagertest.h A +6 -0 projectmanagers/cmake/tests/manual/target_includes/CMakeLists.txt A +1 -0 projectmanagers/cmake/tests/manual/target_includes/includes/target_include.h [License: Trivial file] A +6 -0 projectmanagers/cmake/tests/manual/target_includes/main.cpp [License: UNKNOWN] * A +3 -0 projectmanagers/cmake/tests/manual/target_includes/target_includes.kdev4 The files marked with a * at the end have a non valid license. Please read: http://techbase.kde.org/Policies/Licensing_Policy and use the headers which are listed at that page. http://commits.kde.org/kdevelop/08abdf880e4c0889cfc0383ee6b331db3aad548b |
With CMake 2.8.8 released last week, it is now possible to write something like set_property(TARGET zlib APPEND PROPERTY INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/../include/config") This ability to have target specific includes has been a long time in coming, and is finally here. KDevelop should support these includes as soon as possible. Reproducible: Always Steps to Reproduce: 1. Create a 2.8.8 cmake project. 2. Put something like set_property(TARGET zlib APPEND PROPERTY INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/../include/config") in it. 3. Load the project in KDevelop. Actual Results: KDevelop does not find the include file. Expected Results: KDevelop does find the include file. It appears that right now a relative path is interpreted relative to the cmake build directory instead of the cmake source directory (which would make more sense). This may or may not be a bug in CMake, so for the time being I'm playing it safe and just using ${CMAKE_CURRENT_SOURCE_DIR} to get what I want in the above example.