Merge remote-tracking branch 'origin/master' into httpc
This commit is contained in:
Vendored
+17
-3
@@ -175,7 +175,16 @@ endif()
|
||||
|
||||
# JSON
|
||||
add_library(json-headers INTERFACE)
|
||||
target_include_directories(json-headers INTERFACE ./json)
|
||||
if (USE_SYSTEM_JSON)
|
||||
find_package(nlohmann_json REQUIRED)
|
||||
target_link_libraries(json-headers INTERFACE nlohmann_json::nlohmann_json)
|
||||
get_target_property(NLOHMANN_PREFIX nlohmann_json::nlohmann_json INTERFACE_INCLUDE_DIRECTORIES)
|
||||
# The nlohmann-json3 package expects "#include <nlohmann/json.hpp>"
|
||||
# Citra uses "#include <json.hpp>" so we have to add this manually
|
||||
target_include_directories(json-headers SYSTEM INTERFACE "${NLOHMANN_PREFIX}/nlohmann")
|
||||
else()
|
||||
target_include_directories(json-headers SYSTEM INTERFACE ./json)
|
||||
endif()
|
||||
|
||||
# OpenSSL
|
||||
if (USE_SYSTEM_OPENSSL)
|
||||
@@ -200,8 +209,13 @@ endif()
|
||||
# httplib
|
||||
add_library(httplib INTERFACE)
|
||||
if(USE_SYSTEM_CPP_HTTPLIB)
|
||||
find_package(CppHttp REQUIRED)
|
||||
target_link_libraries(httplib SYSTEM INTERFACE cpp-httplib::cpp-httplib)
|
||||
find_package(CppHttp 0.14.1)
|
||||
if(CppHttp_FOUND)
|
||||
target_link_libraries(httplib SYSTEM INTERFACE cpp-httplib::cpp-httplib)
|
||||
else()
|
||||
message(STATUS "Cpp-httplib not found or not suitable version! Falling back to bundled...")
|
||||
target_include_directories(httplib SYSTEM INTERFACE ./httplib)
|
||||
endif()
|
||||
else()
|
||||
target_include_directories(httplib SYSTEM INTERFACE ./httplib)
|
||||
endif()
|
||||
|
||||
+2
-8
@@ -14,14 +14,8 @@ if(NOT CppHttp_FOUND)
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
)
|
||||
|
||||
if(CPP-HTTP_INCLUDE_DIR AND CPP-HTTP_LIBRARIES)
|
||||
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()
|
||||
|
||||
find_package_handle_standard_args(CppHttp REQUIRED_VARS CPP-HTTP_INCLUDE_DIR CPP-HTTP_LIBRARIES VERSION_VAR HTTP_TMP_VERSION)
|
||||
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user