Добавил C++-сервер
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
# Подготавливаем зависимости
|
||||
|
||||
include(FetchContent)
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/PrepareNlohmannJson.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/PreparePostgreSql.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/PreparePqxx.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/PrepareSeasocks.cmake)
|
||||
@@ -0,0 +1,11 @@
|
||||
# nlohmann/json
|
||||
|
||||
# Отключаем сборку тестов
|
||||
set(JSON_BuildTests OFF)
|
||||
|
||||
FetchContent_Declare(nlohmann-json
|
||||
GIT_REPOSITORY https://github.com/nlohmann/json.git
|
||||
GIT_TAG v3.11.2
|
||||
)
|
||||
|
||||
FetchContent_MakeAvailable(nlohmann-json)
|
||||
@@ -0,0 +1,10 @@
|
||||
# libpq
|
||||
|
||||
if (WIN32)
|
||||
# Для Windows необходимо скопировать библиотеки и заголовочные файлы PostgreSQL в папку third_party/postgresql
|
||||
# Дополнительно необходимо вручную положить libpq.dll, libcrypto-3-x64.dll, libssl-3-x64.dll рядом с исполняемым приложением
|
||||
set(PostgreSQL_INCLUDE_DIR ${THIRD_PARTY_DIR}/postgresql/include)
|
||||
set(PostgreSQL_TYPE_INCLUDE_DIR ${THIRD_PARTY_DIR}/postgresql/include/server)
|
||||
set(PostgreSQL_LIBRARY_DEBUG ${THIRD_PARTY_DIR}/postgresql/debug/lib/libpq.lib)
|
||||
set(PostgreSQL_LIBRARY_RELEASE ${THIRD_PARTY_DIR}/postgresql/lib/libpq.lib)
|
||||
endif()
|
||||
@@ -0,0 +1,11 @@
|
||||
# libpqxx
|
||||
|
||||
# Отключаем сборку тестов
|
||||
set(SKIP_BUILD_TEST ON)
|
||||
|
||||
FetchContent_Declare(libpqxx
|
||||
GIT_REPOSITORY https://github.com/jtv/libpqxx.git
|
||||
GIT_TAG 7.8.1
|
||||
)
|
||||
|
||||
FetchContent_MakeAvailable(libpqxx)
|
||||
@@ -0,0 +1,13 @@
|
||||
# seasocks
|
||||
|
||||
# Отключаем сборку тестов, демо-приложения и поддержку deflate
|
||||
set(UNITTESTS OFF)
|
||||
set(SEASOCKS_EXAMPLE_APP OFF)
|
||||
set(DEFLATE_SUPPORT OFF)
|
||||
|
||||
FetchContent_Declare(seasocks
|
||||
GIT_REPOSITORY https://github.com/mattgodbolt/seasocks.git
|
||||
GIT_TAG v1.4.5
|
||||
)
|
||||
|
||||
FetchContent_MakeAvailable(seasocks)
|
||||
Reference in New Issue
Block a user