diff options
author | David Walter Seikel | 2011-07-19 01:15:21 +1000 |
---|---|---|
committer | David Walter Seikel | 2011-07-19 01:15:21 +1000 |
commit | 588a8405b45bf6266141d9c7f3f7e086d00a2012 (patch) | |
tree | 89159affe62debd70c4869256dac80cf8e45d469 /linden/indra/libgcrypt | |
parent | Add the iGrid developmnet grid. (diff) | |
download | meta-impy-588a8405b45bf6266141d9c7f3f7e086d00a2012.zip meta-impy-588a8405b45bf6266141d9c7f3f7e086d00a2012.tar.gz meta-impy-588a8405b45bf6266141d9c7f3f7e086d00a2012.tar.bz2 meta-impy-588a8405b45bf6266141d9c7f3f7e086d00a2012.tar.xz |
Fix up gcrypt and gpg-error compiling and linking. Much cleaner now,and Windows might work again.
Diffstat (limited to 'linden/indra/libgcrypt')
-rw-r--r-- | linden/indra/libgcrypt/CMakeLists.txt | 53 |
1 files changed, 15 insertions, 38 deletions
diff --git a/linden/indra/libgcrypt/CMakeLists.txt b/linden/indra/libgcrypt/CMakeLists.txt index 1b6794c..9235a70 100644 --- a/linden/indra/libgcrypt/CMakeLists.txt +++ b/linden/indra/libgcrypt/CMakeLists.txt | |||
@@ -1,12 +1,12 @@ | |||
1 | # -*- cmake -*- | 1 | # -*- cmake -*- |
2 | 2 | ||
3 | project(libgcrypt) | ||
4 | |||
5 | include(00-Common) | 3 | include(00-Common) |
6 | include(libgpg-error) | 4 | include(libgpg-error) |
7 | include(libgcrypt) | 5 | include(libgcrypt) |
8 | include(Linking) | 6 | include(Linking) |
9 | 7 | ||
8 | project(gcrypt) | ||
9 | |||
10 | if (WINDOWS) | 10 | if (WINDOWS) |
11 | include_directories( | 11 | include_directories( |
12 | ../gpg.vs/inc.vs | 12 | ../gpg.vs/inc.vs |
@@ -17,7 +17,7 @@ if (WINDOWS) | |||
17 | libgcrypt-1.2.2/mpi/generic | 17 | libgcrypt-1.2.2/mpi/generic |
18 | ) | 18 | ) |
19 | 19 | ||
20 | set(libgcrypt_SOURCE_FILES | 20 | set(gcrypt_SOURCE_FILES |
21 | libgcrypt-1.2.2/src/ath.c | 21 | libgcrypt-1.2.2/src/ath.c |
22 | libgcrypt-1.2.2/src/global.c | 22 | libgcrypt-1.2.2/src/global.c |
23 | libgcrypt-1.2.2/src/misc.c | 23 | libgcrypt-1.2.2/src/misc.c |
@@ -83,7 +83,7 @@ set(libgcrypt_SOURCE_FILES | |||
83 | libgcrypt-1.2.2/mpi/generic/udiv-w-sdiv.c | 83 | libgcrypt-1.2.2/mpi/generic/udiv-w-sdiv.c |
84 | ) | 84 | ) |
85 | 85 | ||
86 | set(libgcrypt_HEADER_FILES | 86 | set(gcrypt_HEADER_FILES |
87 | CMakeLists.txt | 87 | CMakeLists.txt |
88 | 88 | ||
89 | libgcrypt-1.2.2/src/ath.h | 89 | libgcrypt-1.2.2/src/ath.h |
@@ -108,53 +108,30 @@ set(libgcrypt_HEADER_FILES | |||
108 | libgcrypt-1.2.2/mpi/generic/mpi-asm-defs.h | 108 | libgcrypt-1.2.2/mpi/generic/mpi-asm-defs.h |
109 | ) | 109 | ) |
110 | 110 | ||
111 | set_source_files_properties(${libgcrypt_HEADER_FILES} | 111 | set_source_files_properties(${gcrypt_HEADER_FILES} |
112 | PROPERTIES HEADER_FILE_ONLY TRUE) | 112 | PROPERTIES HEADER_FILE_ONLY TRUE) |
113 | 113 | ||
114 | list(APPEND libgcrypt_SOURCE_FILES ${libgcrypt_HEADER_FILES}) | 114 | list(APPEND gcrypt_SOURCE_FILES ${gcrypt_HEADER_FILES}) |
115 | 115 | ||
116 | add_library (libgcrypt ${libgcrypt_SOURCE_FILES}) | 116 | add_library (gcrypt ${gcrypt_SOURCE_FILES}) |
117 | target_link_libraries( | ||
118 | gcrypt | ||
119 | ) | ||
117 | 120 | ||
118 | else (WINDOWS) | 121 | else (WINDOWS) |
119 | 122 | ||
120 | include(ExternalProject) | 123 | include(ExternalProject) |
121 | 124 | ||
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. | 125 | # Gotta fake a DOWNLOAD_COMMAND to work around a bug in cmake before 2.8.3. |
131 | externalproject_add(EP_libgcrypt | 126 | externalproject_add(gcrypt |
132 | DEPENDS EP_libgpg-error | 127 | DEPENDS gpg-error |
133 | DOWNLOAD_COMMAND "" | 128 | DOWNLOAD_COMMAND "" |
134 | PREFIX ${CMAKE_CURRENT_SOURCE_DIR}/../libgcrypt/libgcrypt-1.2.2 | 129 | PREFIX ${CMAKE_BINARY_DIR}/libgcrypt |
135 | SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../libgcrypt/libgcrypt-1.2.2 | 130 | SOURCE_DIR ${CMAKE_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 | 131 | CONFIGURE_COMMAND <SOURCE_DIR>/configure -prefix=<INSTALL_DIR> --with-gpg-error-prefix=${CMAKE_BINARY_DIR}/libgpg-error |
137 | BUILD_COMMAND ${MAKE} | ||
138 | BUILD_IN_SOURCE 1 | ||
139 | INSTALL_COMMAND make install | 132 | INSTALL_COMMAND make install |
140 | ) | 133 | ) |
141 | 134 | ||
142 | link_directories(${LIBGCRYPT_LIBRARIES}) | ||
143 | include_directories(${LIBGCRYPT_INCLUDE_DIRS}) | ||
144 | |||
145 | add_library(libgcrypt STATIC IMPORTED) | ||
146 | |||
147 | # Happy this is not needed, but leaving it around for reference. | ||
148 | #set_target_properties(libgcrypt PROPERTIES | ||
149 | # IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/../libgcrypt/libgcrypt-1.2.2/lib/libgcrypt.a | ||
150 | # ) | ||
151 | |||
152 | # This wont work until 2.8.4 sigh | ||
153 | #add_dependencies(libgcrypt EP_libgcrypt) | ||
154 | |||
155 | endif (WINDOWS) | 135 | endif (WINDOWS) |
156 | 136 | ||
157 | target_link_libraries( | ||
158 | libgcrypt | ||
159 | ) | ||
160 | 137 | ||