Install a CMake configuration file
This commit is contained in:
parent
2e44f23b05
commit
3396d3f24e
|
@ -460,6 +460,27 @@ set(PKGDATADIR "${CMAKE_INSTALL_FULL_DATADIR}/${CMAKE_PROJECT_NAME}")
|
|||
|
||||
install(FILES README.rst DESTINATION "${CMAKE_INSTALL_DOCDIR}")
|
||||
|
||||
install(
|
||||
EXPORT nghttp2-targets
|
||||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/nghttp2"
|
||||
NAMESPACE nghttp2::
|
||||
FILE nghttp2-config.cmake
|
||||
)
|
||||
|
||||
include(CMakePackageConfigHelpers)
|
||||
write_basic_package_version_file(
|
||||
nghttp2-config-version.cmake
|
||||
VERSION ${nghttp2_VERSION}
|
||||
COMPATIBILITY SameMajorVersion
|
||||
)
|
||||
|
||||
install(
|
||||
FILES
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/nghttp2-config-version.cmake"
|
||||
DESTINATION
|
||||
"${CMAKE_INSTALL_LIBDIR}/cmake/nghttp2"
|
||||
)
|
||||
|
||||
add_subdirectory(lib)
|
||||
#add_subdirectory(lib/includes)
|
||||
add_subdirectory(third-party)
|
||||
|
|
|
@ -47,11 +47,13 @@ if(ENABLE_SHARED_LIB)
|
|||
C_VISIBILITY_PRESET hidden
|
||||
)
|
||||
target_include_directories(nghttp2 INTERFACE
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/includes"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/includes"
|
||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/includes>"
|
||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/includes>"
|
||||
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
|
||||
)
|
||||
|
||||
install(TARGETS nghttp2
|
||||
EXPORT nghttp2-targets
|
||||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
||||
|
|
Loading…
Reference in New Issue