[cmake-developers] [CMake 0012879]: fix: allow absolute paths in IMPORTED_LOCATION with full filename under windows

Mantis Bug Tracker mantis at public.kitware.com
Tue Jan 17 20:33:21 EST 2012


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=12879 
====================================================================== 
Reported By:                Thomas Fischer
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   12879
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2012-01-17 20:33 EST
Last Modified:              2012-01-17 20:33 EST
====================================================================== 
Summary:                    fix: allow absolute paths in IMPORTED_LOCATION with
full filename under windows
Description: 
the attached patch will allow to use full paths for imported libs for the VS2010
generator, like this:

SET_PROPERTY(TARGET ${libName} PROPERTY  IMPORTED_LOCATION_RELEASE       
${ROR_DEPENDENCIES_DIR}/libs/${ARCH_DIR}/${dirName}/Release/${libName}.lib)

Steps to Reproduce: 
since this is a shortcoming that treads every _LOCATION as path, it will always
reproduce

Additional Information: 
i was not able to get VisualStudio to link correctly with the unpatched code.
The new code will check before assuming if its a directory (FileIsDirectory) so
no harm done there.

escaping paths and filenames for windows also always work, even when no '/' or
'\' are in the filename.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2012-01-17 20:33 Thomas Fischer New Issue                                    
2012-01-17 20:33 Thomas Fischer File Added: cmake-lib-import.patch              
     
======================================================================




More information about the cmake-developers mailing list