aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/libgcrypt
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/libgcrypt')
-rw-r--r--linden/indra/libgcrypt/CMakeLists.txt52
1 files changed, 45 insertions, 7 deletions
diff --git a/linden/indra/libgcrypt/CMakeLists.txt b/linden/indra/libgcrypt/CMakeLists.txt
index 6c7446c..31c547f 100644
--- a/linden/indra/libgcrypt/CMakeLists.txt
+++ b/linden/indra/libgcrypt/CMakeLists.txt
@@ -2,6 +2,11 @@
2 2
3project(libgcrypt) 3project(libgcrypt)
4 4
5include(00-Common)
6include(libgpg-error)
7include(libgcrypt)
8include(Linking)
9
5if (WINDOWS) 10if (WINDOWS)
6 include_directories( 11 include_directories(
7 ../gpg.vs/inc.vs 12 ../gpg.vs/inc.vs
@@ -11,13 +16,6 @@ if (WINDOWS)
11 libgcrypt-1.2.2/mpi 16 libgcrypt-1.2.2/mpi
12 libgcrypt-1.2.2/mpi/generic 17 libgcrypt-1.2.2/mpi/generic
13 ) 18 )
14else (WINDOWS)
15 include_directories(
16 libgcrypt-1.2.2/src
17 libgcrypt-1.2.2/mpi
18 libgcrypt-1.2.2/mpi/generic
19 )
20endif (WINDOWS)
21 19
22set(libgcrypt_SOURCE_FILES 20set(libgcrypt_SOURCE_FILES
23 libgcrypt-1.2.2/src/ath.c 21 libgcrypt-1.2.2/src/ath.c
@@ -116,6 +114,46 @@ set_source_files_properties(${libgcrypt_HEADER_FILES}
116list(APPEND libgcrypt_SOURCE_FILES ${libgcrypt_HEADER_FILES}) 114list(APPEND libgcrypt_SOURCE_FILES ${libgcrypt_HEADER_FILES})
117 115
118add_library (libgcrypt ${libgcrypt_SOURCE_FILES}) 116add_library (libgcrypt ${libgcrypt_SOURCE_FILES})
117
118else (WINDOWS)
119
120include(ExternalProject)
121
122 include_directories(
123 ${LIBGPG-ERROR_INCLUDE_DIRS}
124 libgcrypt-1.2.2/src
125 libgcrypt-1.2.2/mpi
126 libgcrypt-1.2.2/mpi/generic
127 libgcrypt-1.2.2
128 )
129
130# Gotta fake a DOWNLOAD_COMMAND to work around a bug in cmake before 2.8.3.
131externalproject_add(EP_libgcrypt
132 DEPENDS EP_libgpg-error
133 DOWNLOAD_COMMAND ""
134 PREFIX ${CMAKE_CURRENT_SOURCE_DIR}/../libgcrypt/libgcrypt-1.2.2
135 SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../libgcrypt/libgcrypt-1.2.2
136 CONFIGURE_COMMAND <SOURCE_DIR>/configure -prefix=<INSTALL_DIR> --with-gpg-error-prefix=${CMAKE_CURRENT_SOURCE_DIR}/../libgpg-error/libgpg-error-1.0
137 BUILD_COMMAND ${MAKE}
138 BUILD_IN_SOURCE 1
139 INSTALL_COMMAND make install
140 )
141
142link_directories(${LIBGCRYPT_LIBRARIES})
143include_directories(${LIBGCRYPT_INCLUDE_DIRS})
144
145add_library(libgcrypt STATIC IMPORTED)
146
147set_target_properties(libgcrypt PROPERTIES
148 IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/../libgcrypt/libgcrypt-1.2.2/lib/libgcrypt.a
149 )
150
151# This wont work until 2.8.4 sigh
152#add_dependencies(libgcrypt EP_libgcrypt)
153
154endif (WINDOWS)
155
119target_link_libraries( 156target_link_libraries(
120 libgcrypt 157 libgcrypt
121 ) 158 )
159