MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0015485 | CMake | CMake | public | 2015-03-31 12:07 | 2016-06-10 14:31 |
Reporter | Daniel Dunbar | ||||
Assigned To | Kitware Robot | ||||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | moved | ||
Platform | OS X | OS | OS Version | ||
Product Version | |||||
Target Version | Fixed in Version | ||||
Summary | 0015485: CFBundleExecutable path in a bundle should not be a relative path into bundle | ||||
Description | The CFBundleExecutable path inside of a CMake generated bundle is a relative path including the bundle name itself. This is not correct, it should simply be the name of the bundle binary that is inside the MacOS directory: In this example: -- $ cat CMakeLists.txt cmake_minimum_required(VERSION 3.2) add_library(Bar MODULE Bar.c) set_target_properties(Bar PROPERTIES BUNDLE true) $ touch Bar.c $ cmake -G Ninja . ... $ ninja [1/2] Building C object CMakeFiles/Bar.dir/Bar.c.o [2/2] Linking C CFBundle shared module Bar.bundle/Contents/MacOS/Bar $ defaults read $(pwd)/Bar.bundle/Contents/Info.plist CFBundleExecutable Bar.bundle/Contents/MacOS/Bar $ -- the last line should just print "Bar". You can verify this is not what the platform expects by trying to load the bundle from somewhere else: -- $ cat load.m #import <Foundation/Foundation.h> int main(int argc, char **argv) { @autoreleasepool { NSBundle *bundle = [NSBundle bundleWithPath:[[NSString alloc] initWithUTF8String:argv[1]]]; [bundle load]; } return 0; } $ clang load.m -o load -framework Foundation && ./load Bar.bundle 2015-03-31 09:07:24.778 load[95727:5952049] Cannot find executable for CFBundle 0x7fc292d13ac0 </private/tmp/bar/Bar.bundle> (not loaded) -- whereas this will load fine if the CFBundleExecutable key is just "Bar". | ||||
Steps To Reproduce | |||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | ![]() https://public.kitware.com/Bug/file/5418/0001-Show-only-bundle-name-in-Xcode.patch | ||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2015-03-31 12:07 | Daniel Dunbar | New Issue | |||
2015-03-31 13:30 | Brad King | Note Added: 0038372 | |||
2015-03-31 13:31 | Brad King | Note Added: 0038373 | |||
2015-04-01 16:28 | Gregor Jasny | Note Added: 0038385 | |||
2015-04-01 16:28 | Gregor Jasny | File Added: 0001-Show-only-bundle-name-in-Xcode.patch | |||
2015-04-01 16:29 | Gregor Jasny | Note Edited: 0038385 | bug_revision_view_page.php?bugnote_id=38385#r1739 | ||
2015-04-01 16:36 | Brad King | Note Added: 0038388 | |||
2016-06-10 14:29 | Kitware Robot | Note Added: 0042746 | |||
2016-06-10 14:29 | Kitware Robot | Status | new => resolved | ||
2016-06-10 14:29 | Kitware Robot | Resolution | open => moved | ||
2016-06-10 14:29 | Kitware Robot | Assigned To | => Kitware Robot | ||
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|