summaryrefslogtreecommitdiff
path: root/indra/cmake/NGHTTP2.cmake
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2022-11-22 23:11:29 +0200
committerMnikolenko Productengine <mnikolenko@productengine.com>2022-11-22 23:12:05 +0200
commitde0317cc3f5f42ccf51a7bbfdd04e8b16d51e811 (patch)
tree36b368602ac3aa1bdf9df97a0fb65c92767f457f /indra/cmake/NGHTTP2.cmake
parentdaa1257466ee3cf000e2c94ef05259577ea513b4 (diff)
parent395a60a83e954e9bcbb44dc6f1a49319b2d628b7 (diff)
Merge branch 'DRTVWR-568' into DRTVWR-539
Diffstat (limited to 'indra/cmake/NGHTTP2.cmake')
-rw-r--r--indra/cmake/NGHTTP2.cmake30
1 files changed, 13 insertions, 17 deletions
diff --git a/indra/cmake/NGHTTP2.cmake b/indra/cmake/NGHTTP2.cmake
index df191ff3c1..6396a5bd01 100644
--- a/indra/cmake/NGHTTP2.cmake
+++ b/indra/cmake/NGHTTP2.cmake
@@ -1,20 +1,16 @@
+include(Linking)
include(Prebuilt)
-set(NGHTTP2_FIND_QUIETLY ON)
-set(NGHTTP2_FIND_REQUIRED ON)
+include_guard()
+add_library( ll::nghttp2 INTERFACE IMPORTED )
-if (USESYSTEMLIBS)
- include(FindNGHTTP2)
-else (USESYSTEMLIBS)
- use_prebuilt_binary(nghttp2)
- if (WINDOWS)
- set(NGHTTP2_LIBRARIES
- ${ARCH_PREBUILT_DIRS_RELEASE}/nghttp2.lib
- )
- elseif (DARWIN)
- set(NGHTTP2_LIBRARIES libnghttp2.dylib)
- else (WINDOWS)
- set(NGHTTP2_LIBRARIES libnghttp2.a)
- endif (WINDOWS)
- set(NGHTTP2_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/nghttp2)
-endif (USESYSTEMLIBS)
+use_system_binary(nghttp2)
+use_prebuilt_binary(nghttp2)
+if (WINDOWS)
+ target_link_libraries( ll::nghttp2 INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/nghttp2.lib)
+elseif (DARWIN)
+ target_link_libraries( ll::nghttp2 INTERFACE libnghttp2.dylib)
+else (WINDOWS)
+ target_link_libraries( ll::nghttp2 INTERFACE libnghttp2.a )
+endif (WINDOWS)
+target_include_directories( ll::nghttp2 SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/nghttp2)