diff options
Diffstat (limited to 'linden/indra/libgcrypt')
-rw-r--r-- | linden/indra/libgcrypt/CMakeLists.txt | 52 |
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 | ||
3 | project(libgcrypt) | 3 | project(libgcrypt) |
4 | 4 | ||
5 | include(00-Common) | ||
6 | include(libgpg-error) | ||
7 | include(libgcrypt) | ||
8 | include(Linking) | ||
9 | |||
5 | if (WINDOWS) | 10 | if (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 | ) |
14 | else (WINDOWS) | ||
15 | include_directories( | ||
16 | libgcrypt-1.2.2/src | ||
17 | libgcrypt-1.2.2/mpi | ||
18 | libgcrypt-1.2.2/mpi/generic | ||
19 | ) | ||
20 | endif (WINDOWS) | ||
21 | 19 | ||
22 | set(libgcrypt_SOURCE_FILES | 20 | set(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} | |||
116 | list(APPEND libgcrypt_SOURCE_FILES ${libgcrypt_HEADER_FILES}) | 114 | list(APPEND libgcrypt_SOURCE_FILES ${libgcrypt_HEADER_FILES}) |
117 | 115 | ||
118 | add_library (libgcrypt ${libgcrypt_SOURCE_FILES}) | 116 | add_library (libgcrypt ${libgcrypt_SOURCE_FILES}) |
117 | |||
118 | else (WINDOWS) | ||
119 | |||
120 | include(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. | ||
131 | externalproject_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 | |||
142 | link_directories(${LIBGCRYPT_LIBRARIES}) | ||
143 | include_directories(${LIBGCRYPT_INCLUDE_DIRS}) | ||
144 | |||
145 | add_library(libgcrypt STATIC IMPORTED) | ||
146 | |||
147 | set_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 | |||
154 | endif (WINDOWS) | ||
155 | |||
119 | target_link_libraries( | 156 | target_link_libraries( |
120 | libgcrypt | 157 | libgcrypt |
121 | ) | 158 | ) |
159 | |||