I don't think you need the configure_file() command.
What happens now (if i understand correctly) is that:
1) a copy of Info.plist is made from CMAKE_CURRENT_SOURCE_DIR to
CMAKE_CURRENT_BINARY_DIR
2) a copy of Info.plist is made from CMAKE_CURRENT_BINARY_DIR to
path/to/build/CMakeFiles/[appname].dir
You should be able to just do...
set_target_properties( ${this_target} PROPERTIES MACOSX_BUNDLE_INFO_PLIST
${CMAKE_CURRENT_SOURCE_DIR}/Info.plist )
set_target_properties(${this_target} PROPERTIES RESOURCE "${RESOURCE_FILES}")
To add the Info.plist from CMAKE_CURRENT_SOURCE_DIR directly to your project.
Unless, you would do something interesting in configure_file(), besides just
copying.
Don't know if you can send an image as attachment to the mailing list. You can
try ;-)
Thanks,
Daniel
On Oct 3, 2011, at 10:11 PM, [email protected] wrote:
I've modified the cmakelists file to include:
#-------------------------------------------------------
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Info.plist
${CMAKE_CURRENT_BINARY_DIR}/Info.plist)
set_target_properties( ${this_target} PROPERTIES MACOSX_BUNDLE_INFO_PLIST
${CMAKE_CURRENT_BINARY_DIR}/Info.plist )
set_target_properties(${this_target} PROPERTIES RESOURCE "${RESOURCE_FILES}")
#-------------------------------------------------------
which seems OK with Cmake. Indeed files now seem to go into the correct Xcode
folders. However there is still an oddity best demonstrated with a picture.
Does this list accepts JPG/PNG attachments? Is this OK?
Thx++
Jerry
On 03/10/2011 15:49, Daniel Dekkers wrote:
>> set_target_properties(${this_target} PROPERTIES RESOURCE
>> ${RESOURCE_FILES})<---- error here. wrong number of args
>
> Maybe try "${RESOURCE_FILES)" (with quotes).
> That helps to get rid of the ; delimiters of CMake lists, if that is the
> problem. And otherwise the quotes might "bundle" the contents of
> RESOURCE_FILES to a single string value, because it now seems to interpret
> them as different arguments. It works for me:
>
> # Make sure these resources are labeled as such so they are treated correctly
> (sometimes compiled and copied but at least copied to the bundle...)
> SET_TARGET_PROPERTIES( ${APP_NAME} PROPERTIES RESOURCE "${ALL_RSRC_FILES}" )
>
>
>
>
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake