Fix build with CMake on Mac OS X.

This commit is contained in:
Ghislain MARY 2015-04-03 14:19:52 +02:00
parent 1fd8e12180
commit 8b1d56ea9e

View file

@ -166,7 +166,12 @@ if(WIN32 AND "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsPhone")
set_target_properties(linphone PROPERTIES PREFIX "lib")
endif()
if(ICONV_FOUND)
target_include_directories(linphone PUBLIC ${ICONV_INCLUDE_DIRS})
if(APPLE)
# Prevent conflict between the system iconv.h header and the one from macports.
target_compile_options(linphone PRIVATE "-include" "${ICONV_INCLUDE_DIRS}/iconv.h")
else()
target_include_directories(linphone PRIVATE ${ICONV_INCLUDE_DIRS})
endif()
endif()
install(TARGETS linphone EXPORT LinphoneTargets