1RESOURCE
2--------
3
4Specify resource files in a :prop_tgt:`FRAMEWORK` or :prop_tgt:`BUNDLE`.
5
6Target marked with the :prop_tgt:`FRAMEWORK` or :prop_tgt:`BUNDLE` property
7generate framework or application bundle (both macOS and iOS is supported)
8or normal shared libraries on other platforms.
9This property may be set to a list of files to be placed in the corresponding
10directory (eg. ``Resources`` directory for macOS) inside the bundle.
11On non-Apple platforms these files may be installed using the ``RESOURCE``
12option to the :command:`install(TARGETS)` command.
13
14Following example of Application Bundle:
15
16.. code-block:: cmake
17
18  add_executable(ExecutableTarget
19    addDemo.c
20    resourcefile.txt
21    appresourcedir/appres.txt)
22
23  target_link_libraries(ExecutableTarget heymath mul)
24
25  set(RESOURCE_FILES
26    resourcefile.txt
27    appresourcedir/appres.txt)
28
29  set_target_properties(ExecutableTarget PROPERTIES
30    MACOSX_BUNDLE TRUE
31    MACOSX_FRAMEWORK_IDENTIFIER org.cmake.ExecutableTarget
32    RESOURCE "${RESOURCE_FILES}")
33
34will produce flat structure for iOS systems::
35
36  ExecutableTarget.app
37    appres.txt
38    ExecutableTarget
39    Info.plist
40    resourcefile.txt
41
42For macOS systems it will produce following directory structure::
43
44  ExecutableTarget.app/
45    Contents
46      Info.plist
47      MacOS
48        ExecutableTarget
49      Resources
50        appres.txt
51        resourcefile.txt
52
53For Linux, such CMake script produce following files::
54
55  ExecutableTarget
56  Resources
57    appres.txt
58    resourcefile.txt
59