mirror of https://github.com/microsoft/vcpkg.git
41 lines
1.4 KiB
Diff
41 lines
1.4 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 9cbc6d73..30a88c1a 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -361,11 +361,10 @@ endif()
|
|
|
|
if (BUILD_POSTGRESQL)
|
|
# find postgres
|
|
- find_package(pg)
|
|
- if (pg_FOUND)
|
|
- message(STATUS "libpq inc path:" ${PG_INCLUDE_DIRS})
|
|
- message(STATUS "libpq lib:" ${PG_LIBRARIES})
|
|
- target_link_libraries(${PROJECT_NAME} PRIVATE pg_lib)
|
|
+ find_package(PostgreSQL REQUIRED)
|
|
+ if(PostgreSQL_FOUND)
|
|
+ set(pg_FOUND true)
|
|
+ target_link_libraries(${PROJECT_NAME} PRIVATE PostgreSQL::PostgreSQL)
|
|
set(DROGON_SOURCES
|
|
${DROGON_SOURCES}
|
|
orm_lib/src/postgresql_impl/PostgreSQLResultImpl.cc
|
|
@@ -395,7 +394,7 @@ if (BUILD_POSTGRESQL)
|
|
${private_headers}
|
|
orm_lib/src/postgresql_impl/PgConnection.h)
|
|
endif (libpq_supports_batch)
|
|
- endif (pg_FOUND)
|
|
+ endif (PostgreSQL_FOUND)
|
|
endif (BUILD_POSTGRESQL)
|
|
|
|
if (BUILD_MYSQL)
|
|
@@ -420,7 +419,9 @@ if (BUILD_MYSQL)
|
|
message(STATUS "Mariadb support mysql_optionsv")
|
|
add_definitions(-DHAS_MYSQL_OPTIONSV)
|
|
endif(HAS_MYSQL_OPTIONSV)
|
|
-
|
|
+ if (NOT BUILD_SHARED_LIBS AND WIN32)
|
|
+ target_link_libraries(${PROJECT_NAME} PUBLIC bcrypt)
|
|
+ endif()
|
|
set(DROGON_SOURCES
|
|
${DROGON_SOURCES}
|
|
orm_lib/src/mysql_impl/MysqlConnection.cc
|