mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-26 16:52:46 +01:00
bc30a591ba
* Remove git submodules that will be loaded through conan * Move custom Find modules to their own folder * Use conan for downloading missing external dependencies * CI: Change the yuzu source folder user to the user that the containers run on * Attempt to remove dirty mingw build hack * Install conan on the msvc build * Only set release build type when using not using multi config generator * Re-add qt bundled to workaround an issue with conan qt not downloading prebuilt binaries * Add workaround for submodules that use legacy CMAKE variables * Re-add USE_BUNDLED_QT on the msvc build bot
35 lines
1,011 B
CMake
35 lines
1,011 B
CMake
|
|
find_package(PkgConfig QUIET)
|
|
pkg_check_modules(PC_nlohmann_json QUIET nlohmann_json)
|
|
|
|
find_path(nlohmann_json_INCLUDE_DIR
|
|
NAMES json.hpp
|
|
PATHS ${PC_nlohmann_json_INCLUDE_DIRS}
|
|
PATH_SUFFIXES nlohmann
|
|
)
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
find_package_handle_standard_args(nlohmann_json
|
|
FOUND_VAR nlohmann_json_FOUND
|
|
REQUIRED_VARS
|
|
nlohmann_json_INCLUDE_DIR
|
|
VERSION_VAR nlohmann_json_VERSION
|
|
)
|
|
|
|
if(nlohmann_json_FOUND)
|
|
set(nlohmann_json_INCLUDE_DIRS ${nlohmann_json_INCLUDE_DIR})
|
|
set(nlohmann_json_DEFINITIONS ${PC_nlohmann_json_CFLAGS_OTHER})
|
|
endif()
|
|
|
|
if(nlohmann_json_FOUND AND NOT TARGET nlohmann_json::nlohmann_json)
|
|
add_library(nlohmann_json::nlohmann_json UNKNOWN IMPORTED)
|
|
set_target_properties(nlohmann_json::nlohmann_json PROPERTIES
|
|
IMPORTED_LOCATION "${nlohmann_json_LIBRARY}"
|
|
INTERFACE_COMPILE_OPTIONS "${PC_nlohmann_json_CFLAGS_OTHER}"
|
|
INTERFACE_INCLUDE_DIRECTORIES "${nlohmann_json_INCLUDE_DIR}"
|
|
)
|
|
endif()
|
|
|
|
mark_as_advanced(
|
|
nlohmann_json_INCLUDE_DIR
|
|
)
|