From c1d59f02609def47507c76d65c60f220c508a71f Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Thu, 2 Jul 2009 14:40:05 -0400 Subject: Windows now links to shared apr when LLCOMMON_LINK_SHARED is on. --- indra/cmake/APR.cmake | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) (limited to 'indra/cmake/APR.cmake') diff --git a/indra/cmake/APR.cmake b/indra/cmake/APR.cmake index 0755aeee03..efd47f756a 100644 --- a/indra/cmake/APR.cmake +++ b/indra/cmake/APR.cmake @@ -13,18 +13,33 @@ if (STANDALONE) else (STANDALONE) use_prebuilt_binary(apr_suite) if (WINDOWS) - set(APR_LIBRARIES - debug ${ARCH_PREBUILT_DIRS_DEBUG}/apr-1.lib - optimized ${ARCH_PREBUILT_DIRS_RELEASE}/apr-1.lib - ) - set(APRICONV_LIBRARIES - debug ${ARCH_PREBUILT_DIRS_DEBUG}/apriconv-1.lib - optimized ${ARCH_PREBUILT_DIRS_RELEASE}/apriconv-1.lib - ) - set(APRUTIL_LIBRARIES - debug ${ARCH_PREBUILT_DIRS_DEBUG}/aprutil-1.lib ${APRICONV_LIBRARIES} - optimized ${ARCH_PREBUILT_DIRS_RELEASE}/aprutil-1.lib ${APRICONV_LIBRARIES} - ) + if (LLCOMMON_LINK_SHARED) + set(APR_LIBRARIES + debug ${ARCH_PREBUILT_DIRS_DEBUG}/libapr-1.lib + optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libapr-1.lib + ) + set(APRICONV_LIBRARIES + debug ${ARCH_PREBUILT_DIRS_DEBUG}/libapriconv-1.lib + optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libapriconv-1.lib + ) + set(APRUTIL_LIBRARIES + debug ${ARCH_PREBUILT_DIRS_DEBUG}/libaprutil-1.lib ${APRICONV_LIBRARIES} + optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libaprutil-1.lib ${APRICONV_LIBRARIES} + ) + else (LLCOMMON_LINK_SHARED) + set(APR_LIBRARIES + debug ${ARCH_PREBUILT_DIRS_DEBUG}/apr-1.lib + optimized ${ARCH_PREBUILT_DIRS_RELEASE}/apr-1.lib + ) + set(APRICONV_LIBRARIES + debug ${ARCH_PREBUILT_DIRS_DEBUG}/apriconv-1.lib + optimized ${ARCH_PREBUILT_DIRS_RELEASE}/apriconv-1.lib + ) + set(APRUTIL_LIBRARIES + debug ${ARCH_PREBUILT_DIRS_DEBUG}/aprutil-1.lib ${APRICONV_LIBRARIES} + optimized ${ARCH_PREBUILT_DIRS_RELEASE}/aprutil-1.lib ${APRICONV_LIBRARIES} + ) + endif (LLCOMMON_LINK_SHARED) elseif (DARWIN) set(APR_LIBRARIES debug ${ARCH_PREBUILT_DIRS_DEBUG}/libapr-1.a -- cgit v1.2.3 From 1e1a38d5745a680c712be9bcc088a75f6eafa7da Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 30 Jul 2009 18:51:17 -0400 Subject: DEV-34837: Improve Mac support for LLCOMMON_LINK_SHARED. Update Mac apr_suite package, introducing libapr-1.0.3.7.dylib and libaprutil-1.0.3.8.dylib. We want to use dynamic APR libraries, but libllcommon.dylib isn't allowed to depend on .so libraries: must be .dylibs themselves. Tweak APR.cmake to reference the aforementioned .dylibs when on Mac with LLCOMMON_LINK_SHARED set. Eliminate some redundancy in Windows section. For .dylibs, RunBuildTest.cmake must set DYLD_LIBRARY_PATH: LD_LIBRARY_PATH only affects search for .so files. PENDING: CMake dependencies broken? With LLCOMMON_LINK_SHARED on, it seems we need to build libllcommon.dylib explicitly before full build can succeed. This snapshot does NOT yet copy the llcommon, apr or aprutil dylibs into the app bundle. --- indra/cmake/APR.cmake | 53 ++++++++++++++++++++++++--------------------------- 1 file changed, 25 insertions(+), 28 deletions(-) (limited to 'indra/cmake/APR.cmake') diff --git a/indra/cmake/APR.cmake b/indra/cmake/APR.cmake index efd47f756a..f4706dd4f2 100644 --- a/indra/cmake/APR.cmake +++ b/indra/cmake/APR.cmake @@ -14,40 +14,37 @@ else (STANDALONE) use_prebuilt_binary(apr_suite) if (WINDOWS) if (LLCOMMON_LINK_SHARED) - set(APR_LIBRARIES - debug ${ARCH_PREBUILT_DIRS_DEBUG}/libapr-1.lib - optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libapr-1.lib - ) - set(APRICONV_LIBRARIES - debug ${ARCH_PREBUILT_DIRS_DEBUG}/libapriconv-1.lib - optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libapriconv-1.lib - ) - set(APRUTIL_LIBRARIES - debug ${ARCH_PREBUILT_DIRS_DEBUG}/libaprutil-1.lib ${APRICONV_LIBRARIES} - optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libaprutil-1.lib ${APRICONV_LIBRARIES} - ) + set(APR_selector "lib") else (LLCOMMON_LINK_SHARED) - set(APR_LIBRARIES - debug ${ARCH_PREBUILT_DIRS_DEBUG}/apr-1.lib - optimized ${ARCH_PREBUILT_DIRS_RELEASE}/apr-1.lib - ) - set(APRICONV_LIBRARIES - debug ${ARCH_PREBUILT_DIRS_DEBUG}/apriconv-1.lib - optimized ${ARCH_PREBUILT_DIRS_RELEASE}/apriconv-1.lib - ) - set(APRUTIL_LIBRARIES - debug ${ARCH_PREBUILT_DIRS_DEBUG}/aprutil-1.lib ${APRICONV_LIBRARIES} - optimized ${ARCH_PREBUILT_DIRS_RELEASE}/aprutil-1.lib ${APRICONV_LIBRARIES} - ) + 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.3.7.dylib") + set(APRUTIL_selector "0.3.8.dylib") + else (LLCOMMON_LINK_SHARED) + set(APR_selector "a") + set(APRUTIL_selector "a") + endif (LLCOMMON_LINK_SHARED) set(APR_LIBRARIES - debug ${ARCH_PREBUILT_DIRS_DEBUG}/libapr-1.a - optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libapr-1.a + debug ${ARCH_PREBUILT_DIRS_DEBUG}/libapr-1.${APR_selector} + optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libapr-1.${APR_selector} ) set(APRUTIL_LIBRARIES - debug ${ARCH_PREBUILT_DIRS_DEBUG}/libaprutil-1.a - optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libaprutil-1.a + debug ${ARCH_PREBUILT_DIRS_DEBUG}/libaprutil-1.${APRUTIL_selector} + optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libaprutil-1.${APRUTIL_selector} ) set(APRICONV_LIBRARIES iconv) else (WINDOWS) -- cgit v1.2.3