diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2023-04-07 00:20:59 +0300 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2023-04-07 00:20:59 +0300 |
commit | f1095d78315818642e62b7f4af9984557e176b5d (patch) | |
tree | 3606970e28e1101befbc7b42ccd6033cfd839e7b /indra/cmake/APR.cmake | |
parent | 4042ed9701fcfa42c03fc285a757aa348f800e33 (diff) | |
parent | c7053a6928fd5eafdc935453742e92951ae4e0c1 (diff) |
Merge branch 'main' into marchcat/main-contrib-merge
# Conflicts:
# indra/cmake/CMakeLists.txt
# indra/llcommon/llsdserialize.cpp
# indra/llcommon/llsdserialize.h
# indra/llcommon/tests/llleap_test.cpp
# indra/newview/llfilepicker.h
# indra/newview/llfilepicker_mac.h
# indra/newview/llfilepicker_mac.mm
# indra/newview/skins/default/xui/en/strings.xml
Diffstat (limited to 'indra/cmake/APR.cmake')
-rw-r--r-- | indra/cmake/APR.cmake | 87 |
1 files changed, 39 insertions, 48 deletions
diff --git a/indra/cmake/APR.cmake b/indra/cmake/APR.cmake index 9b64bc6160..8a0939c92c 100644 --- a/indra/cmake/APR.cmake +++ b/indra/cmake/APR.cmake @@ -1,54 +1,45 @@ include(Linking) include(Prebuilt) -set(APR_FIND_QUIETLY ON) -set(APR_FIND_REQUIRED ON) +include_guard() -set(APRUTIL_FIND_QUIETLY ON) -set(APRUTIL_FIND_REQUIRED ON) +add_library( ll::apr INTERFACE IMPORTED ) -if (USESYSTEMLIBS) - include(FindAPR) -else (USESYSTEMLIBS) - use_prebuilt_binary(apr_suite) - if (WINDOWS) - if (LLCOMMON_LINK_SHARED) - set(APR_selector "lib") - else (LLCOMMON_LINK_SHARED) - set(APR_selector "") - endif (LLCOMMON_LINK_SHARED) - set(APR_LIBRARIES - debug ${ARCH_PREBUILT_DIRS_DEBUG}/${APR_selector}apr-1.lib - optimized ${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}apr-1.lib - ) - set(APRICONV_LIBRARIES - debug ${ARCH_PREBUILT_DIRS_DEBUG}/${APR_selector}apriconv-1.lib - optimized ${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}apriconv-1.lib - ) - set(APRUTIL_LIBRARIES - debug ${ARCH_PREBUILT_DIRS_DEBUG}/${APR_selector}aprutil-1.lib ${APRICONV_LIBRARIES} - optimized ${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}aprutil-1.lib ${APRICONV_LIBRARIES} - ) - elseif (DARWIN) - if (LLCOMMON_LINK_SHARED) - set(APR_selector "0.dylib") - set(APRUTIL_selector "0.dylib") - else (LLCOMMON_LINK_SHARED) - set(APR_selector "a") - set(APRUTIL_selector "a") - endif (LLCOMMON_LINK_SHARED) - set(APR_LIBRARIES libapr-1.${APR_selector}) - set(APRUTIL_LIBRARIES libaprutil-1.${APRUTIL_selector}) - set(APRICONV_LIBRARIES iconv) - else (WINDOWS) - set(APR_LIBRARIES apr-1) - set(APRUTIL_LIBRARIES aprutil-1) - set(APRICONV_LIBRARIES iconv) - endif (WINDOWS) - set(APR_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/apr-1) +use_system_binary( apr apr-util ) +use_prebuilt_binary(apr_suite) - if (LINUX) - list(APPEND APRUTIL_LIBRARIES uuid) - list(APPEND APRUTIL_LIBRARIES rt) - endif (LINUX) -endif (USESYSTEMLIBS) +if (WINDOWS) + if (LLCOMMON_LINK_SHARED) + set(APR_selector "lib") + else (LLCOMMON_LINK_SHARED) + set(APR_selector "") + endif (LLCOMMON_LINK_SHARED) + target_link_libraries( ll::apr INTERFACE + ${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}apr-1.lib + ${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}apriconv-1.lib + ${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}aprutil-1.lib + ) +elseif (DARWIN) + if (LLCOMMON_LINK_SHARED) + set(APR_selector "0.dylib") + set(APRUTIL_selector "0.dylib") + else (LLCOMMON_LINK_SHARED) + set(APR_selector "a") + set(APRUTIL_selector "a") + endif (LLCOMMON_LINK_SHARED) + + target_link_libraries( ll::apr INTERFACE + libapr-1.${APR_selector} + libaprutil-1.${APRUTIL_selector} + iconv + ) +else (WINDOWS) + target_link_libraries( ll::apr INTERFACE + apr-1 + aprutil-1 + iconv + uuid + rt + ) +endif (WINDOWS) +target_include_directories( ll::apr SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/apr-1 ) |