MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0015101 | CMake | CMake | public | 2014-08-22 08:29 | 2015-03-02 08:57 |
Reporter | Björn Piltz | ||||
Assigned To | |||||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Apple Mac | OS | OS X | OS Version | 10.4.10 |
Product Version | CMake 3.0.1 | ||||
Target Version | CMake 3.1 | Fixed in Version | CMake 3.1 | ||
Summary | 0015101: Imported libraries go out of scope after call to target_link_libraries(). | ||||
Description | I have a project where module lib - a library - depends on Qt, so it calls find_package(Qt5 ...) and target_link_libraries(lib Qt5::Core). Later I call target_link_libraries(app lib). The cmake configure step runs through without problems, but the generate step halts with the message: Target "app" links to target "Qt5::Core" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing? According to the documentation the target Qt5::Core is out of scope for 'app' since app is not in a subdirectory of the directory where add_library(... IMPORTED) was made, but I would argue that this is a bug since the target was in scope when the call add_library(lib Qt5::Core) was made. This issue is not specific to Qt and I'm aware that it could be fixed on their side by calling add_library(... IMPORTED GLOBAL). I'm hoping it could be fixed on the cmake side, though. | ||||
Steps To Reproduce | git clone https://github.com/bjornpiltz/cmake_bug.git [^] cmake_bug mkdir work cd work cmake -DCMAKE_PREFIX_PATH=<Qt5>/lib/cmake/ ../cmake_bug/ | ||||
Additional Information | This issue is platform independent. | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2014-08-22 08:29 | Björn Piltz | New Issue | |||
2014-08-22 08:47 | Brad King | Note Added: 0036661 | |||
2014-08-22 08:50 | Brad King | Note Added: 0036662 | |||
2014-08-22 10:45 | Brad King | Target Version | => CMake 3.1 | ||
2014-09-02 11:07 | Brad King | Status | new => resolved | ||
2014-09-02 11:07 | Brad King | Resolution | open => fixed | ||
2014-09-02 11:07 | Brad King | Fixed in Version | => CMake 3.1 | ||
2015-03-02 08:57 | Robert Maynard | Note Added: 0038111 | |||
2015-03-02 08:57 | Robert Maynard | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|