Yes.... I just reproduced this with the CMake test "BundleTest" by modifying it like so:<div><br></div><div><p style="margin: 0px; font: 14px Menlo;">function(hide_var)</p>
<p style="margin: 0px; font: 14px Menlo;">SET(MACOSX_BUNDLE_INFO_STRING "bundle_info_string")</p>
<p style="margin: 0px; font: 14px Menlo;">ADD_EXECUTABLE(BundleTest</p>
<p style="margin: 0px; font: 14px Menlo;"> MACOSX_BUNDLE</p>
<p style="margin: 0px; font: 14px Menlo;"> BundleTest.cxx</p>
<p style="margin: 0px; font: 14px Menlo;"> SomeRandomFile.txt</p>
<p style="margin: 0px; font: 14px Menlo;"> "${BundleTest_SOURCE_DIR}/../../ChangeLog.txt"</p>
<p style="margin: 0px; font: 14px Menlo;"> "${CMAKE_CURRENT_BINARY_DIR}/randomResourceFile.plist"</p>
<p style="margin: 0px; font: 14px Menlo;"> )</p>
<p style="margin: 0px; font: 14px Menlo;">TARGET_LINK_LIBRARIES(BundleTest BundleTestLib)</p>
<p style="margin: 0px; font: 14px Menlo;">endfunction()</p>
<p style="margin: 0px; font: 14px Menlo; min-height: 16px;"><br></p>
<p style="margin: 0px; font: 14px Menlo;">hide_var()</p><div><br></div><div></div><div>So... the bottom line is that the MACOSX_BUNDLE_* as *variables* have to be defined at directory scope in order to work like they're supposed to with the automatically configured Info.plist file. However, there is another (preferred) way to do this. Set the same names as target properties *after* the add_executable call. Then the variable scoping does not matter.<br>
<br>These are not documented either in --help-variable-list or --help-property-list .... I had to go to the source code to figure this out. However, the one that is documented, MACOSX_BUNDLE_INFO_PLIST, references the MACOSX_BUNDLE_* values as target properties:<br>
<br> <a href="http://cmake.org/cmake/help/cmake-2-8-docs.html#prop_tgt:MACOSX_BUNDLE_INFO_PLIST">http://cmake.org/cmake/help/cmake-2-8-docs.html#prop_tgt:MACOSX_BUNDLE_INFO_PLIST</a><br><br>This is not a bug that we will fix (other than possibly adding better documentation at some point) -- but please use the target properties and not the variables from now on. It's been that way since at least CMake 2.6.something...<br>
<br><br>Thanks,<br>David<br><br></div>
<div></div><br><div class="gmail_quote">On Thu, Feb 10, 2011 at 3:04 PM, Michael Jackson <span dir="ltr"><<a href="mailto:mike.jackson@bluequartz.net" target="_blank">mike.jackson@bluequartz.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Instructions to reproduce:<br>
<br>
Pull the sample Qt Project from the CMake wiki<br>
<br>
<a href="http://www.cmake.org/Wiki/images/2/25/QtTest-Package-Example.zip" target="_blank">http://www.cmake.org/Wiki/images/2/25/QtTest-Package-Example.zip</a><br>
<br>
Unzip it<br>
cd into it.<br>
<br>
Replace the CMakeLists.txt file with the one attached to this email.<br>
<br>
run the following:<br>
<br>
git clone git://<a href="http://scm.bluequartz.net/support-libraries/cmp.git" target="_blank">scm.bluequartz.net/support-libraries/cmp.git</a><br>
<br>
configure the project.<br>
<br>
Note how the plist is NOT filled in correct. Edit the CMakeLists.txt file at line 137 to make cmake go into the "if()" statement. Reconfigure. Note how the plist has all the "correct" values now.<br>
<br>
The functions and macros you want to look at are in QtTest/cmp/cmpCMakeMacros.cmake.<br>
___________________________________________________________<br>
<div><div></div><div>Mike Jackson <a href="http://www.bluequartz.net" target="_blank">www.bluequartz.net</a><br>
<br>
</div></div><br><br>
<br>
On Feb 10, 2011, at 2:39 PM, David Cole wrote:<br>
<br>
> Can you share your source code so I can repro the issue here?<br>
><br>
> Thx,<br>
> David<br>
><br>
><br>
> On Thu, Feb 10, 2011 at 2:25 PM, Michael Jackson <<a href="mailto:mike.jackson@bluequartz.net" target="_blank">mike.jackson@bluequartz.net</a>> wrote:<br>
><br>
> On Feb 10, 2011, at 2:04 PM, David Cole wrote:<br>
><br>
> > On Thu, Feb 10, 2011 at 1:51 PM, Bill Hoffman <<a href="mailto:bill.hoffman@kitware.com" target="_blank">bill.hoffman@kitware.com</a>> wrote:<br>
> > On 2/10/2011 1:27 PM, Michael Jackson wrote:<br>
> > Bump?<br>
> ><br>
> > Did you try cmake --trace to see when it was configure...<br>
> ><br>
> ><br>
> > --<br>
> > Mike Jackson<<a href="http://www.bluequartz.net" target="_blank">www.bluequartz.net</a>><br>
> ><br>
> > On Feb 8, 2011, at 5:36 PM, Michael Jackson wrote:<br>
> ><br>
> > At what point is the <a href="http://MacOSXBundleInfo.plist.in" target="_blank">MacOSXBundleInfo.plist.in</a> configured? I am setting all the relevant variables but they are not getting inserted into the plist.<br>
> ><br>
> > Here is some debug output from a CMake run of my project:<br>
> ><br>
> > -- MACOSX_BUNDLE_INFO_STRING: StatsGenerator_debug Version 2011.02.08, Copyright 2009 BlueQuartz Software.<br>
> > -- MACOSX_BUNDLE_ICON_FILE: StatsGenerator.icns<br>
> > -- MACOSX_BUNDLE_GUI_IDENTIFIER: StatsGenerator_debug<br>
> > -- MACOSX_BUNDLE_LONG_VERSION_STRING: StatsGenerator_debug Version 2011.02.08<br>
> > -- MACOSX_BUNDLE_BUNDLE_NAME: StatsGenerator_debug<br>
> > -- MACOSX_BUNDLE_SHORT_VERSION_STRING: 2011.02.08<br>
> > -- MACOSX_BUNDLE_BUNDLE_VERSION: 2011.02.08<br>
> > -- MACOSX_BUNDLE_COPYRIGHT: Copyright 2011, BlueQuartz Software. All Rights Reserved.<br>
> ><br>
> ><br>
> > I set all those variables before and after the add_executable call but most of the values does not show up in the plist file. Probably something simple I am missing.<br>
> ><br>
> > Thanks.<br>
> > ___________________________________________________________<br>
> > Mike Jackson <a href="http://www.bluequartz.net" target="_blank">www.bluequartz.net</a><br>
> > Principal Software Engineer <a href="mailto:mike.jackson@bluequartz.net" target="_blank">mike.jackson@bluequartz.net</a><br>
> > BlueQuartz Software Dayton, Ohio<br>
> ><br>
> ><br>
> > Does your add_executable call have the MACOSX_BUNDLE flag in it?<br>
> ><br>
> > You should definitely set those variables before calling add_executable, and they should definitely show up if you have MACOSX_BUNDLE turned on.<br>
> ><br>
> > What generator are you using? Xcode or Unix Makefiles or something else?<br>
> ><br>
> ><br>
><br>
> Using Makefiles generator. Correctly set MACOSX_BUNDLE in the add_executable() call. This is on OS X 10.6.6 with CMake 2.8.3 (self compiled)<br>
><br>
> I tried the --trace but I don't really know what I should be looking for. There is a lot of output to look through.<br>
><br>
> Tried from a clean build directory and still has the same thing.<br>
><br>
> Mike Jackson<br>
><br>
><br>
><br>
> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
><br>
<br>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br></blockquote></div><br></div>