2020-06-24 04:03:23 +08:00
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
2021-11-06 04:01:35 +08:00
|
|
|
@@ -120,9 +120,9 @@ if (WIN32)
|
2021-04-13 02:12:20 +08:00
|
|
|
PRIVATE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/third_party/mman-win32>)
|
|
|
|
endif (WIN32)
|
2020-06-24 04:03:23 +08:00
|
|
|
|
|
|
|
-add_subdirectory(trantor)
|
|
|
|
+find_package(Trantor CONFIG REQUIRED)
|
|
|
|
|
|
|
|
-target_link_libraries(${PROJECT_NAME} PUBLIC trantor)
|
|
|
|
+target_link_libraries(${PROJECT_NAME} PUBLIC Trantor::Trantor)
|
|
|
|
|
2021-11-06 04:01:35 +08:00
|
|
|
if(${CMAKE_SYSTEM_NAME} STREQUAL "Haiku")
|
|
|
|
target_link_libraries(${PROJECT_NAME} PRIVATE network)
|
|
|
|
@@ -316,11 +316,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)
|
2021-11-06 04:01:35 +08:00
|
|
|
set(DROGON_SOURCES
|
|
|
|
${DROGON_SOURCES}
|
2021-04-13 02:12:20 +08:00
|
|
|
orm_lib/src/postgresql_impl/PostgreSQLResultImpl.cc)
|
2021-11-06 04:01:35 +08:00
|
|
|
@@ -348,7 +348,7 @@ if (BUILD_POSTGRESQL)
|
|
|
|
${private_headers}
|
|
|
|
orm_lib/src/postgresql_impl/PgConnection.h)
|
2021-04-13 02:12:20 +08:00
|
|
|
endif (libpq_supports_batch)
|
|
|
|
- endif (pg_FOUND)
|
|
|
|
+ endif (PostgreSQL_FOUND)
|
|
|
|
endif (BUILD_POSTGRESQL)
|
|
|
|
|
|
|
|
if (BUILD_MYSQL)
|
2021-11-06 04:01:35 +08:00
|
|
|
diff --git a/drogon_ctl/CMakeLists.txt b/drogon_ctl/CMakeLists.txt
|
2022-09-07 03:46:47 +08:00
|
|
|
index 9f2f1e7..09871f8 100755
|
2021-11-06 04:01:35 +08:00
|
|
|
--- a/drogon_ctl/CMakeLists.txt
|
|
|
|
+++ b/drogon_ctl/CMakeLists.txt
|
|
|
|
@@ -19,7 +19,7 @@ add_executable(_drogon_ctl
|
|
|
|
target_link_libraries(_drogon_ctl ${PROJECT_NAME})
|
2022-09-07 03:46:47 +08:00
|
|
|
if (WIN32 AND BUILD_SHARED_LIBS)
|
2021-11-06 04:01:35 +08:00
|
|
|
set(DROGON_FILE $<TARGET_FILE:drogon>)
|
|
|
|
- set(TRANTOR_FILE $<TARGET_FILE:trantor>)
|
|
|
|
+ set(TRANTOR_FILE $<TARGET_FILE:Trantor::Trantor>)
|
|
|
|
add_custom_command(TARGET _drogon_ctl POST_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND}
|
|
|
|
-DCTL_FILE=${DROGON_FILE}
|