MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0015676 | CMake | CMake | public | 2015-08-03 05:33 | 2016-06-10 14:31 |
Reporter | Adn | ||||
Assigned To | Kitware Robot | ||||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | moved | ||
Platform | Apple | OS | OS X | OS Version | 10.9 |
Product Version | CMake 3.3 | ||||
Target Version | Fixed in Version | ||||
Summary | 0015676: The red message "INSTALL TARGETS - target Xxx has RESOURCE files but no RESOURCE DESTINATION." is misleading on Apple platforms. | ||||
Description | When building an OS X application, the resource files are listed in the RESOURCE target property. Following INSTALL(...) documentation (http://www.cmake.org/cmake/help/v3.3/command/install.html?highlight=install#installing-targets [^]): >The PRIVATE_HEADER, PUBLIC_HEADER, and RESOURCE arguments cause subsequent properties to be applied to installing a FRAMEWORK shared library target’s associated files on non-Apple platforms. >Rules defined by these arguments are ignored on Apple platforms because the associated files are installed into the appropriate locations inside the framework folder. From the documentation, one would understand that there is no point in giving a RESOURCE argument to INSTALL command when targeting Apple platforms: the argument is ignored, and the resource are copied inside the bundle (the second statement here being actually true). Yet, if this argument is omitted, a red message is emitted in the GUI, which seems confusing with regard to the documentation statement. Also, if one decides to provide this argument with a dummy location to turn off the message, the install target will actually copy the RESOURCE files to the dummy location (So the argument is not ignored: the resources are still copied in the bundle, but they are also copied in the provided location). | ||||
Steps To Reproduce | ## ## This is the skeleton of a CMakeLists.txt that would trigger the red message when generated on Apple ## # populate ${${PROJECT_NAME}_RESOURCES} variable with a .xib file and images add_executable(${PROJECT_NAME} MACOSX_BUNDLE ${${PROJECT_NAME}_HEADERS} ${${PROJECT_NAME}_SOURCES} ${${PROJECT_NAME}_RESOURCES} main.mm ) set_target_properties(${PROJECT_NAME} PROPERTIES VERSION "${VERSION}" SOVERSION "${SOVERSION}" RESOURCE "${${PROJECT_NAME}_RESOURCES}" ) install(TARGETS ${PROJECT_NAME} BUNDLE DESTINATION ${RUNTIME_OUTPUT_DIRECTORY} ) | ||||
Additional Information | There is a stack overflow question on this topic: http://stackoverflow.com/q/31723271/1027706 [^] | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2015-08-03 05:33 | Adn | New Issue | |||
2016-06-10 14:29 | Kitware Robot | Note Added: 0042815 | |||
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 | |||||
|
|||||
|
|