cmake on mac: build with external libintl, find gettext, build merged

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38729 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Peter Kümmel 2011-05-12 21:11:35 +00:00
parent 4592d78fb3
commit 6a953f81ad
4 changed files with 18 additions and 6 deletions

View File

@ -338,6 +338,8 @@ endif()
if(LYX_EXTERNAL_LIBINTL)
find_package(Libintl REQUIRED)
# find getext when configuring
list(APPEND CMAKE_REQUIRED_LIBRARIES ${LIBINTL_LIBRARIES})
else()
if(LYX_NLS)
add_subdirectory(intl "${TOP_BINARY_DIR}/intl")

View File

@ -76,6 +76,11 @@ if (LYX_DEVEL_VERSION)
add_definitions(-DDEVEL_VERSION)
endif()
if(APPLE)
list(APPEND dont_merge ${TOP_SRC_DIR}/src/TexRow.cpp)
endif()
if (LYX_MERGE_FILES)
if(dont_merge)
list(REMOVE_ITEM lyx_sources ${dont_merge})
@ -127,8 +132,11 @@ target_link_libraries(${_lyx}
${vld_dll})
if(NOT LYX_EXTERNAL_LIBINTL OR WIN32)
# TODO remove, use LIBINTL_LIBRARIES
target_link_libraries(${_lyx} intl)
add_dependencies(${_lyx} intl_target)
else()
target_link_libraries(${_lyx} ${LIBINTL_LIBRARIES})
endif()
if(HUNSPELL_FOUND)

View File

@ -17,7 +17,8 @@ list(REMOVE_ITEM _lyxclient_sources "${TOP_SRC_DIR}/src/client/lyxclient.cpp")
include_directories(BEFORE
"${TOP_SRC_DIR}/src/client"
"${TOP_SRC_DIR}/boost"
${ZLIB_INCLUDE_DIR})
${ZLIB_INCLUDE_DIR}
${LIBINTL_INCLUDE_DIR})
if(LYX_MERGE_FILES)
set(_lyxclient_sources ${_lyxclient_sources} ${TOP_SRC_DIR}/src/TexRow.cpp)
@ -31,8 +32,7 @@ target_link_libraries(${_lyxclient}
${LIBINTL_LIBRARIES}
${ICONV_LIBRARY}
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
)
${QT_QTGUI_LIBRARY})
if(ASPELL_FOUND)
target_link_libraries(${_lyxclient} ${ASPELL_LIBRARY})

View File

@ -44,15 +44,17 @@ lyx_add_msvc_pch(support)
lyx_automoc(${support_sources})
include_directories(${TOP_SRC_DIR}/src/support
include_directories(
${TOP_SRC_DIR}/src/support
${TOP_BINARY_DIR}/src/support
${TOP_SRC_DIR}/src/support/mythes
${QT_INCLUDES}
${ICONV_INCLUDE_DIR}
${ZLIB_INCLUDE_DIR})
${ZLIB_INCLUDE_DIR}
${LIBINTL_INCLUDE_DIR})
if(NOT LYX_MERGE_FILES)
if(NOT LYX_MERGE_FILES OR APPLE)
set(support_sources ${support_sources} ${support_mythes_sources} ${support_linkback_sources})
set(support_headers ${support_headers} ${support_mythes_headers} ${support_linkback_headers})
add_library(support ${library_type} ${support_sources} ${support_headers} ${dont_merge})