externals: require cpp-httplib >= 0.14.1 (#7043)
This commit is contained in:
parent
053b3618dc
commit
7931aac3b7
2 changed files with 9 additions and 10 deletions
7
externals/CMakeLists.txt
vendored
7
externals/CMakeLists.txt
vendored
|
@ -209,8 +209,13 @@ endif()
|
||||||
# httplib
|
# httplib
|
||||||
add_library(httplib INTERFACE)
|
add_library(httplib INTERFACE)
|
||||||
if(USE_SYSTEM_CPP_HTTPLIB)
|
if(USE_SYSTEM_CPP_HTTPLIB)
|
||||||
find_package(CppHttp REQUIRED)
|
find_package(CppHttp 0.14.1)
|
||||||
|
if(CppHttp_FOUND)
|
||||||
target_link_libraries(httplib INTERFACE cpp-httplib::cpp-httplib)
|
target_link_libraries(httplib INTERFACE cpp-httplib::cpp-httplib)
|
||||||
|
else()
|
||||||
|
message(STATUS "Cpp-httplib not found or not suitable version! Falling back to bundled...")
|
||||||
|
target_include_directories(httplib INTERFACE ./httplib)
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
target_include_directories(httplib INTERFACE ./httplib)
|
target_include_directories(httplib INTERFACE ./httplib)
|
||||||
endif()
|
endif()
|
||||||
|
|
8
externals/cmake-modules/FindCppHttp.cmake
vendored
8
externals/cmake-modules/FindCppHttp.cmake
vendored
|
@ -15,13 +15,7 @@ if(NOT CppHttp_FOUND)
|
||||||
/usr/local/lib
|
/usr/local/lib
|
||||||
)
|
)
|
||||||
|
|
||||||
if(CPP-HTTP_INCLUDE_DIR AND CPP-HTTP_LIBRARIES)
|
find_package_handle_standard_args(CppHttp REQUIRED_VARS CPP-HTTP_INCLUDE_DIR CPP-HTTP_LIBRARIES VERSION_VAR HTTP_TMP_VERSION)
|
||||||
set(CppHttp_FOUND TRUE CACHE INTERNAL "cpp-httplib found")
|
|
||||||
message(STATUS "Found cpp-httplib: ${CPP-HTTP_INCLUDE_DIR}, ${CPP-HTTP_LIBRARIES}")
|
|
||||||
else()
|
|
||||||
set(CppHttp_FOUND FALSE CACHE INTERNAL "cpp-httplib found")
|
|
||||||
message(STATUS "Cpp-httplib not found.")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue