[cmake-developers] [Apple/iOS/OS X] Create subdirectories in Resource directory for Frameworks and Application bundle.
Bartosz Kosiorek
Bartosz.Kosiorek at tomtom.com
Thu Dec 10 09:52:32 EST 2015
Hello.
With CMake 3.5 it is possible to put Resources into the Bundle (Frameworks and Applications)
More information:
https://cmake.org/gitweb?p=cmake.git;a=blob;f=Help/prop_tgt/RESOURCE.rst
So with code:
add_executable(ExecutableTarget
addDemo.c
resourcefile.txt
appresourcedir/appres.txt
)
target_link_libraries(ExecutableTarget heymath mul)
set(RESOURCE_FILES
resourcefile.txt
appresourcedir/appres.txt
)
set_target_properties(ExecutableTarget PROPERTIES
MACOSX_BUNDLE TRUE
MACOSX_FRAMEWORK_IDENTIFIER org.cmake.ExecutableTarget
RESOURCE "${RESOURCE_FILES}"
)
For OS X systems it will produce following directory structure::
ExecutableTarget.app/
Contents
Info.plist
MacOS
ExecutableTarget
Resources
appres.txt
resourcefile.txt
How it is officialy supported to tell CMake to create subdirectories inside "Resources" directory?
As the result I would like to get, following directory structure:
ExecutableTarget.app/
Contents/
Info.plist
MacOS/
ExecutableTarget
Resources/
appres.txt?
appresourcedir/
?resourcefile.txt?
I would like to update documentation to describe how to do that.
Thanks in advance
Bartosz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20151210/99bcc634/attachment-0001.html>
More information about the cmake-developers
mailing list