View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0015788 | CMake | CMake | public | 2015-10-13 11:47 | 2016-03-07 09:12 | ||||
Reporter | SunBlack | ||||||||
Assigned To | |||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | no change required | ||||||
Platform | OS | Windows | OS Version | 8.1 | |||||
Product Version | CMake 3.3.2 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0015788: Error during export target, which has additional defined include directories with target_include_directories | ||||||||
Description | If you have a static library and want to add necessary include directories with target_include_directories so users of this library just need to add library with target_link_libraries (and don't need to add includes with include_directories), I currently got %%Configuring done CMake Error in CMakeLists.txt: Target "myProject" INTERFACE_INCLUDE_DIRECTORIES property contains path: "D:/myProjectDir/myIncludeDir" which is prefixed in the source directory. Generating done%% Source code: %%cmake_minimum_required(VERSION 3.3) project(myProject) add_library(${PROJECT_NAME} mySourceDir/test.cpp myIncludeDir/test.h ) target_include_directories(${PROJECT_NAME} PUBLIC "myIncludeDir") install(TARGETS ${PROJECT_NAME} EXPORT MyTargets ARCHIVE DESTINATION lib ) install(EXPORT MyTargets DESTINATION cmake)%% This message don't occurs, if I remove install. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0039594) Brad King (manager) 2015-10-13 11:52 |
This is a feature. CMake is preventing you from adding a public dependency on your source tree for users of your install tree. See the $<BUILD_INTERFACE:...> and $<INSTALL_INTERFACE:...> expressions and the example here: https://cmake.org/cmake/help/v3.4/manual/cmake-buildsystem.7.html#include-directories-and-usage-requirements [^] |
(0040616) Robert Maynard (manager) 2016-03-07 09:12 |
Closing resolved issues that have not been updated in more than 4 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2015-10-13 11:47 | SunBlack | New Issue | |
2015-10-13 11:52 | Brad King | Note Added: 0039594 | |
2015-10-13 11:52 | Brad King | Status | new => resolved |
2015-10-13 11:52 | Brad King | Resolution | open => no change required |
2016-03-07 09:12 | Robert Maynard | Note Added: 0040616 | |
2016-03-07 09:12 | Robert Maynard | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |