[cmake-developers] [CMake 0013797]: get_property(... TARGET project PROPERTY LOCATION returns incorrect value

Mantis Bug Tracker mantis at public.kitware.com
Fri Dec 14 13:48:56 EST 2012


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=13797 
====================================================================== 
Reported By:                Richard Bateman
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   13797
Category:                   CMake
Reproducibility:            always
Severity:                   major
Priority:                   high
Status:                     new
====================================================================== 
Date Submitted:             2012-12-14 13:48 EST
Last Modified:              2012-12-14 13:48 EST
====================================================================== 
Summary:                    get_property(... TARGET project PROPERTY LOCATION
returns incorrect value
Description: 
Starting with cmake 2.8.10 when I use:

    get_property(LIBDIR TARGET ${PROJNAME} PROPERTY LOCATION)

I now get /path/to/libGCPlugin.so.plugin/Contents/MacOS/libGCPlugin.so

I should get /path/to/GCPlugin.plugin/Contents/MacOS/GCPLugin

I don't know what changed; 

Steps to Reproduce: 
There is a test in the cmake source that should be able to reproduce it; if it's
not a simple thing to see what happened I can help track it down. 

Basically create a library:

add_library(somePlugin MODULE ${SOURCES})

    set_target_properties(somePlugin PROPERTIES
        OUTPUT_NAME somePlugin
        BUNDLE 1
        BUNDLE_EXTENSION plugin
        XCODE_ATTRIBUTE_WRAPPER_EXTENSION plugin  #sets the extension to .plugin
        XCODE_ATTRIBUTE_MACH_O_TYPE mh_bundle
        XCODE_ATTRIBUTE_INFOPLIST_FILE
${CMAKE_CURRENT_BINARY_DIR}/bundle/Info.plist
        MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_BINARY_DIR}/bundle/Info.plist)

Then do:

    get_property(LIBDIR TARGET somePlugin PROPERTY LOCATION)

message("Lib dir: ${LIBDIR}")

Additional Information: 
This is really easy to reproduce with a firebreath plugin; I can upload a test
project that you could play with with firebreath if you wanted to try it that
way. I am also willing to help if you can give me an idea where to look. I am
willing to help if it is needed.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2012-12-14 13:48 Richard BatemanNew Issue                                    
======================================================================




More information about the cmake-developers mailing list