commit 5ef180842c65b775f503a0e6ae617a43da4f1afc Author: Georg Baum <b...@lyx.org> Date: Sat Jul 2 11:09:26 2016 +0200
Ensure that iconv and zlib are always found If the included thirdparty libs are requested, use them, even on unix. This is consistent with autotools (but the recommended way is of course to use the system libs). If the included thirdparty libs are not requested then try to find libiconv and zlib also on windows. This will lead to an error unless the libs are found via manually added include and link paths, but this is wanted since libiconv and zlib are not optional. --- CMakeLists.txt | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 667f76e..3c9ab63 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -706,15 +706,13 @@ if(LYX_NLS) endif() endif() -if(UNIX) - find_package(ICONV REQUIRED) - find_package(ZLIB REQUIRED) -else() - if(LYX_3RDPARTY_BUILD) +if(LYX_3RDPARTY_BUILD) add_subdirectory(3rdparty/libiconv) set(HAVE_ICONV_CONST 1) add_subdirectory(3rdparty/zlib) - endif() +else() + find_package(ICONV REQUIRED) + find_package(ZLIB REQUIRED) endif() if(LYX_EXTERNAL_BOOST)