externals: allow user to use system inih (#7073)

This commit is contained in:
Castor215 2023-10-17 03:31:56 +01:00 committed by GitHub
parent 4c59443ed2
commit 956b0868fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 74 additions and 4 deletions

View file

@ -126,7 +126,13 @@ set(BUILD_EXTERNAL OFF CACHE BOOL "")
add_subdirectory(glslang)
# inih
add_subdirectory(inih)
if(USE_SYSTEM_INIH)
find_package(inih REQUIRED COMPONENTS inih inir)
add_library(inih INTERFACE)
target_link_libraries(inih INTERFACE inih::inih inih::inir)
else()
add_subdirectory(inih)
endif()
# MicroProfile
add_library(microprofile INTERFACE)