diff options
| author | TellowKrinkle <tellowkrinkle@gmail.com> | 2023-03-30 13:12:48 -0500 |
|---|---|---|
| committer | TellowKrinkle <tellowkrinkle@gmail.com> | 2023-04-08 21:43:03 -0500 |
| commit | b9595a2230a0d6bb073c301e365d517cd8d9c8fa (patch) | |
| tree | cae661162001e4e348388b0f54d0283dc6774b16 /Externals | |
| parent | eb6bf08170691bfee4577adcbbb9068ddd09b9ab (diff) | |
CMake: Use find_package and imported targets for Iconv
Fixes us forgetting to add its include directories, which could result in linking to a dylib from MacPorts while using the system's header, and failing to link because they use different function names
Diffstat (limited to 'Externals')
| -rw-r--r-- | Externals/libiconv-1.14/CMakeLists.txt | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/Externals/libiconv-1.14/CMakeLists.txt b/Externals/libiconv-1.14/CMakeLists.txt index 571a6f791c..9f04f671ff 100644 --- a/Externals/libiconv-1.14/CMakeLists.txt +++ b/Externals/libiconv-1.14/CMakeLists.txt @@ -1,10 +1,13 @@ -include_directories(include) -include_directories(libcharset/include) - -set(SRCS lib/iconv.c - lib/relocatable.c - libcharset/lib/localcharset.c +add_library(iconv STATIC + lib/iconv.c + lib/relocatable.c + libcharset/lib/localcharset.c +) +target_include_directories(iconv + PUBLIC + include + PRIVATE + libcharset/include ) - -add_library(iconv STATIC ${SRCS}) dolphin_disable_warnings_msvc(iconv) +add_library(Iconv::Iconv ALIAS iconv) |
