# HG changeset patch # User Sebastien Jodogne # Date 1478600141 -3600 # Node ID 22f3170c27917432a1987b60c49f3b845a3f417e # Parent 045e251f9c4da852d6d2ed978e516cef49a8e455 fix diff -r 045e251f9c4d -r 22f3170c2791 Resources/CMake/PostgreSQLConfiguration.cmake --- a/Resources/CMake/PostgreSQLConfiguration.cmake Tue Nov 08 10:07:23 2016 +0100 +++ b/Resources/CMake/PostgreSQLConfiguration.cmake Tue Nov 08 11:15:41 2016 +0100 @@ -154,16 +154,17 @@ ${PQ_SOURCES_DIR}/src/port/pgsleep.c ${PQ_SOURCES_DIR}/src/port/snprintf.c ${PQ_SOURCES_DIR}/src/port/system.c - ${PQ_SOURCES_DIR}/src/port/win32error.c ${PQ_SOURCES_DIR}/src/port/win32setlocale.c ${PQ_SOURCES_DIR}/src/port/getaddrinfo.c ) - if (${CMAKE_COMPILER_IS_GNUCXX}) + if (CMAKE_COMPILER_IS_GNUCXX OR + (MSVC AND MSVC_VERSION GREATER 1800)) + # Starting Visual Studio 2013 (version 1800), it is necessary to also add "win32error.c" LIST(APPEND LIBPQ_SOURCES ${PQ_SOURCES_DIR}/src/port/win32error.c) endif() - if (${MSVC}) + if (MSVC) LIST(APPEND LIBPQ_SOURCES ${PQ_SOURCES_DIR}/src/interfaces/libpq/pthread-win32.c) endif() endif()