aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/libgcrypt
diff options
context:
space:
mode:
authorDavid Walter Seikel2011-07-19 01:15:21 +1000
committerDavid Walter Seikel2011-07-19 01:15:21 +1000
commit588a8405b45bf6266141d9c7f3f7e086d00a2012 (patch)
tree89159affe62debd70c4869256dac80cf8e45d469 /linden/indra/libgcrypt
parentAdd the iGrid developmnet grid. (diff)
downloadmeta-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.txt53
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
3project(libgcrypt)
4
5include(00-Common) 3include(00-Common)
6include(libgpg-error) 4include(libgpg-error)
7include(libgcrypt) 5include(libgcrypt)
8include(Linking) 6include(Linking)
9 7
8project(gcrypt)
9
10if (WINDOWS) 10if (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
20set(libgcrypt_SOURCE_FILES 20set(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
86set(libgcrypt_HEADER_FILES 86set(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
111set_source_files_properties(${libgcrypt_HEADER_FILES} 111set_source_files_properties(${gcrypt_HEADER_FILES}
112 PROPERTIES HEADER_FILE_ONLY TRUE) 112 PROPERTIES HEADER_FILE_ONLY TRUE)
113 113
114list(APPEND libgcrypt_SOURCE_FILES ${libgcrypt_HEADER_FILES}) 114list(APPEND gcrypt_SOURCE_FILES ${gcrypt_HEADER_FILES})
115 115
116add_library (libgcrypt ${libgcrypt_SOURCE_FILES}) 116add_library (gcrypt ${gcrypt_SOURCE_FILES})
117target_link_libraries(
118 gcrypt
119 )
117 120
118else (WINDOWS) 121else (WINDOWS)
119 122
120include(ExternalProject) 123include(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.
131externalproject_add(EP_libgcrypt 126externalproject_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
142link_directories(${LIBGCRYPT_LIBRARIES})
143include_directories(${LIBGCRYPT_INCLUDE_DIRS})
144
145add_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
155endif (WINDOWS) 135endif (WINDOWS)
156 136
157target_link_libraries(
158 libgcrypt
159 )
160 137