diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2024-01-26 05:01:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-26 05:01:04 +0100 |
commit | f70821ce0d384494350b170ce646a0de3cfc1a1b (patch) | |
tree | 6ea5cff2f654bb980961aa7ea24d8b5cb76c34dc | |
parent | Merge pull request #12759 from liamwhite/mp-misc (diff) | |
parent | cmake: support simpleini cmake config and pc file (diff) | |
download | yuzu-f70821ce0d384494350b170ce646a0de3cfc1a1b.tar yuzu-f70821ce0d384494350b170ce646a0de3cfc1a1b.tar.gz yuzu-f70821ce0d384494350b170ce646a0de3cfc1a1b.tar.bz2 yuzu-f70821ce0d384494350b170ce646a0de3cfc1a1b.tar.lz yuzu-f70821ce0d384494350b170ce646a0de3cfc1a1b.tar.xz yuzu-f70821ce0d384494350b170ce646a0de3cfc1a1b.tar.zst yuzu-f70821ce0d384494350b170ce646a0de3cfc1a1b.zip |
-rw-r--r-- | CMakeModules/FindSimpleIni.cmake | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/CMakeModules/FindSimpleIni.cmake b/CMakeModules/FindSimpleIni.cmake index ce75d7690..13426b25b 100644 --- a/CMakeModules/FindSimpleIni.cmake +++ b/CMakeModules/FindSimpleIni.cmake @@ -2,18 +2,20 @@ # # SPDX-License-Identifier: GPL-3.0-or-later -find_path(SimpleIni_INCLUDE_DIR SimpleIni.h) - include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(SimpleIni - REQUIRED_VARS SimpleIni_INCLUDE_DIR -) -if (SimpleIni_FOUND AND NOT TARGET SimpleIni::SimpleIni) - add_library(SimpleIni::SimpleIni INTERFACE IMPORTED) - set_target_properties(SimpleIni::SimpleIni PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${SimpleIni_INCLUDE_DIR}" +find_package(SimpleIni QUIET CONFIG) +if (SimpleIni_CONSIDERED_CONFIGS) + find_package_handle_standard_args(SimpleIni CONFIG_MODE) +else() + find_package(PkgConfig QUIET) + pkg_search_module(SIMPLEINI QUIET IMPORTED_TARGET simpleini) + find_package_handle_standard_args(SimpleIni + REQUIRED_VARS SIMPLEINI_INCLUDEDIR + VERSION_VAR SIMPLEINI_VERSION ) endif() -mark_as_advanced(SimpleIni_INCLUDE_DIR) +if (SimpleIni_FOUND AND NOT TARGET SimpleIni::SimpleIni) + add_library(SimpleIni::SimpleIni ALIAS PkgConfig::SIMPLEINI) +endif() |