Author: kuemmel
Date: Thu May 12 23:11:35 2011
New Revision: 38729
URL: http://www.lyx.org/trac/changeset/38729

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

Modified:
   lyx-devel/trunk/CMakeLists.txt
   lyx-devel/trunk/src/CMakeLists.txt
   lyx-devel/trunk/src/client/CMakeLists.txt
   lyx-devel/trunk/src/support/CMakeLists.txt

Modified: lyx-devel/trunk/CMakeLists.txt
==============================================================================
--- lyx-devel/trunk/CMakeLists.txt      Thu May 12 20:49:35 2011        (r38728)
+++ lyx-devel/trunk/CMakeLists.txt      Thu May 12 23:11:35 2011        (r38729)
@@ -338,6 +338,8 @@
 
 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")

Modified: lyx-devel/trunk/src/CMakeLists.txt
==============================================================================
--- lyx-devel/trunk/src/CMakeLists.txt  Thu May 12 20:49:35 2011        (r38728)
+++ lyx-devel/trunk/src/CMakeLists.txt  Thu May 12 23:11:35 2011        (r38729)
@@ -76,6 +76,11 @@
        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 @@
        ${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)

Modified: lyx-devel/trunk/src/client/CMakeLists.txt
==============================================================================
--- lyx-devel/trunk/src/client/CMakeLists.txt   Thu May 12 20:49:35 2011        
(r38728)
+++ lyx-devel/trunk/src/client/CMakeLists.txt   Thu May 12 23:11:35 2011        
(r38729)
@@ -17,7 +17,8 @@
 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 @@
        ${LIBINTL_LIBRARIES}
        ${ICONV_LIBRARY}
        ${QT_QTCORE_LIBRARY}
-       ${QT_QTGUI_LIBRARY}
-       )
+       ${QT_QTGUI_LIBRARY})
 
 if(ASPELL_FOUND)
        target_link_libraries(${_lyxclient} ${ASPELL_LIBRARY})

Modified: lyx-devel/trunk/src/support/CMakeLists.txt
==============================================================================
--- lyx-devel/trunk/src/support/CMakeLists.txt  Thu May 12 20:49:35 2011        
(r38728)
+++ lyx-devel/trunk/src/support/CMakeLists.txt  Thu May 12 23:11:35 2011        
(r38729)
@@ -44,15 +44,17 @@
 
 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})

Reply via email to