The following issue has been SUBMITTED. ====================================================================== http://www.cmake.org/Bug/view.php?id=15689 ====================================================================== Reported By: James Johnston Assigned To: ====================================================================== Project: CMake Issue ID: 15689 Category: CMake Reproducibility: always Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2015-08-07 15:17 EDT Last Modified: 2015-08-07 15:17 EDT ====================================================================== Summary: target_include_directories INTERFACE does not work for IMPORTED targets Description: When target_include_directories is used with an INTERFACE option on an IMPORTED target, the command fails with an error.
Since I specified INTERFACE and not PUBLIC or PRIVATE, I should expect the command to work without error on the IMPORTED target. As a workaround, I have to use the more verbose set_property command. Steps to Reproduce: add_library(MyLib SHARED IMPORTED) set_property(TARGET MyLib PROPERTY IMPORTED_LOCATION mylib.dll) set_property(TARGET MyLib PROPERTY IMPORTED_IMPLIB mylib.lib) # Following line fails with an error: target_include_directories(MyLib INTERFACE mylib/include) # The error is: # Cannot specify include directories for imported target "MyLib". # Alternative command that works: # set_property(TARGET MyLib APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES mylib/include) ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-08-07 15:17 James Johnston New Issue ====================================================================== -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers