mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-14 04:39:01 +08:00
50 lines
1.8 KiB
Diff
50 lines
1.8 KiB
Diff
|
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
|
||
|
index d98747f..2bc20d0 100644
|
||
|
--- a/lib/CMakeLists.txt
|
||
|
+++ b/lib/CMakeLists.txt
|
||
|
@@ -80,12 +80,15 @@ if(ENABLE_SHARED_LIB)
|
||
|
C_VISIBILITY_PRESET hidden
|
||
|
POSITION_INDEPENDENT_CODE ON
|
||
|
)
|
||
|
- target_include_directories(ngtcp2 PUBLIC ${ngtcp2_INCLUDE_DIRS})
|
||
|
-
|
||
|
- install(TARGETS ngtcp2
|
||
|
+ target_include_directories(ngtcp2 PRIVATE ${ngtcp2_INCLUDE_DIRS})
|
||
|
+ install(TARGETS ngtcp2 EXPORT unofficial-ngtcp2-config
|
||
|
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||
|
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||
|
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
||
|
+ install(
|
||
|
+ EXPORT unofficial-ngtcp2-config
|
||
|
+ NAMESPACE unofficial::ngtcp2::
|
||
|
+ DESTINATION share/unofficial-ngtcp2)
|
||
|
endif()
|
||
|
|
||
|
if(HAVE_CUNIT OR ENABLE_STATIC_LIB)
|
||
|
@@ -97,10 +100,14 @@ if(HAVE_CUNIT OR ENABLE_STATIC_LIB)
|
||
|
C_VISIBILITY_PRESET hidden
|
||
|
)
|
||
|
target_compile_definitions(ngtcp2_static PUBLIC "-DNGTCP2_STATICLIB")
|
||
|
- target_include_directories(ngtcp2_static PUBLIC ${ngtcp2_INCLUDE_DIRS})
|
||
|
+ target_include_directories(ngtcp2_static PRIVATE ${ngtcp2_INCLUDE_DIRS})
|
||
|
if(ENABLE_STATIC_LIB)
|
||
|
- install(TARGETS ngtcp2_static
|
||
|
+ install(TARGETS ngtcp2_static EXPORT unofficial-ngtcp2_static-config
|
||
|
DESTINATION "${CMAKE_INSTALL_LIBDIR}")
|
||
|
+ install(
|
||
|
+ EXPORT unofficial-ngtcp2_static-config
|
||
|
+ NAMESPACE unofficial::ngtcp2_static::
|
||
|
+ DESTINATION share/unofficial-ngtcp2)
|
||
|
endif()
|
||
|
endif()
|
||
|
|
||
|
diff --git a/lib/includes/CMakeLists.txt b/lib/includes/CMakeLists.txt
|
||
|
index 5eabf73..78bb715 100644
|
||
|
--- a/lib/includes/CMakeLists.txt
|
||
|
+++ b/lib/includes/CMakeLists.txt
|
||
|
@@ -1,3 +1,4 @@
|
||
|
+configure_file("${CMAKE_CURRENT_LIST_DIR}/ngtcp2/version.h.in" "${CMAKE_CURRENT_BINARY_DIR}/ngtcp2/version.h")
|
||
|
install(FILES
|
||
|
ngtcp2/ngtcp2.h
|
||
|
"${CMAKE_CURRENT_BINARY_DIR}/ngtcp2/version.h"
|