mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-18 18:47:50 +08:00
b3d05b2f8c
* fix: patch to use find_program for drogon_ctl * update drogon port version
47 lines
1.5 KiB
Diff
47 lines
1.5 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 4406362..0595ab8 100755
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -360,11 +360,10 @@ endif (NOT WIN32)
|
|
|
|
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
|
|
@@ -394,7 +393,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)
|
|
|
|
index 9f2f1e7..76bd2ec 100755
|
|
--- a/drogon_ctl/CMakeLists.txt
|
|
+++ b/drogon_ctl/CMakeLists.txt
|
|
@@ -19,7 +19,11 @@ add_executable(_drogon_ctl
|
|
target_link_libraries(_drogon_ctl ${PROJECT_NAME})
|
|
if (WIN32 AND BUILD_SHARED_LIBS)
|
|
set(DROGON_FILE $<TARGET_FILE:drogon>)
|
|
- set(TRANTOR_FILE $<TARGET_FILE:trantor>)
|
|
+ if (USE_SUBMODULE)
|
|
+ set(TRANTOR_FILE $<TARGET_FILE:trantor>)
|
|
+ else()
|
|
+ set(TRANTOR_FILE $<TARGET_FILE:Trantor::Trantor>)
|
|
+ endif()
|
|
add_custom_command(TARGET _drogon_ctl POST_BUILD
|
|
COMMAND ${CMAKE_COMMAND}
|
|
-DCTL_FILE=${DROGON_FILE}
|