PageRenderTime 6ms CodeModel.GetById 3ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/cmake/APR.cmake

https://bitbucket.org/lindenlab/viewer-beta/
CMake | 57 lines | 53 code | 4 blank | 0 comment | 10 complexity | 02cfb196122da5e5cfb16c23597eeee6 MD5 | raw file
 1include(BerkeleyDB)
 2include(Linking)
 3include(Prebuilt)
 4
 5set(APR_FIND_QUIETLY ON)
 6set(APR_FIND_REQUIRED ON)
 7
 8set(APRUTIL_FIND_QUIETLY ON)
 9set(APRUTIL_FIND_REQUIRED ON)
10
11if (STANDALONE)
12  include(FindAPR)
13else (STANDALONE)
14  use_prebuilt_binary(apr_suite)
15  if (WINDOWS)
16    if (LLCOMMON_LINK_SHARED)
17      set(APR_selector "lib")
18    else (LLCOMMON_LINK_SHARED)
19      set(APR_selector "")
20    endif (LLCOMMON_LINK_SHARED)
21    set(APR_LIBRARIES 
22      debug ${ARCH_PREBUILT_DIRS_DEBUG}/${APR_selector}apr-1.lib
23      optimized ${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}apr-1.lib
24      )
25    set(APRICONV_LIBRARIES 
26      debug ${ARCH_PREBUILT_DIRS_DEBUG}/${APR_selector}apriconv-1.lib
27      optimized ${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}apriconv-1.lib
28      )
29    set(APRUTIL_LIBRARIES 
30      debug ${ARCH_PREBUILT_DIRS_DEBUG}/${APR_selector}aprutil-1.lib ${APRICONV_LIBRARIES}
31      optimized ${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}aprutil-1.lib ${APRICONV_LIBRARIES}
32      )
33  elseif (DARWIN)
34    if (LLCOMMON_LINK_SHARED)
35      set(APR_selector     "0.dylib")
36      set(APRUTIL_selector "0.dylib")
37    else (LLCOMMON_LINK_SHARED)
38      set(APR_selector     "a")
39      set(APRUTIL_selector "a")
40    endif (LLCOMMON_LINK_SHARED)
41    set(APR_LIBRARIES libapr-1.${APR_selector})
42    set(APRUTIL_LIBRARIES libaprutil-1.${APRUTIL_selector})
43    set(APRICONV_LIBRARIES iconv)
44  else (WINDOWS)
45    set(APR_LIBRARIES apr-1)
46    set(APRUTIL_LIBRARIES aprutil-1)
47    set(APRICONV_LIBRARIES iconv)
48  endif (WINDOWS)
49  set(APR_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/apr-1)
50
51  if (LINUX)
52    if (VIEWER)
53      list(APPEND APRUTIL_LIBRARIES ${DB_LIBRARIES} uuid)
54    endif (VIEWER)
55    list(APPEND APRUTIL_LIBRARIES ${DB_LIBRARIES} rt)
56  endif (LINUX)
57endif (STANDALONE)