Bug 298859 - [CMake 2.8.8] Support new target property INCLUDE_DIRECTORIES.
Summary: [CMake 2.8.8] Support new target property INCLUDE_DIRECTORIES.
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Build tools: CMake (show other bugs)
Version: 4.3.60
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: 4.3.0
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-26 15:46 UTC by bungeman
Modified: 2012-05-03 08:22 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bungeman 2012-04-26 15:46:46 UTC
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.
Comment 2 Milian Wolff 2012-05-03 08:22:26 UTC
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