kima2/src/core/CMakeLists.txt

35 lines
813 B
CMake
Raw Normal View History

2018-07-18 15:04:18 +02:00
set(Boost_USE_STATIC_LIBS ON)
2018-07-06 10:54:44 +02:00
2024-01-23 10:06:01 +01:00
find_package(Boost 1.78 REQUIRED)
2018-07-06 13:30:23 +02:00
find_package(SQLite3 REQUIRED)
2018-10-18 12:06:36 +02:00
2019-10-11 10:01:21 +02:00
# Because csv-parser needs threads:
find_package(fmt)
2022-07-07 16:53:44 +02:00
2018-07-05 16:29:43 +02:00
set(CORE_SOURCES
2018-07-06 13:30:23 +02:00
database.cpp
2018-07-09 16:06:39 +02:00
entity.cpp
2019-10-04 15:15:43 +02:00
entityint.cpp
2019-10-04 14:05:19 +02:00
entityuuid.cpp
2018-07-09 16:06:39 +02:00
seller.cpp
article.cpp
2018-07-12 13:34:38 +02:00
sale.cpp
2018-07-13 13:04:19 +02:00
marketplace.cpp
2019-09-26 16:41:39 +02:00
csvreader.cpp
2018-08-02 13:06:51 +02:00
jsonutil.cpp
utils.cpp
2018-07-05 16:29:43 +02:00
)
2018-10-18 12:06:36 +02:00
2019-09-26 16:41:39 +02:00
add_library(core STATIC ${CORE_SOURCES})
2023-04-25 16:11:34 +02:00
#target_include_directories(core PRIVATE ${PROJECT_SOURCE_DIR}/subprojects/csv-parser/single_include)
2018-08-01 11:27:13 +02:00
if (WIN32)
2023-04-25 16:11:34 +02:00
target_link_libraries(core PRIVATE sqlite3 nlohmann_json::nlohmann_json fmt::fmt)
2018-10-18 12:06:36 +02:00
target_link_libraries(core PRIVATE bcrypt)
2018-08-10 10:45:50 +02:00
else()
2023-04-25 16:11:34 +02:00
target_link_libraries(core PRIVATE sqlite3 nlohmann_json::nlohmann_json fmt::fmt)
2018-08-01 11:27:13 +02:00
endif()
2018-08-10 10:45:50 +02:00
2019-10-10 08:09:16 +02:00
target_include_directories(core PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/..)