summaryrefslogtreecommitdiffstats
path: root/externals/find-modules/Findnlohmann_json.cmake
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2022-08-21 19:42:42 +0200
committerGitHub <noreply@github.com>2022-08-21 19:42:42 +0200
commitb99596e3120bdf4eb9ab8c3e868a0fff55cd79d0 (patch)
tree3a6440d9e59c8dea7f71cfd87f17cf1d7d93c23a /externals/find-modules/Findnlohmann_json.cmake
parentMerge pull request #8676 from abouvier/no-check-sub (diff)
parentbuild(externals): rename Findopus to FindOpus (diff)
downloadyuzu-b99596e3120bdf4eb9ab8c3e868a0fff55cd79d0.tar
yuzu-b99596e3120bdf4eb9ab8c3e868a0fff55cd79d0.tar.gz
yuzu-b99596e3120bdf4eb9ab8c3e868a0fff55cd79d0.tar.bz2
yuzu-b99596e3120bdf4eb9ab8c3e868a0fff55cd79d0.tar.lz
yuzu-b99596e3120bdf4eb9ab8c3e868a0fff55cd79d0.tar.xz
yuzu-b99596e3120bdf4eb9ab8c3e868a0fff55cd79d0.tar.zst
yuzu-b99596e3120bdf4eb9ab8c3e868a0fff55cd79d0.zip
Diffstat (limited to '')
-rw-r--r--externals/find-modules/Findnlohmann_json.cmake51
1 files changed, 0 insertions, 51 deletions
diff --git a/externals/find-modules/Findnlohmann_json.cmake b/externals/find-modules/Findnlohmann_json.cmake
deleted file mode 100644
index 8a3958cf1..000000000
--- a/externals/find-modules/Findnlohmann_json.cmake
+++ /dev/null
@@ -1,51 +0,0 @@
-# SPDX-FileCopyrightText: 2020 yuzu Emulator Project
-# SPDX-License-Identifier: GPL-2.0-or-later
-
-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
-)
-
-if(nlohmann_json_INCLUDE_DIR)
- file(STRINGS "${nlohmann_json_INCLUDE_DIR}/json.hpp" _nlohmann_json_version_lines
- REGEX "#define[ \t]+NLOHMANN_JSON_VERSION_(MAJOR|MINOR|PATCH)")
- string(REGEX REPLACE ".*NLOHMANN_JSON_VERSION_MAJOR +\([0-9]+\).*" "\\1" _nlohmann_json_version_major "${_nlohmann_json_version_lines}")
- string(REGEX REPLACE ".*NLOHMANN_JSON_VERSION_MINOR +\([0-9]+\).*" "\\1" _nlohmann_json_version_minor "${_nlohmann_json_version_lines}")
- string(REGEX REPLACE ".*NLOHMANN_JSON_VERSION_PATCH +\([0-9]+\).*" "\\1" _nlohmann_json_version_patch "${_nlohmann_json_version_lines}")
- set(nlohmann_json_VERSION "${_nlohmann_json_version_major}.${_nlohmann_json_version_minor}.${_nlohmann_json_version_patch}")
- unset(_nlohmann_json_version_major)
- unset(_nlohmann_json_version_minor)
- unset(_nlohmann_json_version_patch)
- unset(_nlohmann_json_version_lines)
-endif()
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(nlohmann_json
- FOUND_VAR nlohmann_json_FOUND
- REQUIRED_VARS
- nlohmann_json_INCLUDE_DIR
- nlohmann_json_VERSION
- 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
-)