replace jsoncpp with nlohmann_json

This commit is contained in:
Martin Brodbeck 2018-10-18 12:06:36 +02:00
parent 1aa56f24a3
commit 6b251a4a32
6 changed files with 54 additions and 52 deletions

View file

@ -2,13 +2,12 @@ set(Boost_USE_STATIC_LIBS ON)
find_package(Boost 1.62 COMPONENTS date_time REQUIRED)
find_package(SQLite3 REQUIRED)
if (MINGW)
find_package(XLNT REQUIRED STATIC)
find_package(JSONCPP REQUIRED)
else (MINGW)
find_package(PkgConfig REQUIRED)
pkg_check_modules(XLNT REQUIRED xlnt>=1.3)
pkg_check_modules(JSONCPP REQUIRED jsoncpp)
endif (MINGW)
set(CORE_SOURCES
@ -24,11 +23,12 @@ set(CORE_SOURCES
)
add_library(core STATIC ${CORE_SOURCES})
if (WIN32)
target_link_libraries(core printer Boost::boost Boost::date_time sqlite3 ${XLNT_LIBRARY} ${JSONCPP_LIBRARY})
target_link_libraries(core bcrypt)
target_link_libraries(core PRIVATE printer Boost::boost Boost::date_time sqlite3 nlohmann_json::nlohmann_json ${XLNT_LIBRARY})
target_link_libraries(core PRIVATE bcrypt)
else()
target_link_libraries(core printer Boost::boost Boost::date_time sqlite3 ${XLNT_LIBRARIES} ${JSONCPP_LIBRARIES})
target_link_libraries(core PRIVATE printer Boost::boost Boost::date_time sqlite3 nlohmann_json::nlohmann_json ${XLNT_LIBRARIES})
endif()
target_include_directories(core PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})