1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-26 03:52:01 +02:00

link with iconv only when iconv is found

This commit is contained in:
Michael Pavlyshko 2014-07-11 00:23:06 +03:00
parent 08ee65c3c8
commit 8581cfd5d8

View File

@ -58,7 +58,14 @@ if (WIN32)
add_definitions(-DBOOST_THREAD_USE_LIB)
add_definitions(-D_WIN32_WINNT=0x0501)
set(SYSTEM_LIBS ${SYSTEM_LIBS} ole32 oleaut32 ws2_32 mswsock)
include(CheckLibraryExists)
check_library_exists(iconv libiconv_open "" ICONV_LIB_FOUND)
check_library_exists(iconv iconv_open "" ICONV_FOUND)
if(ICONV_LIB_FOUND OR ICONV_FOUND)
set(SYSTEM_LIBS ${SYSTEM_LIBS} iconv)
endif()
set(CMAKE_SHARED_LIBRARY_PREFIX "") #delete lib prefix for dlls
endif()