File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ if (NOT (CMAKE_CXX_COMPILER_ID STREQUAL "GNU"))
1616 set (LIBSCRATCHCPP_COMPUTED_GOTO OFF CACHE BOOL "" FORCE)
1717endif ()
1818
19- find_package (nlohmann_json 3.9.1 REQUIRED)
2019find_package (utf8cpp REQUIRED)
2120
2221add_library (scratchcpp SHARED)
@@ -66,6 +65,8 @@ target_sources(scratchcpp
6665 include /scratchcpp/imonitorhandler.h
6766)
6867
68+ include (FetchContent)
69+
6970add_library (zip SHARED
7071 ${ZIP_SRC} /zip.c
7172 ${ZIP_SRC} /zip.h
@@ -75,13 +76,15 @@ include_directories(thirdparty/zip/src)
7576
7677include_directories (thirdparty/spimpl)
7778
79+ FetchContent_Declare(json URL https://github.com/nlohmann/json/releases/download/v3.11.3/json.tar.xz)
80+ FetchContent_MakeAvailable(json)
81+
7882target_link_libraries (scratchcpp PRIVATE nlohmann_json::nlohmann_json)
7983target_link_libraries (scratchcpp PRIVATE utf8cpp)
8084target_link_libraries (scratchcpp PRIVATE zip)
8185target_link_libraries (scratchcpp PRIVATE scratchcpp-audio)
8286
8387if (LIBSCRATCHCPP_NETWORK_SUPPORT)
84- include (FetchContent)
8588 FetchContent_Declare(cpr GIT_REPOSITORY https://github.com/libcpr/cpr.git
8689 GIT_TAG 3b15fa82ea74739b574d705fea44959b58142eb8) # 1.10.5
8790 FetchContent_MakeAvailable(cpr)
You can’t perform that action at this time.
0 commit comments