[cmake-developers] [CMake 0014311]: CMake cannot install imported targets

Mantis Bug Tracker mantis at public.kitware.com
Thu Jul 25 05:19:50 EDT 2013


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=14311 
====================================================================== 
Reported By:                Nikita Krupenko
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   14311
Category:                   CMake
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2013-07-25 05:19 EDT
Last Modified:              2013-07-25 05:19 EDT
====================================================================== 
Summary:                    CMake cannot install imported targets
Description: 
I use ExternalProject for building non-Cmake projects and add imported targets
for that projects. For example:

ExternalProject_add(mylib_proj ...)
add_library(mylib SHARED IMPORTED)
set_target_properties(mylib PROPERTIES IMPORTED_LOCATION ...)
add_dependencies(mylib mylib_proj)

I can link with that library, but CMake cannot install them. This code

install(TARGETS mylib DESTINATION ...)

produces following error:

CMake Error at CMakeLists.txt:48 (install):
  install TARGETS given target "mylib" which does not exist in this
  directory.

Because of broken install packaging using CPack also not working.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2013-07-25 05:19 Nikita KrupenkoNew Issue                                    
======================================================================




More information about the cmake-developers mailing list