Skip to content

VERY experimental Nintendo Switch 2 emulator

C++

CMake: Use target properties to add inih include paths

Yuri Kunde Schlesner8ed1d57e630d
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b746554fe6..6376862caf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -254,9 +254,7 @@ get_git_head_revision(GIT_REF_SPEC GIT_REV)
git_describe(GIT_DESC --always --long --dirty)
git_branch_name(GIT_BRANCH)
-set(INI_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/externals/inih")
-include_directories(${INI_PREFIX})
-add_subdirectory(${INI_PREFIX})
+add_subdirectory(externals/inih)
add_subdirectory(externals)
diff --git a/externals/inih/CMakeLists.txt b/externals/inih/CMakeLists.txt
index c87f78bfc8..cff36a5816 100644
--- a/externals/inih/CMakeLists.txt
+++ b/externals/inih/CMakeLists.txt
@@ -9,3 +9,4 @@ set(HEADERS
create_directory_groups(${SRCS} ${HEADERS})
add_library(inih ${SRCS} ${HEADERS})
+target_include_directories(inih INTERFACE .)