fix source (???)
This commit is contained in:
51
externals/find-modules/FindCatch2.cmake
vendored
51
externals/find-modules/FindCatch2.cmake
vendored
@@ -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_Catch2 QUIET Catch2)
|
||||
|
||||
find_path(Catch2_INCLUDE_DIR
|
||||
NAMES catch.hpp
|
||||
PATHS ${PC_Catch2_INCLUDE_DIRS} ${CONAN_CATCH2_ROOT}
|
||||
PATH_SUFFIXES catch2
|
||||
)
|
||||
|
||||
if(Catch2_INCLUDE_DIR)
|
||||
file(STRINGS "${Catch2_INCLUDE_DIR}/catch.hpp" _Catch2_version_lines
|
||||
REGEX "#define[ \t]+CATCH_VERSION_(MAJOR|MINOR|PATCH)")
|
||||
string(REGEX REPLACE ".*CATCH_VERSION_MAJOR +\([0-9]+\).*" "\\1" _Catch2_version_major "${_Catch2_version_lines}")
|
||||
string(REGEX REPLACE ".*CATCH_VERSION_MINOR +\([0-9]+\).*" "\\1" _Catch2_version_minor "${_Catch2_version_lines}")
|
||||
string(REGEX REPLACE ".*CATCH_VERSION_PATCH +\([0-9]+\).*" "\\1" _Catch2_version_patch "${_Catch2_version_lines}")
|
||||
set(Catch2_VERSION "${_Catch2_version_major}.${_Catch2_version_minor}.${_Catch2_version_patch}")
|
||||
unset(_Catch2_version_major)
|
||||
unset(_Catch2_version_minor)
|
||||
unset(_Catch2_version_patch)
|
||||
unset(_Catch2_version_lines)
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Catch2
|
||||
FOUND_VAR Catch2_FOUND
|
||||
REQUIRED_VARS
|
||||
Catch2_INCLUDE_DIR
|
||||
Catch2_VERSION
|
||||
VERSION_VAR Catch2_VERSION
|
||||
)
|
||||
|
||||
if(Catch2_FOUND)
|
||||
set(Catch2_INCLUDE_DIRS ${Catch2_INCLUDE_DIR})
|
||||
set(Catch2_DEFINITIONS ${PC_Catch2_CFLAGS_OTHER})
|
||||
endif()
|
||||
|
||||
if(Catch2_FOUND AND NOT TARGET Catch2::Catch2)
|
||||
add_library(Catch2::Catch2 UNKNOWN IMPORTED)
|
||||
set_target_properties(Catch2::Catch2 PROPERTIES
|
||||
IMPORTED_LOCATION "${Catch2_LIBRARY}"
|
||||
INTERFACE_COMPILE_OPTIONS "${PC_Catch2_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Catch2_INCLUDE_DIR}"
|
||||
)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(
|
||||
Catch2_INCLUDE_DIR
|
||||
)
|
71
externals/find-modules/Findfmt.cmake
vendored
71
externals/find-modules/Findfmt.cmake
vendored
@@ -1,71 +0,0 @@
|
||||
# SPDX-FileCopyrightText: 2020 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(PC_fmt QUIET fmt)
|
||||
|
||||
find_path(fmt_INCLUDE_DIR
|
||||
NAMES format.h
|
||||
PATHS ${PC_fmt_INCLUDE_DIRS} ${CONAN_INCLUDE_DIRS_fmt}
|
||||
PATH_SUFFIXES fmt
|
||||
)
|
||||
|
||||
find_library(fmt_LIBRARY
|
||||
NAMES fmt
|
||||
PATHS ${PC_fmt_LIBRARY_DIRS} ${CONAN_LIB_DIRS_fmt}
|
||||
)
|
||||
|
||||
if(fmt_INCLUDE_DIR)
|
||||
set(_fmt_version_file "${fmt_INCLUDE_DIR}/core.h")
|
||||
if(NOT EXISTS "${_fmt_version_file}")
|
||||
set(_fmt_version_file "${fmt_INCLUDE_DIR}/format.h")
|
||||
endif()
|
||||
if(EXISTS "${_fmt_version_file}")
|
||||
# parse "#define FMT_VERSION 60200" to 6.2.0
|
||||
file(STRINGS "${_fmt_version_file}" fmt_VERSION_LINE
|
||||
REGEX "^#define[ \t]+FMT_VERSION[ \t]+[0-9]+$")
|
||||
string(REGEX REPLACE "^#define[ \t]+FMT_VERSION[ \t]+([0-9]+)$"
|
||||
"\\1" fmt_VERSION "${fmt_VERSION_LINE}")
|
||||
foreach(ver "fmt_VERSION_PATCH" "fmt_VERSION_MINOR" "fmt_VERSION_MAJOR")
|
||||
math(EXPR ${ver} "${fmt_VERSION} % 100")
|
||||
math(EXPR fmt_VERSION "(${fmt_VERSION} - ${${ver}}) / 100")
|
||||
endforeach()
|
||||
set(fmt_VERSION
|
||||
"${fmt_VERSION_MAJOR}.${fmt_VERSION_MINOR}.${fmt_VERSION_PATCH}")
|
||||
endif()
|
||||
unset(_fmt_version_file)
|
||||
unset(fmt_VERSION_LINE)
|
||||
unset(fmt_VERSION_MAJOR)
|
||||
unset(fmt_VERSION_MINOR)
|
||||
unset(fmt_VERSION_PATCH)
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(fmt
|
||||
FOUND_VAR fmt_FOUND
|
||||
REQUIRED_VARS
|
||||
fmt_LIBRARY
|
||||
fmt_INCLUDE_DIR
|
||||
fmt_VERSION
|
||||
VERSION_VAR fmt_VERSION
|
||||
)
|
||||
|
||||
if(fmt_FOUND)
|
||||
set(fmt_LIBRARIES ${fmt_LIBRARY})
|
||||
set(fmt_INCLUDE_DIRS ${fmt_INCLUDE_DIR})
|
||||
set(fmt_DEFINITIONS ${PC_fmt_CFLAGS_OTHER})
|
||||
endif()
|
||||
|
||||
if(fmt_FOUND AND NOT TARGET fmt::fmt)
|
||||
add_library(fmt::fmt UNKNOWN IMPORTED)
|
||||
set_target_properties(fmt::fmt PROPERTIES
|
||||
IMPORTED_LOCATION "${fmt_LIBRARY}"
|
||||
INTERFACE_COMPILE_OPTIONS "${PC_fmt_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${fmt_INCLUDE_DIR}"
|
||||
)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(
|
||||
fmt_INCLUDE_DIR
|
||||
fmt_LIBRARY
|
||||
)
|
51
externals/find-modules/Findnlohmann_json.cmake
vendored
51
externals/find-modules/Findnlohmann_json.cmake
vendored
@@ -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
|
||||
)
|
44
externals/find-modules/Findopus.cmake
vendored
44
externals/find-modules/Findopus.cmake
vendored
@@ -1,44 +0,0 @@
|
||||
# SPDX-FileCopyrightText: 2020 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(PC_opus QUIET opus)
|
||||
|
||||
find_path(opus_INCLUDE_DIR
|
||||
NAMES opus.h
|
||||
PATHS ${PC_opus_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES opus
|
||||
)
|
||||
find_library(opus_LIBRARY
|
||||
NAMES opus
|
||||
PATHS ${PC_opus_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(opus
|
||||
FOUND_VAR opus_FOUND
|
||||
REQUIRED_VARS
|
||||
opus_LIBRARY
|
||||
opus_INCLUDE_DIR
|
||||
VERSION_VAR opus_VERSION
|
||||
)
|
||||
|
||||
if(opus_FOUND)
|
||||
set(Opus_LIBRARIES ${opus_LIBRARY})
|
||||
set(Opus_INCLUDE_DIRS ${opus_INCLUDE_DIR})
|
||||
set(Opus_DEFINITIONS ${PC_opus_CFLAGS_OTHER})
|
||||
endif()
|
||||
|
||||
if(opus_FOUND AND NOT TARGET Opus::Opus)
|
||||
add_library(Opus::Opus UNKNOWN IMPORTED GLOBAL)
|
||||
set_target_properties(Opus::Opus PROPERTIES
|
||||
IMPORTED_LOCATION "${opus_LIBRARY}"
|
||||
INTERFACE_COMPILE_OPTIONS "${PC_opus_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${opus_INCLUDE_DIR}"
|
||||
)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(
|
||||
opus_INCLUDE_DIR
|
||||
opus_LIBRARY
|
||||
)
|
Reference in New Issue
Block a user