diff options
author | Nicky <nicky.dasmijn@gmail.com> | 2022-04-06 16:32:52 +0200 |
---|---|---|
committer | Nicky <nicky.dasmijn@gmail.com> | 2022-04-06 16:32:52 +0200 |
commit | 786b291d9c6b784c7ce6ceef0e38a4ec76ea14db (patch) | |
tree | ed7386562337f06b212e0e95753c891ec7efbb3a /indra/cmake/NGHTTP2.cmake | |
parent | 7522cea2528f9cfdf5283a7920dd3434417b20f4 (diff) |
Move CMake files to modernized cmake syntax, step 1.
Change projects to cmake targetsto get rid of havig to hardcore
include directories and link libraries in consumer projects.
Diffstat (limited to 'indra/cmake/NGHTTP2.cmake')
-rw-r--r-- | indra/cmake/NGHTTP2.cmake | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/indra/cmake/NGHTTP2.cmake b/indra/cmake/NGHTTP2.cmake index df191ff3c1..5215af5dd9 100644 --- a/indra/cmake/NGHTTP2.cmake +++ b/indra/cmake/NGHTTP2.cmake @@ -1,20 +1,20 @@ include(Prebuilt) -set(NGHTTP2_FIND_QUIETLY ON) -set(NGHTTP2_FIND_REQUIRED ON) +if( TARGET nghttp2::nghttp2 ) + return() +endif() +create_target( nghttp2::nghttp2 ) if (USESYSTEMLIBS) include(FindNGHTTP2) else (USESYSTEMLIBS) use_prebuilt_binary(nghttp2) if (WINDOWS) - set(NGHTTP2_LIBRARIES - ${ARCH_PREBUILT_DIRS_RELEASE}/nghttp2.lib - ) + set_target_libraries( nghttp2::nghttp2 ${ARCH_PREBUILT_DIRS_RELEASE}/nghttp2.lib) elseif (DARWIN) - set(NGHTTP2_LIBRARIES libnghttp2.dylib) + set_target_libraries( nghttp2::nghttp2 libnghttp2.dylib) else (WINDOWS) - set(NGHTTP2_LIBRARIES libnghttp2.a) + set_target_libraries( nghttp2::nghttp2 libnghttp2.a ) endif (WINDOWS) - set(NGHTTP2_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/nghttp2) + set_target_include_dirs( nghttp2::nghttp2 ${LIBS_PREBUILT_DIR}/include/nghttp2) endif (USESYSTEMLIBS) |