summaryrefslogtreecommitdiff
path: root/indra/cmake/EXPAT.cmake
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@geenzo.com>2023-03-31 10:54:22 -0700
committerJonathan "Geenz" Goodman <geenz@geenzo.com>2023-03-31 10:54:22 -0700
commit4e306c90666094a7450f4d6f3ed7c8b71527e393 (patch)
tree4e52cfe3cfc7df8060ec5336f53d91636986b43c /indra/cmake/EXPAT.cmake
parentb44ad50f75724a5d9e53bd52d2724111568caf24 (diff)
parent7d144fcb2a1b0aff1b59e378c652649c3d03e94f (diff)
Merge branch 'DRTVWR-559' of https://github.com/secondlife/viewer into DRTVWR-559
Diffstat (limited to 'indra/cmake/EXPAT.cmake')
-rw-r--r--indra/cmake/EXPAT.cmake35
1 files changed, 16 insertions, 19 deletions
diff --git a/indra/cmake/EXPAT.cmake b/indra/cmake/EXPAT.cmake
index cddc71b227..327fe8aa72 100644
--- a/indra/cmake/EXPAT.cmake
+++ b/indra/cmake/EXPAT.cmake
@@ -1,23 +1,20 @@
# -*- cmake -*-
include(Prebuilt)
-set(EXPAT_FIND_QUIETLY ON)
-set(EXPAT_FIND_REQUIRED ON)
+include_guard()
+add_library( ll::expat INTERFACE IMPORTED )
-if (USESYSTEMLIBS)
- include(FindEXPAT)
-else (USESYSTEMLIBS)
- use_prebuilt_binary(expat)
- if (WINDOWS)
- set(EXPAT_LIBRARIES libexpatMT)
- set(EXPAT_COPY libexpatMT.dll)
- else (WINDOWS)
- set(EXPAT_LIBRARIES expat)
- if (DARWIN)
- set(EXPAT_COPY libexpat.1.dylib libexpat.dylib)
- else ()
- set(EXPAT_COPY libexpat.so.1 libexpat.so)
- endif ()
- endif (WINDOWS)
- set(EXPAT_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
-endif (USESYSTEMLIBS)
+use_system_binary(expat)
+use_prebuilt_binary(expat)
+if (WINDOWS)
+ target_link_libraries( ll::expat INTERFACE libexpatMT )
+ set(EXPAT_COPY libexpatMT.dll)
+else (WINDOWS)
+ target_link_libraries( ll::expat INTERFACE expat )
+ if (DARWIN)
+ set(EXPAT_COPY libexpat.1.dylib libexpat.dylib)
+ else ()
+ set(EXPAT_COPY libexpat.so.1 libexpat.so)
+ endif ()
+endif (WINDOWS)
+target_include_directories( ll::expat SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include )