Skip to content

Commit f10720e

Browse files
authoredApr 21, 2024
Move httplibConf.cmake.in & install readme/license (yhirose#1826)
* Move httplibConfig.cmake.in to cmake dir Just makes more sense to put it there I suppose. * Cmake install README & License Seems to make sense since you might already do this as a package manager, or an end user might want them anyways. The locations are just based on standard Linux locations using GNUInstallDirs, so it should be sane on other machines too.
1 parent 2bc550b commit f10720e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed
 

‎CMakeLists.txt

+6-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ set(_TARGET_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
245245
include(CMakePackageConfigHelpers)
246246

247247
# Configures the meta-file httplibConfig.cmake.in to replace variables with paths/values/etc.
248-
configure_package_config_file("${PROJECT_NAME}Config.cmake.in"
248+
configure_package_config_file("cmake/${PROJECT_NAME}Config.cmake.in"
249249
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
250250
INSTALL_DESTINATION "${_TARGET_INSTALL_CMAKEDIR}"
251251
# Passes the includedir install path
@@ -293,6 +293,11 @@ if(HTTPLIB_INSTALL)
293293
NAMESPACE ${PROJECT_NAME}::
294294
DESTINATION ${_TARGET_INSTALL_CMAKEDIR}
295295
)
296+
297+
# Install documentation & license
298+
# ex: /usr/share/doc/httplib/README.md and /usr/share/licenses/httplib/LICENSE
299+
install(FILES "README.md" DESTINATION "${CMAKE_INSTALL_DOCDIR}")
300+
install(FILES "LICENSE" DESTINATION "${CMAKE_INSTALL_DATADIR}/licenses/${PROJECT_NAME}")
296301
endif()
297302

298303
if(HTTPLIB_TEST)
File renamed without changes.

0 commit comments

Comments
 (0)