33 lines
774 B
CMake
33 lines
774 B
CMake
set(Boost_USE_STATIC_LIBS ON)
|
|
|
|
find_package(Boost 1.78 REQUIRED)
|
|
find_package(SQLite3 REQUIRED)
|
|
|
|
FetchContent_Declare(json URL https://github.com/nlohmann/json/releases/download/v3.11.3/json.tar.xz)
|
|
FetchContent_MakeAvailable(json)
|
|
|
|
set(CORE_SOURCES
|
|
database.cpp
|
|
entity.cpp
|
|
entityint.cpp
|
|
entityuuid.cpp
|
|
seller.cpp
|
|
article.cpp
|
|
sale.cpp
|
|
marketplace.cpp
|
|
csvreader.cpp
|
|
jsonutil.cpp
|
|
utils.cpp
|
|
)
|
|
|
|
|
|
add_library(core STATIC ${CORE_SOURCES})
|
|
|
|
if (WIN32)
|
|
target_link_libraries(core PRIVATE sqlite3 nlohmann_json::nlohmann_json)
|
|
target_link_libraries(core PRIVATE bcrypt)
|
|
else()
|
|
target_link_libraries(core PRIVATE sqlite3 nlohmann_json::nlohmann_json)
|
|
endif()
|
|
|
|
target_include_directories(core PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/..)
|