Simplyfy nlohmann_json integration
This commit is contained in:
parent
8abb60c5db
commit
d6b3606bd6
6 changed files with 5 additions and 16 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -1,3 +0,0 @@
|
|||
[submodule "subprojects/nlohmann_json"]
|
||||
path = subprojects/nlohmann_json
|
||||
url = https://github.com/nlohmann/json.git
|
|
@ -7,7 +7,8 @@ set(CMAKE_MODULE_PATH "${CMAKE_HOME_DIRECTORY}/cmake")
|
|||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
#include(InstallRequiredSystemLibraries)
|
||||
# For SingleApplication and nlohmann_json
|
||||
include(FetchContent)
|
||||
|
||||
if(MSVC)
|
||||
add_compile_options(/W4 /WX)
|
||||
|
@ -29,7 +30,6 @@ if(KIMA2_USE_EXTERNAL_JSON)
|
|||
find_package(nlohmann_json REQUIRED)
|
||||
endif()
|
||||
|
||||
add_subdirectory(subprojects)
|
||||
add_subdirectory(src)
|
||||
|
||||
#if(NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
|
|
|
@ -3,9 +3,8 @@ set(Boost_USE_STATIC_LIBS ON)
|
|||
find_package(Boost 1.78 REQUIRED)
|
||||
find_package(SQLite3 REQUIRED)
|
||||
|
||||
# Because csv-parser needs threads:
|
||||
|
||||
find_package(fmt)
|
||||
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
|
||||
|
@ -23,7 +22,7 @@ set(CORE_SOURCES
|
|||
|
||||
|
||||
add_library(core STATIC ${CORE_SOURCES})
|
||||
#target_include_directories(core PRIVATE ${PROJECT_SOURCE_DIR}/subprojects/csv-parser/single_include)
|
||||
|
||||
if (WIN32)
|
||||
target_link_libraries(core PRIVATE sqlite3 nlohmann_json::nlohmann_json)
|
||||
target_link_libraries(core PRIVATE bcrypt)
|
||||
|
|
|
@ -11,7 +11,6 @@ set(CMAKE_AUTORCC ON)
|
|||
find_package(Qt6 COMPONENTS Widgets Network PrintSupport CONFIG REQUIRED)
|
||||
|
||||
# For SingleApplication:
|
||||
include(FetchContent)
|
||||
set(QT_DEFAULT_MAJOR_VERSION 6 CACHE STRING "Qt version to use, defaults to 6")
|
||||
set(QAPPLICATION_CLASS QApplication CACHE STRING "Inheritance class for SingleApplication")
|
||||
FetchContent_Declare(
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
if(NOT KIMA2_USE_EXTERNAL_JSON)
|
||||
set(JSON_BuildTests OFF CACHE INTERNAL "")
|
||||
add_subdirectory(nlohmann_json EXCLUDE_FROM_ALL)
|
||||
endif()
|
||||
#add_subdirectory(csv-parser)
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 9cca280a4d0ccf0c08f47a99aa71d1b0e52f8d03
|
Loading…
Add table
Reference in a new issue