Mercurial > hg > orthanc-databases
comparison Resources/CMake/PostgreSQLConfiguration.cmake @ 177:02ad3ea95fca
fix build on ubuntu 16.04
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 12 Dec 2020 19:45:47 +0100 |
parents | 1b67c6f8037c |
children | 48aa43c14bb3 |
comparison
equal
deleted
inserted
replaced
176:0246923d4df9 | 177:02ad3ea95fca |
---|---|
193 if (MSVC) | 193 if (MSVC) |
194 set(inline "__inline") | 194 set(inline "__inline") |
195 endif() | 195 endif() |
196 | 196 |
197 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") | 197 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") |
198 set(CMAKE_EXTRA_INCLUDE_FILES "sys/types.h;winsock2.h;ws2tcpip.h") | 198 set(CMAKE_EXTRA_INCLUDE_FILES "sys/types.h;winsock2.h;ws2tcpip.h;float.h;math.h") |
199 else() | 199 else() |
200 set(CMAKE_EXTRA_INCLUDE_FILES "sys/types.h;sys/socket.h;netdb.h") | 200 set(CMAKE_EXTRA_INCLUDE_FILES "sys/types.h;sys/socket.h;netdb.h;float.h;math.h") |
201 endif() | 201 endif() |
202 | 202 |
203 check_type_size("size_t" SIZEOF_SIZE_T) | 203 check_type_size("size_t" SIZEOF_SIZE_T) |
204 check_type_size("struct addrinfo" HAVE_STRUCT_ADDRINFO) | 204 check_type_size("struct addrinfo" HAVE_STRUCT_ADDRINFO) |
205 check_type_size("struct sockaddr_storage" HAVE_STRUCT_SOCKADDR_STORAGE) | 205 check_type_size("struct sockaddr_storage" HAVE_STRUCT_SOCKADDR_STORAGE) |
219 check_function_exists(unsetenv HAVE_UNSETENV) | 219 check_function_exists(unsetenv HAVE_UNSETENV) |
220 check_function_exists(strlcat HAVE_STRLCAT) | 220 check_function_exists(strlcat HAVE_STRLCAT) |
221 check_function_exists(strlcpy HAVE_STRLCPY) | 221 check_function_exists(strlcpy HAVE_STRLCPY) |
222 check_function_exists(getpeereid HAVE_GETPEEREID) | 222 check_function_exists(getpeereid HAVE_GETPEEREID) |
223 check_function_exists(getpeerucred HAVE_GETPEERUCRED) | 223 check_function_exists(getpeerucred HAVE_GETPEERUCRED) |
224 check_function_exists(isinf HAVE_ISINF) | |
225 check_function_exists(isnan HAVE_ISNAN) | |
224 | 226 |
225 check_symbol_exists(strlcpy "stdio.h;string.h" HAVE_DECL_STRLCPY) | 227 check_symbol_exists(strlcpy "stdio.h;string.h" HAVE_DECL_STRLCPY) |
226 if (NOT HAVE_DECL_STRLCPY) | 228 if (NOT HAVE_DECL_STRLCPY) |
227 set(HAVE_DECL_STRLCPY 0) | 229 set(HAVE_DECL_STRLCPY 0) |
228 endif() | 230 endif() |
390 ${LIBPQ_SOURCES_DIR}/src/port/dirmod.c | 392 ${LIBPQ_SOURCES_DIR}/src/port/dirmod.c |
391 ${LIBPQ_SOURCES_DIR}/src/port/inet_aton.c | 393 ${LIBPQ_SOURCES_DIR}/src/port/inet_aton.c |
392 ${LIBPQ_SOURCES_DIR}/src/port/open.c | 394 ${LIBPQ_SOURCES_DIR}/src/port/open.c |
393 ${LIBPQ_SOURCES_DIR}/src/port/pgsleep.c | 395 ${LIBPQ_SOURCES_DIR}/src/port/pgsleep.c |
394 ${LIBPQ_SOURCES_DIR}/src/port/system.c | 396 ${LIBPQ_SOURCES_DIR}/src/port/system.c |
395 ${LIBPQ_SOURCES_DIR}/src/port/win32error.c | |
396 ${LIBPQ_SOURCES_DIR}/src/port/win32setlocale.c | 397 ${LIBPQ_SOURCES_DIR}/src/port/win32setlocale.c |
397 ) | 398 ) |
399 | |
400 if (CMAKE_COMPILER_IS_GNUCXX OR | |
401 (MSVC AND MSVC_VERSION GREATER 1800)) | |
402 # Starting Visual Studio 2013 (version 1800), it is necessary to also add "win32error.c" | |
403 LIST(APPEND LIBPQ_SOURCES ${LIBPQ_SOURCES_DIR}/src/port/win32error.c) | |
404 endif() | |
398 | 405 |
399 if (MSVC) | 406 if (MSVC) |
400 include_directories( | 407 include_directories( |
401 ${LIBPQ_SOURCES_DIR}/src/include/port/win32_msvc | 408 ${LIBPQ_SOURCES_DIR}/src/include/port/win32_msvc |
402 ) | 409 ) |