You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
1.9 KiB
61 lines
1.9 KiB
cmake_minimum_required(VERSION 3.20) |
|
project(AutoStoreLib LANGUAGES CXX VERSION 0.1.0) |
|
set(TARGET_NAME AutoStoreLib) |
|
|
|
set(CMAKE_CXX_STANDARD 17) |
|
set(CMAKE_CXX_STANDARD_REQUIRED ON) |
|
|
|
# Find dependencies |
|
find_package(httplib CONFIG REQUIRED) |
|
find_package(nlohmann_json CONFIG REQUIRED) |
|
find_package(jwt-cpp CONFIG REQUIRED) |
|
|
|
configure_file(src/Version.h.in ${CMAKE_BINARY_DIR}/autostore/Version.h) |
|
|
|
add_library(${TARGET_NAME} STATIC |
|
src/application/queries/GetItem.cpp |
|
src/application/queries/ListItems.cpp |
|
src/application/commands/AddItem.cpp |
|
src/application/commands/HandleExpiredItems.cpp |
|
src/application/commands/DeleteItem.cpp |
|
src/application/commands/LoginUser.cpp |
|
src/infrastructure/repositories/FileItemRepository.cpp |
|
src/infrastructure/http/HttpServer.cpp |
|
src/infrastructure/http/HttpJwtMiddleware.cpp |
|
src/infrastructure/http/HttpOrderService.cpp |
|
src/infrastructure/helpers/Jsend.cpp |
|
src/infrastructure/helpers/JsonItem.cpp |
|
src/infrastructure/auth/FileJwtAuthService.cpp |
|
src/infrastructure/services/TaskScheduler.cpp |
|
src/infrastructure/adapters/CvBlocker.cpp |
|
src/infrastructure/adapters/SystemThreadManager.cpp |
|
src/infrastructure/adapters/SystemTimeProvider.cpp |
|
src/webapi/controllers/BaseController.cpp |
|
src/webapi/controllers/StoreController.cpp |
|
src/webapi/controllers/AuthController.cpp |
|
src/AutoStore.cpp |
|
) |
|
|
|
target_include_directories(${TARGET_NAME} |
|
PUBLIC |
|
${CMAKE_CURRENT_SOURCE_DIR}/include/autostore |
|
PRIVATE |
|
${CMAKE_CURRENT_SOURCE_DIR}/src |
|
${CMAKE_BINARY_DIR} |
|
) |
|
|
|
target_sources(${TARGET_NAME} |
|
PUBLIC |
|
FILE_SET HEADERS |
|
BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include |
|
FILES |
|
include/autostore/AutoStore.h |
|
include/autostore/ILogger.h |
|
) |
|
|
|
target_link_libraries(${TARGET_NAME} |
|
PUBLIC |
|
httplib::httplib |
|
nlohmann_json::nlohmann_json |
|
jwt-cpp::jwt-cpp |
|
) |