summaryrefslogtreecommitdiffhomepage
path: root/cmake
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-10-17 00:15:20 +0200
committerAki <please@ignore.pl>2022-10-17 00:15:20 +0200
commit8cf8ef6178659ee3aa59d16fcff4012f2df6f425 (patch)
tree4f5f8bad487f14f3cf1a570c6f188166e83e8120 /cmake
parent49bc1ee46dcbe1b9113959d04f21b81647112a36 (diff)
downloadstarshatter-8cf8ef6178659ee3aa59d16fcff4012f2df6f425.zip
starshatter-8cf8ef6178659ee3aa59d16fcff4012f2df6f425.tar.gz
starshatter-8cf8ef6178659ee3aa59d16fcff4012f2df6f425.tar.bz2
Naively added components to install targets
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/InstallResource.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmake/modules/InstallResource.cmake b/cmake/modules/InstallResource.cmake
index 2b3176e..2c443cd 100644
--- a/cmake/modules/InstallResource.cmake
+++ b/cmake/modules/InstallResource.cmake
@@ -13,16 +13,20 @@ function(install_resource)
PARSE_ARGV 0
INSTALL_RESOURCE
""
- "DESTINATION"
+ "DESTINATION;COMPONENT"
""
)
if(NOT DEFINED INSTALL_RESOURCE_DESTINATION)
set(INSTALL_RESOURCE_DESTINATION ${CMAKE_INSTALL_DATADIR}/)
endif()
+ if(NOT DEFINED INSTALL_RESOURCE_COMPONENT)
+ set(INSTALL_RESOURCE_COMPONENT ${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME})
+ endif()
foreach(RESOURCE_TARGET IN ITEMS ${INSTALL_RESOURCE_UNPARSED_ARGUMENTS})
get_property(RESOURCE_DIRECTORY TARGET ${RESOURCE_TARGET} PROPERTY RESOURCE_DIRECTORY)
install(
DIRECTORY ${RESOURCE_DIRECTORY}/
+ COMPONENT ${INSTALL_RESOURCE_COMPONENT}
DESTINATION ${INSTALL_RESOURCE_DESTINATION}
)
endforeach()