diff options
author | David Walter Seikel | 2011-06-28 04:52:49 +1000 |
---|---|---|
committer | David Walter Seikel | 2011-06-28 04:52:49 +1000 |
commit | 5a5a5e8d35fb36151e3c687d728b0113a9f67234 (patch) | |
tree | 5b5f8baf951603c312c0cc96aee9f726fc3030f4 /linden/indra/libgcrypt | |
parent | Make it compile. (diff) | |
download | meta-impy-5a5a5e8d35fb36151e3c687d728b0113a9f67234.zip meta-impy-5a5a5e8d35fb36151e3c687d728b0113a9f67234.tar.gz meta-impy-5a5a5e8d35fb36151e3c687d728b0113a9f67234.tar.bz2 meta-impy-5a5a5e8d35fb36151e3c687d728b0113a9f67234.tar.xz |
Build libgpg-error and libgcrypt under linux, for OTR.
There is still a problem, the linux compile script (number 3) will bomb out at the link stage, but simply starting it again it runs fine.
This was too much work, and it's way past my bed time. It works, so commiting it now, and fixing that problem later.
Still could use some cleaning up to.
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 | |||