Mercurial > hg > orthanc-databases
annotate Resources/CMake/PostgreSQLConfiguration.cmake @ 166:abba5165f24e
support for PostgreSQL 12 and forthcoming 13
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sun, 02 Aug 2020 11:23:35 +0200 |
parents | 4cd7e45b671e |
children | 8c7bb94adff7 |
rev | line source |
---|---|
0 | 1 # Orthanc - A Lightweight, RESTful DICOM Store |
2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | |
3 # Department, University Hospital of Liege, Belgium | |
140
4cd7e45b671e
upgrade to year 2020
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
120
diff
changeset
|
4 # Copyright (C) 2017-2020 Osimis S.A., Belgium |
0 | 5 # |
6 # This program is free software: you can redistribute it and/or | |
7 # modify it under the terms of the GNU Affero General Public License | |
8 # as published by the Free Software Foundation, either version 3 of | |
9 # the License, or (at your option) any later version. | |
10 # | |
11 # This program is distributed in the hope that it will be useful, but | |
12 # WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
14 # Affero General Public License for more details. | |
15 # | |
16 # You should have received a copy of the GNU Affero General Public License | |
17 # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
18 | |
19 | |
20 ##################################################################### | |
21 ## PostgreSQL | |
22 ##################################################################### | |
23 | |
24 INCLUDE(CheckTypeSize) | |
25 INCLUDE(CheckCSourceCompiles) | |
26 INCLUDE(CheckFunctionExists) | |
27 INCLUDE(CheckStructHasMember) | |
28 | |
29 | |
30 if (STATIC_BUILD OR NOT USE_SYSTEM_LIBPQ) | |
31 add_definitions(-DORTHANC_POSTGRESQL_STATIC=1) | |
32 | |
33 SET(LIBPQ_MAJOR 9) | |
34 SET(LIBPQ_MINOR 6) | |
35 SET(LIBPQ_REVISION 1) | |
36 SET(LIBPQ_VERSION ${LIBPQ_MAJOR}.${LIBPQ_MINOR}.${LIBPQ_REVISION}) | |
37 | |
38 SET(LIBPQ_SOURCES_DIR ${CMAKE_BINARY_DIR}/postgresql-${LIBPQ_VERSION}) | |
39 DownloadPackage( | |
40 "eaa7e267e89ea1ed2693d2b88d3cd290" | |
91
1bd538a5a783
moving third-party dependencies to another server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
83
diff
changeset
|
41 "http://orthanc.osimis.io/ThirdPartyDownloads/postgresql-${LIBPQ_VERSION}.tar.gz" |
0 | 42 "${LIBPQ_SOURCES_DIR}") |
43 | |
44 | |
45 ## | |
46 ## Platform-specific configuration | |
47 ## | |
48 | |
49 if (CMAKE_SYSTEM_NAME STREQUAL "Windows") | |
50 add_definitions( | |
51 -DEXEC_BACKEND | |
52 ) | |
53 | |
54 configure_file( | |
55 ${LIBPQ_SOURCES_DIR}/src/include/port/win32.h | |
56 ${AUTOGENERATED_DIR}/pg_config_os.h | |
57 COPYONLY) | |
58 | |
59 elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux") | |
60 add_definitions( | |
61 -D_GNU_SOURCE | |
62 -D_THREAD_SAFE | |
63 -D_POSIX_PTHREAD_SEMANTICS | |
64 ) | |
65 | |
66 configure_file( | |
67 ${LIBPQ_SOURCES_DIR}/src/include/port/linux.h | |
68 ${AUTOGENERATED_DIR}/pg_config_os.h | |
69 COPYONLY) | |
70 | |
71 elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin") | |
72 add_definitions( | |
73 -D_GNU_SOURCE | |
74 -D_THREAD_SAFE | |
75 -D_POSIX_PTHREAD_SEMANTICS | |
76 ) | |
77 | |
78 configure_file( | |
79 ${LIBPQ_SOURCES_DIR}/src/include/port/darwin.h | |
80 ${AUTOGENERATED_DIR}/pg_config_os.h | |
81 COPYONLY) | |
82 | |
83 elseif (CMAKE_SYSTEM_NAME STREQUAL "OpenBSD") | |
84 configure_file( | |
85 ${LIBPQ_SOURCES_DIR}/src/include/port/openbsd.h | |
86 ${AUTOGENERATED_DIR}/pg_config_os.h | |
87 COPYONLY) | |
88 | |
89 elseif (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") | |
90 configure_file( | |
91 ${LIBPQ_SOURCES_DIR}/src/include/port/freebsd.h | |
92 ${AUTOGENERATED_DIR}/pg_config_os.h | |
93 COPYONLY) | |
94 | |
95 else() | |
96 message(FATAL_ERROR "Support your platform here") | |
97 endif() | |
98 | |
99 | |
100 ## | |
101 ## Generation of "pg_config.h" | |
102 ## | |
103 | |
104 if (CMAKE_SYSTEM_NAME STREQUAL "Windows") | |
105 configure_file( | |
106 ${LIBPQ_SOURCES_DIR}/src/include/pg_config_ext.h.win32 | |
107 ${AUTOGENERATED_DIR}/pg_config_ext.h | |
108 COPYONLY) | |
109 | |
110 configure_file( | |
111 ${LIBPQ_SOURCES_DIR}/src/include/pg_config.h.win32 | |
112 ${AUTOGENERATED_DIR}/pg_config.h | |
113 COPYONLY) | |
114 | |
115 if (CMAKE_COMPILER_IS_GNUCXX) # MinGW | |
116 add_definitions( | |
117 -DPG_PRINTF_ATTRIBUTE=gnu_printf | |
118 -DHAVE_GETTIMEOFDAY | |
119 -DHAVE_LONG_LONG_INT_64 | |
120 -DHAVE_STRUCT_ADDRINFO | |
121 -DHAVE_STRUCT_SOCKADDR_STORAGE | |
122 -DHAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY | |
123 ) | |
124 endif() | |
125 | |
83 | 126 if (ENABLE_SSL) |
127 add_definitions( | |
128 -DHAVE_LIBSSL=1 | |
129 -DUSE_OPENSSL=1 | |
130 ) | |
131 endif() | |
132 | |
0 | 133 elseif(CROSS_COMPILING) |
134 message(FATAL_ERROR "Cannot auto-generate the configuration file cross-compiling") | |
135 | |
136 else() | |
137 configure_file( | |
138 ${CMAKE_CURRENT_LIST_DIR}/../PostgreSQL/pg_config_ext.h | |
139 ${AUTOGENERATED_DIR}/pg_config_ext.h | |
140 COPYONLY | |
141 ) | |
142 | |
143 set(CMAKE_EXTRA_INCLUDE_FILES "sys/socket.h;netdb.h;sys/types.h") | |
144 | |
145 include(${CMAKE_CURRENT_LIST_DIR}/../PostgreSQL/func_accept_args.cmake) | |
146 set(ACCEPT_TYPE_ARG3 ${ACCEPT_TYPE_ARG3}) | |
147 | |
148 check_type_size("long int" SIZE_LONG_INT) | |
149 if (SIZE_LONG_INT EQUAL 8) | |
150 set(HAVE_LONG_INT_64 1) | |
151 endif() | |
152 | |
153 check_type_size("long long int" SIZE_LONG_LONG_INT) | |
154 if (SIZE_LONG_LONG_INT EQUAL 8) | |
155 set(HAVE_LONG_LONG_INT_64 1) | |
156 endif() | |
157 | |
158 file(READ ${CMAKE_CURRENT_LIST_DIR}/../PostgreSQL/c_flexmember.c SOURCE) | |
159 check_c_source_compiles("${SOURCE}" c_flexmember) | |
160 if (c_flexmember) | |
161 set(FLEXIBLE_ARRAY_MEMBER "/**/") | |
162 endif() | |
163 | |
164 if (CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR | |
165 CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR | |
166 CMAKE_SYSTEM_NAME STREQUAL "OpenBSD") | |
167 set(PG_PRINTF_ATTRIBUTE "printf") | |
168 else() | |
169 file(READ ${CMAKE_CURRENT_LIST_DIR}/../PostgreSQL/printf_archetype.c SOURCE) | |
170 check_c_source_compiles("${SOURCE}" printf_archetype) | |
171 if (printf_archetype) | |
172 set(PG_PRINTF_ATTRIBUTE "gnu_printf") | |
173 else() | |
174 set(PG_PRINTF_ATTRIBUTE "printf") | |
175 endif() | |
176 endif() | |
177 | |
178 check_function_exists("isinf" HAVE_ISINF) | |
179 check_function_exists("getaddrinfo" HAVE_GETADDRINFO) | |
180 check_function_exists("gettimeofday" HAVE_GETTIMEOFDAY) | |
181 check_function_exists("snprintf" HAVE_DECL_SNPRINTF) | |
182 check_function_exists("srandom" HAVE_SRANDOM) | |
183 check_function_exists("strlcat" HAVE_DECL_STRLCAT) | |
184 check_function_exists("strlcpy" HAVE_DECL_STRLCPY) | |
185 check_function_exists("unsetenv" HAVE_UNSETENV) | |
186 check_function_exists("vsnprintf" HAVE_DECL_VSNPRINTF) | |
187 | |
188 check_type_size("struct addrinfo" SIZE_STRUCT_ADDRINFO) | |
189 if (HAVE_SIZE_STRUCT_ADDRINFO) | |
190 set(HAVE_STRUCT_ADDRINFO 1) | |
191 endif() | |
192 | |
193 check_type_size("struct sockaddr_storage" SIZE_STRUCT_SOCKADDR_STORAGE) | |
194 if (HAVE_SIZE_STRUCT_SOCKADDR_STORAGE) | |
195 set(HAVE_STRUCT_SOCKADDR_STORAGE 1) | |
196 endif() | |
197 | |
198 set(MEMSET_LOOP_LIMIT 1024) # This is hardcoded in "postgresql-9.6.1/configure" | |
199 set(DEF_PGPORT 5432) # Default port number of PostgreSQL | |
200 set(DEF_PGPORT_STR "\"5432\"") # Same as above, as a string | |
201 set(PG_VERSION "\"${LIBPQ_VERSION}\"") # Version of PostgreSQL, as a string | |
202 | |
203 # Version of PostgreSQL, as a number | |
204 math(EXPR PG_VERSION_NUM "${LIBPQ_MAJOR} * 10000 + ${LIBPQ_MINOR} * 100 + ${LIBPQ_REVISION}") | |
205 | |
206 set(HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1) # TODO Autodetection | |
207 | |
208 # Compute maximum alignment of any basic type. | |
209 # We assume long's alignment is at least as strong as char, short, or int; | |
210 # but we must check long long (if it exists) and double. | |
211 check_type_size("long" SIZE_LONG) | |
212 check_type_size("long long" SIZE_LONG_LONG) | |
213 check_type_size("double" SIZE_DOUBLE) | |
214 set(MAXIMUM_ALIGNOF ${SIZE_LONG}) | |
215 if(SIZE_LONG_LONG AND SIZE_LONG_LONG GREATER MAXIMUM_ALIGNOF) | |
216 set(MAXIMUM_ALIGNOF ${SIZE_LONG_LONG}) | |
217 endif() | |
218 if(SIZE_DOUBLE GREATER MAXIMUM_ALIGNOF) | |
219 set(MAXIMUM_ALIGNOF ${SIZE_DOUBLE}) | |
220 endif() | |
221 | |
222 check_include_file("poll.h" HAVE_POLL_H) | |
223 check_include_file("net/if.h" HAVE_NET_IF_H) | |
224 check_include_file("netinet/in.h" HAVE_NETINET_IN_H) | |
225 check_include_file("netinet/tcp.h" HAVE_NETINET_TCP_H) | |
226 check_include_file("sys/ioctl.h" HAVE_SYS_IOCTL_H) | |
227 check_include_file("sys/un.h" HAVE_SYS_UN_H) | |
228 | |
229 If (NOT HAVE_NET_IF_H) # This is the case of OpenBSD | |
230 unset(HAVE_NET_IF_H CACHE) | |
231 check_include_files("sys/socket.h;net/if.h" HAVE_NET_IF_H) | |
232 endif() | |
233 | |
234 if (NOT HAVE_NETINET_TCP_H) # This is the case of OpenBSD | |
235 unset(HAVE_NETINET_TCP_H CACHE) | |
236 check_include_files("sys/socket.h;netinet/tcp.h" HAVE_NETINET_TCP_H) | |
237 endif() | |
238 | |
80
16df1a6ea452
Fix issue 105 (Unable to connect to PostgreSQL database using SSL)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
67
diff
changeset
|
239 if (ENABLE_SSL) |
16df1a6ea452
Fix issue 105 (Unable to connect to PostgreSQL database using SSL)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
67
diff
changeset
|
240 set(HAVE_LIBSSL 1) |
16df1a6ea452
Fix issue 105 (Unable to connect to PostgreSQL database using SSL)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
67
diff
changeset
|
241 set(HAVE_SSL_GET_CURRENT_COMPRESSION 1) |
16df1a6ea452
Fix issue 105 (Unable to connect to PostgreSQL database using SSL)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
67
diff
changeset
|
242 set(USE_OPENSSL 1) |
16df1a6ea452
Fix issue 105 (Unable to connect to PostgreSQL database using SSL)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
67
diff
changeset
|
243 endif() |
16df1a6ea452
Fix issue 105 (Unable to connect to PostgreSQL database using SSL)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
67
diff
changeset
|
244 |
0 | 245 execute_process( |
246 COMMAND | |
247 ${PYTHON_EXECUTABLE} | |
248 "${CMAKE_CURRENT_LIST_DIR}/../PostgreSQL/PrepareCMakeConfigurationFile.py" | |
249 "${LIBPQ_SOURCES_DIR}/src/include/pg_config.h.in" | |
250 "${AUTOGENERATED_DIR}/pg_config.h.in" | |
251 ERROR_VARIABLE NO_PG_CONFIG | |
252 OUTPUT_VARIABLE out | |
253 ) | |
254 | |
255 if (NO_PG_CONFIG) | |
256 message(FATAL_ERROR "Cannot find pg_config.h.in") | |
257 endif() | |
258 | |
259 configure_file( | |
260 ${AUTOGENERATED_DIR}/pg_config.h.in | |
261 ${AUTOGENERATED_DIR}/pg_config.h) | |
262 endif() | |
263 | |
264 | |
265 | |
266 ## | |
267 ## Generic configuration | |
268 ## | |
269 | |
270 file(WRITE | |
271 ${AUTOGENERATED_DIR}/pg_config_paths.h | |
272 "") | |
273 | |
274 add_definitions( | |
275 -D_REENTRANT | |
276 -DFRONTEND | |
277 -DUNSAFE_STAT_OK | |
278 -DSYSCONFDIR="" | |
120 | 279 -DTCP_NODELAY |
0 | 280 ) |
281 | |
282 include_directories( | |
283 ${LIBPQ_SOURCES_DIR}/src/include | |
284 ${LIBPQ_SOURCES_DIR}/src/include/libpq | |
285 ${LIBPQ_SOURCES_DIR}/src/interfaces/libpq | |
286 ) | |
287 | |
288 set(LIBPQ_SOURCES | |
289 ${LIBPQ_SOURCES_DIR}/src/interfaces/libpq/fe-auth.c | |
290 ${LIBPQ_SOURCES_DIR}/src/interfaces/libpq/fe-connect.c | |
291 ${LIBPQ_SOURCES_DIR}/src/interfaces/libpq/fe-exec.c | |
292 ${LIBPQ_SOURCES_DIR}/src/interfaces/libpq/fe-lobj.c | |
293 ${LIBPQ_SOURCES_DIR}/src/interfaces/libpq/fe-misc.c | |
294 ${LIBPQ_SOURCES_DIR}/src/interfaces/libpq/fe-print.c | |
295 ${LIBPQ_SOURCES_DIR}/src/interfaces/libpq/fe-protocol2.c | |
296 ${LIBPQ_SOURCES_DIR}/src/interfaces/libpq/fe-protocol3.c | |
297 ${LIBPQ_SOURCES_DIR}/src/interfaces/libpq/fe-secure.c | |
298 ${LIBPQ_SOURCES_DIR}/src/interfaces/libpq/libpq-events.c | |
299 ${LIBPQ_SOURCES_DIR}/src/interfaces/libpq/pqexpbuffer.c | |
300 | |
301 # libpgport C files we always use | |
302 ${LIBPQ_SOURCES_DIR}/src/port/chklocale.c | |
303 ${LIBPQ_SOURCES_DIR}/src/port/inet_net_ntop.c | |
304 ${LIBPQ_SOURCES_DIR}/src/port/noblock.c | |
305 ${LIBPQ_SOURCES_DIR}/src/port/pgstrcasecmp.c | |
306 ${LIBPQ_SOURCES_DIR}/src/port/pqsignal.c | |
307 ${LIBPQ_SOURCES_DIR}/src/port/thread.c | |
308 | |
309 ${LIBPQ_SOURCES_DIR}/src/backend/libpq/ip.c | |
310 ${LIBPQ_SOURCES_DIR}/src/backend/libpq/md5.c | |
311 ${LIBPQ_SOURCES_DIR}/src/backend/utils/mb/encnames.c | |
312 ${LIBPQ_SOURCES_DIR}/src/backend/utils/mb/wchar.c | |
313 ) | |
314 | |
80
16df1a6ea452
Fix issue 105 (Unable to connect to PostgreSQL database using SSL)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
67
diff
changeset
|
315 if (ENABLE_SSL) |
16df1a6ea452
Fix issue 105 (Unable to connect to PostgreSQL database using SSL)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
67
diff
changeset
|
316 list(APPEND LIBPQ_SOURCES |
16df1a6ea452
Fix issue 105 (Unable to connect to PostgreSQL database using SSL)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
67
diff
changeset
|
317 ${LIBPQ_SOURCES_DIR}/src/interfaces/libpq/fe-secure-openssl.c |
16df1a6ea452
Fix issue 105 (Unable to connect to PostgreSQL database using SSL)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
67
diff
changeset
|
318 ) |
16df1a6ea452
Fix issue 105 (Unable to connect to PostgreSQL database using SSL)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
67
diff
changeset
|
319 endif() |
16df1a6ea452
Fix issue 105 (Unable to connect to PostgreSQL database using SSL)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
67
diff
changeset
|
320 |
0 | 321 |
322 if (CMAKE_SYSTEM_NAME STREQUAL "Linux") | |
323 LIST(APPEND LIBPQ_SOURCES | |
324 ${LIBPQ_SOURCES_DIR}/src/port/strlcpy.c | |
325 ) | |
326 | |
327 elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows") | |
5 | 328 link_libraries(secur32) |
329 | |
0 | 330 include_directories( |
331 ${LIBPQ_SOURCES_DIR}/src/include/port/win32 | |
332 ${LIBPQ_SOURCES_DIR}/src/port | |
333 ) | |
334 | |
335 LIST(APPEND LIBPQ_SOURCES | |
336 # libpgport C files that are needed if identified by configure | |
337 ${LIBPQ_SOURCES_DIR}/src/interfaces/libpq/win32.c | |
338 ${LIBPQ_SOURCES_DIR}/src/port/crypt.c | |
339 ${LIBPQ_SOURCES_DIR}/src/port/inet_aton.c | |
340 ${LIBPQ_SOURCES_DIR}/src/port/open.c | |
341 ${LIBPQ_SOURCES_DIR}/src/port/pgsleep.c | |
342 ${LIBPQ_SOURCES_DIR}/src/port/snprintf.c | |
343 ${LIBPQ_SOURCES_DIR}/src/port/system.c | |
344 ${LIBPQ_SOURCES_DIR}/src/port/win32setlocale.c | |
345 ${LIBPQ_SOURCES_DIR}/src/port/getaddrinfo.c | |
346 ${LIBPQ_SOURCES_DIR}/src/port/strlcpy.c | |
347 ) | |
348 | |
349 if (CMAKE_COMPILER_IS_GNUCXX OR | |
350 (MSVC AND MSVC_VERSION GREATER 1800)) | |
351 # Starting Visual Studio 2013 (version 1800), it is necessary to also add "win32error.c" | |
352 LIST(APPEND LIBPQ_SOURCES ${LIBPQ_SOURCES_DIR}/src/port/win32error.c) | |
353 endif() | |
354 | |
355 if (MSVC) | |
356 LIST(APPEND LIBPQ_SOURCES ${LIBPQ_SOURCES_DIR}/src/interfaces/libpq/pthread-win32.c) | |
357 endif() | |
358 endif() | |
359 | |
360 if (CMAKE_COMPILER_IS_GNUCXX AND | |
361 NOT CMAKE_SYSTEM_NAME STREQUAL "OpenBSD") | |
362 LIST(APPEND LIBPQ_SOURCES | |
363 ${LIBPQ_SOURCES_DIR}/src/port/getpeereid.c | |
364 ) | |
365 | |
366 elseif (MSVC) | |
367 include_directories( | |
368 ${LIBPQ_SOURCES_DIR}/src/include/port/win32_msvc | |
369 ) | |
370 | |
371 LIST(APPEND LIBPQ_SOURCES | |
372 ${LIBPQ_SOURCES_DIR}/src/port/dirent.c | |
373 ${LIBPQ_SOURCES_DIR}/src/port/dirmod.c | |
374 ) | |
375 endif() | |
376 | |
377 source_group(ThirdParty\\PostgreSQL REGULAR_EXPRESSION ${LIBPQ_SOURCES_DIR}/.*) | |
378 | |
379 else() | |
104
0a713ffdf842
fix build on Ubuntu 14.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
103
diff
changeset
|
380 set(PostgreSQL_ADDITIONAL_VERSIONS |
166
abba5165f24e
support for PostgreSQL 12 and forthcoming 13
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
140
diff
changeset
|
381 "13" "12" "11" "10" "9.6" "9.5" "9.4" "9.3" "9.2" "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0") |
104
0a713ffdf842
fix build on Ubuntu 14.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
103
diff
changeset
|
382 if (NOT WIN32) |
0a713ffdf842
fix build on Ubuntu 14.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
103
diff
changeset
|
383 foreach (suffix ${PostgreSQL_ADDITIONAL_VERSIONS}) |
0a713ffdf842
fix build on Ubuntu 14.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
103
diff
changeset
|
384 list(APPEND PostgreSQL_ADDITIONAL_SEARCH_PATHS |
0a713ffdf842
fix build on Ubuntu 14.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
103
diff
changeset
|
385 "/usr/include/postgresql/${suffix}" |
0a713ffdf842
fix build on Ubuntu 14.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
103
diff
changeset
|
386 "/usr/include/postgresql/${suffix}/server" |
0a713ffdf842
fix build on Ubuntu 14.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
103
diff
changeset
|
387 "/usr/local/include/postgresql/${suffix}" |
0a713ffdf842
fix build on Ubuntu 14.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
103
diff
changeset
|
388 ) |
0a713ffdf842
fix build on Ubuntu 14.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
103
diff
changeset
|
389 endforeach() |
0a713ffdf842
fix build on Ubuntu 14.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
103
diff
changeset
|
390 endif() |
0a713ffdf842
fix build on Ubuntu 14.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
103
diff
changeset
|
391 |
103 | 392 include(FindPostgreSQL) |
0 | 393 include_directories( |
394 ${PostgreSQL_INCLUDE_DIR} | |
395 ${PostgreSQL_TYPE_INCLUDE_DIR} | |
396 ) | |
397 link_libraries(${PostgreSQL_LIBRARY}) | |
398 endif() |