Пример (Drogon):
Код: Выделить всё
FetchContent_Declare(
drogon
URL https://github.com/drogonframework/drogon/archive/refs/tags/v1.9.8.tar.gz
)
FetchContent_MakeAvailable(drogon)
...
target_link_libraries(${PROJECT_NAME} drogon)
Код: Выделить всё
CMake Error at build/_deps/drogon-src/CMakeLists.txt:137 (add_subdirectory):
The source directory
C:/.../build/_deps/drogon-src/trantor
does not contain a CMakeLists.txt file.
...
CMake Error at C:/.../CMake/share/cmake-3.30/Modules/FindPackageHandleStandardArgs.cmake:233 (message):
Could NOT find Jsoncpp (missing: JSONCPP_INCLUDE_DIRS JSONCPP_LIBRARIES)
Call Stack (most recent call first):
C:/.../CMake/share/cmake-3.30/Modules/FindPackageHandleStandardArgs.cmake:603 (_FPHSA_FAILURE_MESSAGE)
build/_deps/drogon-src/cmake_modules/FindJsoncpp.cmake:36 (find_package_handle_standard_args)
build/_deps/drogon-src/CMakeLists.txt:189 (find_package)
Подробнее здесь: https://stackoverflow.com/questions/791 ... submodules
Мобильная версия