mirror of
https://github.com/arun11299/cpp-jwt.git
synced 2025-05-14 16:58:34 +00:00
build: minor tweaks
With this patch I've made a few minor changes to CMake configuration: - CMake config files are now installed to share/ (CMAKE_INSTALL_DATADIR) instead of lib/, as cpp-jwt is header-only, thus arch-independent. - Headers are now installed to CMAKE_INSTALL_INCLUDEDIR instead of the hardcoded include/ - I've removed a few redundant options from the install(TARGETS) call, as they are implied by default since CMake 3.14.
This commit is contained in:
parent
e12ef06218
commit
814c62aac6
1 changed files with 4 additions and 9 deletions
|
@ -76,14 +76,9 @@ endif()
|
|||
|
||||
include(GNUInstallDirs)
|
||||
include(CMakePackageConfigHelpers)
|
||||
set(CPP_JWT_CONFIG_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
|
||||
set(CPP_JWT_CONFIG_INSTALL_DIR ${CMAKE_INSTALL_DATADIR}/cmake/${PROJECT_NAME})
|
||||
|
||||
install(
|
||||
TARGETS ${PROJECT_NAME}
|
||||
EXPORT ${PROJECT_NAME}Targets
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}Targets)
|
||||
install(
|
||||
EXPORT ${PROJECT_NAME}Targets
|
||||
DESTINATION ${CPP_JWT_CONFIG_INSTALL_DIR}
|
||||
|
@ -106,7 +101,7 @@ if(NOT CPP_JWT_USE_VENDORED_NLOHMANN_JSON)
|
|||
endif()
|
||||
install(
|
||||
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/jwt/
|
||||
DESTINATION include/jwt
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/jwt
|
||||
COMPONENT dev
|
||||
FILES_MATCHING
|
||||
PATTERN "*.hpp"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue