cmake_minimum_required(VERSION 3.20) project(AutoStoreLib) set(TARGET_NAME AutoStoreLib) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) add_library(${TARGET_NAME} STATIC src/AutoStore.cpp src/infrastructure/repositories/FileUserRepository.cpp src/infrastructure/repositories/FileItemRepository.cpp ) target_include_directories(${TARGET_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include/autostore ) target_sources(${TARGET_NAME} PUBLIC FILE_SET HEADERS BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include FILES include/autostore/AutoStore.h include/autostore/domain/entities/User.h include/autostore/domain/entities/Item.h include/autostore/application/interfaces/IUserRepository.h include/autostore/application/interfaces/IItemRepository.h include/autostore/application/interfaces/IAuthService.h ) # Find dependencies find_package(httplib CONFIG REQUIRED) find_package(nlohmann_json CONFIG REQUIRED) target_link_libraries(${TARGET_NAME} PUBLIC httplib::httplib nlohmann_json::nlohmann_json )