View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0013797 | CMake | CMake | public | 2012-12-14 13:48 | 2013-11-04 09:33 | ||||
Reporter | Richard Bateman | ||||||||
Assigned To | Clinton Stimpson | ||||||||
Priority | high | Severity | major | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | XCode | OS | Mac OS | OS Version | all (presumably) | ||||
Product Version | |||||||||
Target Version | CMake 2.8.12 | Fixed in Version | |||||||
Summary | 0013797: OS X CFBundle PREFIX and SUFFIX are set too late | ||||||||
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. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | ||||||
|
Relationships |
Notes | |
(0031898) Brad King (manager) 2012-12-14 14:16 |
What version of CMake were you using that reported the correct path in this case? I'd like to find when/why this changed. However, you may not need to use the property. Note from the LOCATION property documentation: http://www.cmake.org/cmake/help/v2.8.10/cmake.html#prop_tgt:LOCATION [^] "this property is provided for compatibility with CMake 2.4 and below" If you are getting the location to pass to add_custom_command or add_test then use the $<TARGET_FILE:...> generator expression instead. |
(0031899) Brad King (manager) 2012-12-14 14:44 |
From a small test case I can see that LOCATION gets the prefix/suffix but $<TARGET_FILE:...> does not. The reason is that the former is computed during configuration and the latter during generation. In between those steps this code runs: http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmGlobalXCodeGenerator.cxx;hb=v2.8.10.2#l706 [^] if(cmtarget.IsCFBundleOnApple()) { cmtarget.SetProperty("PREFIX", ""); cmtarget.SetProperty("SUFFIX", ""); } This was part of your original patch: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5457b825 [^] I think setting the properties during generation like that is incorrect. Instead cmTarget::GetFullNameInternal should be taught that for CFBundle targets the prefix and suffix should default to empty if the property is not explicitly set. |
(0033174) Clinton Stimpson (developer) 2013-06-03 08:40 |
483e208 OS X: Fix getting of CFBundle LOCATION property. |
(0034350) Robert Maynard (manager) 2013-11-04 09:33 |
Closing resolved issues that have not been updated in more than 4 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2012-12-14 13:48 | Richard Bateman | New Issue | |
2012-12-14 14:16 | Brad King | Note Added: 0031898 | |
2012-12-14 14:40 | Brad King | Relationship added | related to 0011295 |
2012-12-14 14:44 | Brad King | Note Added: 0031899 | |
2012-12-14 14:49 | Brad King | Target Version | => CMake 2.8.11 |
2012-12-14 14:49 | Brad King | Summary | get_property(... TARGET project PROPERTY LOCATION returns incorrect value => OS X CFBundle PREFIX and SUFFIX are set too late |
2013-05-17 09:33 | Robert Maynard | Target Version | CMake 2.8.11 => CMake 2.8.12 |
2013-06-03 08:32 | Clinton Stimpson | Assigned To | => Clinton Stimpson |
2013-06-03 08:32 | Clinton Stimpson | Status | new => assigned |
2013-06-03 08:40 | Clinton Stimpson | Note Added: 0033174 | |
2013-06-03 08:40 | Clinton Stimpson | Status | assigned => resolved |
2013-06-03 08:40 | Clinton Stimpson | Resolution | open => fixed |
2013-11-04 09:33 | Robert Maynard | Note Added: 0034350 | |
2013-11-04 09:33 | Robert Maynard | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |