База для сборки образа(MySQL+Boost+cmake)

This commit is contained in:
2026-02-07 13:13:06 +03:00
parent bff937f9a7
commit 9bd4187e9b
3 changed files with 71 additions and 26 deletions
+29 -26
View File
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.29.8)
cmake_minimum_required(VERSION 3.28.3)
project(UpAndDown)
set(CMAKE_CXX_STANDARD 23)
@@ -10,10 +10,13 @@ endif ()
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_MULTITHREADED ON)
set(Boost_INCLUDE_DIR ${BOOST_ROOT})
set(Boost_LIBRARY_DIR "${BOOST_ROOT}/stage/lib")
find_package(Boost 1.88.0 REQUIRED COMPONENTS filesystem json log system filesystem url)
if (WIN32)
set(Boost_INCLUDE_DIR ${BOOST_ROOT})
set(Boost_LIBRARY_DIR "${BOOST_ROOT}/stage/lib")
endif ()
find_package(Boost 1.83.0 REQUIRED COMPONENTS filesystem json log system filesystem url)
if (Boost_FOUND)
include_directories(${Boost_INCLUDE_DIR})
endif ()
@@ -38,8 +41,8 @@ add_executable(App ./src/main.cpp
./src/db/mysql_connector.cpp
./src/db/mysql_connector.h
./src/DAO/IUserDAO.h
src/dtos/user_dto.h
src/dtos/medication_dto.h
./src/dtos/user_dto.h
./src/dtos/medication_dto.h
./src/DAO/MySQLUserDAO.cpp
./src/DAO/MySQLUserDAO.h
./src/endpoints_handlers/IExecutor.h
@@ -52,26 +55,26 @@ add_executable(App ./src/main.cpp
./src/endpoints_handlers/AuthLoginExecutor.h
./src/exceptions/session_exception.cpp
./src/exceptions/session_exception.h
src/log/Log.h
src/log/Log.cpp
tests/fixtures/AuthFixture.h
src/endpoints_handlers/GetUserMedicationsExecutor.h
src/DAO/IMedicationsDAO.h
src/DAO/MySQLMedicationsDAO.h
src/DAO/MySQLMedicationsDAO.cpp
src/dtos/user_treatment_scheme_dto.h
src/DAO/IUserTreatmentSchemesDAO.h
src/DAO/MySQLUserTreatmentSchemesDAO.cpp
src/DAO/MySQLUserTreatmentSchemesDAO.h
src/endpoints_handlers/GetUserTreatmentSchemeExecutor.h
src/endpoints_handlers/GetDiariesExecutor.h
src/endpoints_handlers/PostDiaryExecutor.h
src/endpoints_handlers/PutDiaryExecutor.h
src/endpoints_handlers/DeleteDiaryExecutor.h
src/DAO/IDiariesDAO.h
src/dtos/diary_dto.h
src/DAO/MySQLDiariesDao.cpp
src/DAO/MySQLDiariesDao.h
./src/log/Log.h
./src/log/Log.cpp
./tests/fixtures/AuthFixture.h
./src/endpoints_handlers/GetUserMedicationsExecutor.h
./src/DAO/IMedicationsDAO.h
./src/DAO/MySQLMedicationsDAO.h
./src/DAO/MySQLMedicationsDAO.cpp
./src/dtos/user_treatment_scheme_dto.h
./src/DAO/IUserTreatmentSchemesDAO.h
./src/DAO/MySQLUserTreatmentSchemesDAO.cpp
./src/DAO/MySQLUserTreatmentSchemesDAO.h
./src/endpoints_handlers/GetUserTreatmentSchemeExecutor.h
./src/endpoints_handlers/GetDiariesExecutor.h
./src/endpoints_handlers/PostDiaryExecutor.h
./src/endpoints_handlers/PutDiaryExecutor.h
./src/endpoints_handlers/DeleteDiaryExecutor.h
./src/DAO/IDiariesDAO.h
./src/dtos/diary_dto.h
./src/DAO/MySQLDiariesDao.cpp
./src/DAO/MySQLDiariesDao.h
)
target_link_libraries(App PRIVATE Boost::boost