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.
48 lines
1.2 KiB
48 lines
1.2 KiB
cmake_minimum_required(VERSION 3.20) |
|
project(AutoStoreLib) |
|
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_path(DINGO_INCLUDE_DIRS "dingo/allocator.h") |
|
|
|
add_library(${TARGET_NAME} STATIC |
|
src/AutoStore.cpp |
|
src/DiContainer.cpp |
|
src/infrastructure/repositories/FileUserRepository.cpp |
|
src/infrastructure/repositories/FileItemRepository.cpp |
|
src/infrastructure/http/HttpServer.cpp |
|
src/infrastructure/http/HttpOrderService.cpp |
|
src/infrastructure/helpers/Jsend.cpp |
|
src/infrastructure/helpers/JsonItem.cpp |
|
src/webapi/controllers/StoreController.cpp |
|
src/application/commands/AddItem.cpp |
|
) |
|
|
|
target_include_directories(${TARGET_NAME} |
|
PUBLIC |
|
${CMAKE_CURRENT_SOURCE_DIR}/include/autostore |
|
PRIVATE |
|
${CMAKE_CURRENT_SOURCE_DIR}/src |
|
${DINGO_INCLUDE_DIRS} |
|
) |
|
|
|
target_sources(${TARGET_NAME} |
|
PUBLIC |
|
FILE_SET HEADERS |
|
BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include |
|
FILES |
|
include/autostore/AutoStore.h |
|
) |
|
|
|
|
|
|
|
target_link_libraries(${TARGET_NAME} |
|
PUBLIC |
|
httplib::httplib |
|
nlohmann_json::nlohmann_json |
|
) |