diff options
Diffstat (limited to 'linden/indra/cmake/APR.cmake')
-rw-r--r-- | linden/indra/cmake/APR.cmake | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/linden/indra/cmake/APR.cmake b/linden/indra/cmake/APR.cmake new file mode 100644 index 0000000..2a96d70 --- /dev/null +++ b/linden/indra/cmake/APR.cmake | |||
@@ -0,0 +1,55 @@ | |||
1 | # -*- cmake -*- | ||
2 | |||
3 | include(BerkeleyDB) | ||
4 | include(Linking) | ||
5 | include(Prebuilt) | ||
6 | |||
7 | set(APR_FIND_QUIETLY ON) | ||
8 | set(APR_FIND_REQUIRED ON) | ||
9 | |||
10 | set(APRUTIL_FIND_QUIETLY ON) | ||
11 | set(APRUTIL_FIND_REQUIRED ON) | ||
12 | |||
13 | if (STANDALONE) | ||
14 | include(FindAPR) | ||
15 | else (STANDALONE) | ||
16 | use_prebuilt_binary(apr_suite) | ||
17 | if (WINDOWS) | ||
18 | set(WINLIBS_PREBUILT_DEBUG_DIR | ||
19 | ${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug | ||
20 | ) | ||
21 | set(WINLIBS_PREBUILT_RELEASE_DIR | ||
22 | ${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release | ||
23 | ) | ||
24 | set(APR_LIBRARIES | ||
25 | debug ${WINLIBS_PREBUILT_DEBUG_DIR}/apr-1.lib | ||
26 | optimized ${WINLIBS_PREBUILT_RELEASE_DIR}/apr-1.lib | ||
27 | ) | ||
28 | set(APRUTIL_LIBRARIES | ||
29 | debug ${WINLIBS_PREBUILT_DEBUG_DIR}/aprutil-1.lib | ||
30 | optimized ${WINLIBS_PREBUILT_RELEASE_DIR}/aprutil-1.lib | ||
31 | ) | ||
32 | set(APRICONV_LIBRARIES | ||
33 | debug ${WINLIBS_PREBUILT_DEBUG_DIR}/apriconv-1.lib | ||
34 | optimized ${WINLIBS_PREBUILT_RELEASE_DIR}/apriconv-1.lib | ||
35 | ) | ||
36 | elseif (DARWIN) | ||
37 | set(APR_LIBRARIES | ||
38 | debug ${ARCH_PREBUILT_DIRS_DEBUG}/libapr-1.a | ||
39 | optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libapr-1.a | ||
40 | ) | ||
41 | set(APRUTIL_LIBRARIES | ||
42 | debug ${ARCH_PREBUILT_DIRS_DEBUG}/libaprutil-1.a | ||
43 | optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libaprutil-1.a | ||
44 | ) | ||
45 | set(APRICONV_LIBRARIES apriconv-1) | ||
46 | else (WINDOWS) | ||
47 | set(APR_LIBRARIES apr-1) | ||
48 | set(APRUTIL_LIBRARIES aprutil-1) | ||
49 | endif (WINDOWS) | ||
50 | set(APR_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/apr-1) | ||
51 | |||
52 | if (LINUX AND VIEWER) | ||
53 | list(APPEND APRUTIL_LIBRARIES ${DB_LIBRARIES}) | ||
54 | endif (LINUX AND VIEWER) | ||
55 | endif (STANDALONE) | ||