summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2024-07-10 15:18:48 +0800
committerGitHub <noreply@github.com>2024-07-10 15:18:48 +0800
commitc06cc09497fd9f99a36f7fe524ed51604dbc60c5 (patch)
treeaaa6786f326c330eed9b956bbb599cf4869bda38 /CMakeLists.txt
parent97bd7e69f76dc63a4f97321e6f4edbdb692588cc (diff)
Include readme and license in release files (#4595)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt23
1 files changed, 14 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9e50ae7c1..5e9530adb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -552,15 +552,6 @@ if(SLANG_ENABLE_GFX)
endif()
#
-# Installing any documentation
-#
-
-file(GLOB_RECURSE docs CONFIGURE_DEPENDS docs/*.md)
-if(docs)
- install(FILES ${docs} DESTINATION ${CMAKE_INSTALL_DOCDIR})
-endif()
-
-#
# The test executables and runtime-loaded modules
#
if(SLANG_ENABLE_TESTS AND SLANG_ENABLE_GFX AND SLANG_ENABLE_SLANGD AND SLANG_ENABLE_SLANGRT)
@@ -796,4 +787,18 @@ endif()
#
# Packaging
#
+set(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
+set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON)
+install(FILES
+ "${slang_SOURCE_DIR}/README.md"
+ "${slang_SOURCE_DIR}/LICENSE"
+ DESTINATION .
+ COMPONENT metadata
+ EXCLUDE_FROM_ALL
+)
+install(DIRECTORY
+ "${slang_SOURCE_DIR}/docs/"
+ DESTINATION share/doc/slang
+)
+
include(CPack)