vcpkg/ports/drogon/vcpkg.patch

42 lines
1.4 KiB
Diff
Raw Normal View History

diff --git a/CMakeLists.txt b/CMakeLists.txt
2021-04-13 02:12:20 +08:00
index 7465e46..9650a59 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
2021-04-13 02:12:20 +08:00
@@ -99,9 +99,9 @@ if (WIN32)
PRIVATE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/third_party/mman-win32>)
endif (WIN32)
-add_subdirectory(trantor)
+find_package(Trantor CONFIG REQUIRED)
-target_link_libraries(${PROJECT_NAME} PUBLIC trantor)
+target_link_libraries(${PROJECT_NAME} PUBLIC Trantor::Trantor)
2021-04-13 02:12:20 +08:00
if (NOT WIN32)
if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
@@ -205,11 +205,10 @@ endif (NOT WIN32)
2020-11-03 05:58:02 +08:00
2021-04-13 02:12:20 +08:00
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)
if (LIBPQ_BATCH_MODE)
@@ -228,7 +227,7 @@ if (BUILD_POSTGRESQL)
set(DROGON_SOURCES ${DROGON_SOURCES}
orm_lib/src/postgresql_impl/PgConnection.cc)
endif (libpq_supports_batch)
- endif (pg_FOUND)
+ endif (PostgreSQL_FOUND)
endif (BUILD_POSTGRESQL)
if (BUILD_MYSQL)