Merge remote-tracking branch 'origin/master' into httpc
This commit is contained in:
commit
718ff2546f
@ -96,6 +96,7 @@ option(USE_SYSTEM_LIBUSB "Use the system libusb (instead of the bundled libusb)"
|
||||
option(USE_SYSTEM_CPP_JWT "Use the system cpp-jwt (instead of the bundled one)" OFF)
|
||||
option(USE_SYSTEM_SOUNDTOUCH "Use the system SoundTouch (instead of the bundled one)" OFF)
|
||||
option(USE_SYSTEM_CPP_HTTPLIB "Use the system cpp-httplib (instead of the bundled one)" OFF)
|
||||
option(USE_SYSTEM_JSON "Use the system JSON (nlohmann-json3) package (instead of the bundled one)" OFF)
|
||||
|
||||
if (CITRA_USE_PRECOMPILED_HEADERS)
|
||||
message(STATUS "Using Precompiled Headers.")
|
||||
|
18
externals/CMakeLists.txt
vendored
18
externals/CMakeLists.txt
vendored
@ -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)
|
||||
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()
|
||||
|
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
|
||||
)
|
||||
|
||||
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()
|
||||
|
||||
|
@ -828,13 +828,6 @@ private:
|
||||
|
||||
void Generate() {
|
||||
if (sanitize_mul) {
|
||||
#ifdef ANDROID
|
||||
// Use a cheaper sanitize_mul on Android, as mobile GPUs struggle here
|
||||
// This seems to be sufficient at least for Ocarina of Time and Attack on Titan accurate
|
||||
// multiplication bugs
|
||||
shader.AddLine(
|
||||
"#define sanitize_mul(lhs, rhs) mix(lhs * rhs, vec4(0.0), isnan(lhs * rhs))");
|
||||
#else
|
||||
shader.AddLine("vec4 sanitize_mul(vec4 lhs, vec4 rhs) {{");
|
||||
++shader.scope;
|
||||
shader.AddLine("vec4 product = lhs * rhs;");
|
||||
@ -842,7 +835,6 @@ private:
|
||||
"isnan(lhs)), isnan(product));");
|
||||
--shader.scope;
|
||||
shader.AddLine("}}\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
shader.AddLine("vec4 get_offset_register(int base_index, int offset) {{");
|
||||
|
Loading…
Reference in New Issue
Block a user