Merge pull request #12175 from abouvier/unbundle-simpleini
cmake: prefer system simpleini library
This commit is contained in:
commit
c100d7e802
|
@ -290,6 +290,7 @@ find_package(lz4 REQUIRED)
|
|||
find_package(nlohmann_json 3.8 REQUIRED)
|
||||
find_package(Opus 1.3 MODULE)
|
||||
find_package(RenderDoc MODULE)
|
||||
find_package(SimpleIni MODULE)
|
||||
find_package(stb MODULE)
|
||||
find_package(VulkanMemoryAllocator CONFIG)
|
||||
find_package(ZLIB 1.2 REQUIRED)
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
# SPDX-FileCopyrightText: 2023 Alexandre Bouvier <contact@amb.tf>
|
||||
#
|
||||
# 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}"
|
||||
)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(SimpleIni_INCLUDE_DIR)
|
|
@ -292,4 +292,6 @@ if (YUZU_CRASH_DUMPS AND NOT TARGET libbreakpad_client)
|
|||
endif()
|
||||
|
||||
# SimpleIni
|
||||
add_subdirectory(simpleini)
|
||||
if (NOT TARGET SimpleIni::SimpleIni)
|
||||
add_subdirectory(simpleini)
|
||||
endif()
|
||||
|
|
|
@ -7,4 +7,4 @@ add_library(frontend_common STATIC
|
|||
)
|
||||
|
||||
create_target_directory_groups(frontend_common)
|
||||
target_link_libraries(frontend_common PUBLIC core SimpleIni PRIVATE common Boost::headers)
|
||||
target_link_libraries(frontend_common PUBLIC core SimpleIni::SimpleIni PRIVATE common Boost::headers)
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include <string>
|
||||
#include "common/settings.h"
|
||||
|
||||
#define SI_NO_CONVERSION
|
||||
#include <SimpleIni.h>
|
||||
#include <boost/algorithm/string/replace.hpp>
|
||||
|
||||
|
|
Loading…
Reference in New Issue