The following issue has been SUBMITTED. ====================================================================== http://www.cmake.org/Bug/view.php?id=14786 ====================================================================== Reported By: Philipp Möller Assigned To: ====================================================================== Project: CMake Issue ID: 14786 Category: CMake Reproducibility: always Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2014-03-05 08:06 EST Last Modified: 2014-03-05 08:06 EST ====================================================================== Summary: Imported targets always require an IMPORTED_LOCATION Description: When creating an imported target "importtarget" and not setting the IMPORTED_LOCATION property, targets linking against the imported target will have a dependency on importtarget-NOTFOUND, making it impossible to build.
A common use case is to manually create imported targets from the result of a find_package call for easy reference to the dependency in various places in the build system. Some libraries (like core Boost, Eigen) don't have any libraries. Steps to Reproduce: Use: cmake_minimum_required(VERSION 2.8) project(Foo) add_executable(main main.cpp) add_library(Header_only_lib IMPORTED) set_target_properties(${lib} PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "/usr/include/my_lib" ) target_link_libraries(main Header_only_lib) cmake . make main # boom Additional Information: AFAIK this is going to be resolved with add_library(foo INTERFACE IMPORTED), but a work-around for earlier CMake versions would be much appreciated. ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2014-03-05 08:06 Philipp Möller New Issue ====================================================================== -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers