Skip to content

Commit 64ca9b2

Browse files
chore(build): streamline license file installation
1 parent 8b4138b commit 64ca9b2

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

cmake/nfxHashingInstall.cmake

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,18 @@ install(
113113
install(
114114
FILES "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt"
115115
DESTINATION "${CMAKE_INSTALL_DOCDIR}/licenses"
116+
RENAME "LICENSE-${PROJECT_NAME}.txt"
116117
)
117118

118-
install(
119-
DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/licenses/"
120-
DESTINATION "${CMAKE_INSTALL_DOCDIR}/licenses"
121-
FILES_MATCHING PATTERN "LICENSE.txt-*"
122-
)
119+
file(GLOB LICENSE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/licenses/LICENSE-*")
120+
foreach(LICENSE_FILE ${LICENSE_FILES})
121+
get_filename_component(LICENSE_NAME ${LICENSE_FILE} NAME)
122+
install(
123+
FILES ${LICENSE_FILE}
124+
DESTINATION "${CMAKE_INSTALL_DOCDIR}/licenses"
125+
RENAME "${LICENSE_NAME}.txt"
126+
)
127+
endforeach()
123128

124129
#----------------------------------------------
125130
# Install documentation

0 commit comments

Comments
 (0)