cmake on mac: precompiled libintl comes from ports, then also use iconv from ports, this is necessary to fix linker errors and removes the cmake warning

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38731 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Peter Kümmel 2011-05-12 21:48:11 +00:00
parent e481d312f0
commit 9906953921
2 changed files with 13 additions and 2 deletions

View File

@ -306,7 +306,6 @@ endif()
find_package(Qt4 REQUIRED)
find_package(ICONV REQUIRED)
find_package(ZLIB REQUIRED)
include_directories(${TOP_BINARY_DIR} ${TOP_SRC_DIR}/src)
@ -340,6 +339,8 @@ if(LYX_EXTERNAL_LIBINTL)
find_package(Libintl REQUIRED)
# find getext when configuring
list(APPEND CMAKE_REQUIRED_LIBRARIES ${LIBINTL_LIBRARIES})
# on mac use iconv also form ports
get_filename_component(ICONV_RELATIVE_TO_LIBINTL ${LIBINTL_LIBRARIES} PATH)
else()
if(LYX_NLS)
add_subdirectory(intl "${TOP_BINARY_DIR}/intl")
@ -348,6 +349,8 @@ else()
endif()
endif()
find_package(ICONV REQUIRED)
if(LYX_EXTERNAL_BOOST)
message(STATUS "Searching for boost")
find_package(Boost COMPONENTS signals regex) #TODO could REQUIRED be used

View File

@ -38,8 +38,16 @@ find_path(ICONV_INCLUDE_DIR iconv.h
set(POTENTIAL_ICONV_LIBS iconv libiconv libiconv2)
find_library(ICONV_LIBRARY NAMES ${POTENTIAL_ICONV_LIBS}
PATHS /usr/lib /usr/local/lib)
PATHS
${ICONV_RELATIVE_TO_LIBINTL}
NO_DEFAULT_PATH)
find_library(ICONV_LIBRARY NAMES ${POTENTIAL_ICONV_LIBS}
PATHS
/usr/lib
/usr/local/lib)
if(WIN32)
set(ICONV_DLL_NAMES iconv.dll libiconv.dll libiconv2.dll)