diff options
| author | Ryan Houdek <Sonicadvance1@gmail.com> | 2013-08-29 05:40:16 -0500 |
|---|---|---|
| committer | Ryan Houdek <Sonicadvance1@gmail.com> | 2013-08-29 05:40:16 -0500 |
| commit | cb8e7a1be5bb8aecf8a1a1e97b5f9124892c8a7b (patch) | |
| tree | 4431f04e3b2bb749a77d0aeaed78a010537c59d4 | |
| parent | 160d72a9aea5600057ccadd9fae7ff6bc49c6643 (diff) | |
Work around check_lib not finding iconv.
| -rw-r--r-- | CMakeLists.txt | 18 | ||||
| -rw-r--r-- | Source/Core/DolphinWX/CMakeLists.txt | 6 |
2 files changed, 17 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7a8ff18328..548c057640 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -328,8 +328,9 @@ add_definitions(-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE) # TODO: We should have options for dependencies included in the externals to # override autodetection of system libraries and force the usage of the # externals. +include(CheckLib) +include(CheckCXXSourceRuns) if(NOT ANDROID) - include(CheckLib) include(FindOpenGL) include_directories(${OPENGL_INCLUDE_DIR}) @@ -454,7 +455,6 @@ if(NOT ANDROID) check_libav() endif() - include(CheckCXXSourceRuns) set(CMAKE_REQUIRED_LIBRARIES portaudio) CHECK_CXX_SOURCE_RUNS( "#include <portaudio.h> @@ -649,10 +649,16 @@ else() endif() endif() -if (NOT ANDROID) - check_lib(ICONV ICONV iconv.h) -endif() -if (NOT ICONV_FOUND) +CHECK_CXX_SOURCE_RUNS( + "#include <iconv.h> + int main(int argc, char **argv) + { + iconv_t const conv_desc = iconv_open(""UTF-8"", fromcode); + if ((iconv_t)-1 == conv_desc) return 0; else return 1; + }" + ICONV) + +if (NOT ICONV) message("Using static iconv from Externals") include_directories(Externals/libiconv-1.14/include) add_subdirectory(Externals/libiconv-1.14) diff --git a/Source/Core/DolphinWX/CMakeLists.txt b/Source/Core/DolphinWX/CMakeLists.txt index d881af255a..e16f02fc1b 100644 --- a/Source/Core/DolphinWX/CMakeLists.txt +++ b/Source/Core/DolphinWX/CMakeLists.txt @@ -1,6 +1,5 @@ set(LIBS core ${LZO} - iconv discio bdisasm inputcommon @@ -9,6 +8,11 @@ set(LIBS core z sfml-network ${GTK2_LIBRARIES}) + +if(NOT ICONV) + set(LIBS ${LIBS} iconv) +endif() + if(NOT ANDROID) if(USE_X11) set(LIBS ${LIBS} ${X11_LIBRARIES} |
