]> git.lyx.org Git - features.git/commitdiff
CMake: Remove libintl
authorVincent van Ravesteijn <vfr@lyx.org>
Sun, 12 May 2013 13:43:22 +0000 (15:43 +0200)
committerVincent van Ravesteijn <vfr@lyx.org>
Thu, 30 May 2013 20:10:01 +0000 (22:10 +0200)
12 files changed:
CMakeLists.txt
INSTALL.cmake
development/Makefile.am
development/cmake/TODO.txt
development/cmake/config.h.cmake
development/cmake/modules/FindLibintl.cmake [deleted file]
src/CMakeLists.txt
src/client/CMakeLists.txt
src/support/CMakeLists.txt
src/support/tests/CMakeLists.txt
src/tests/CMakeLists.txt
src/tex2lyx/CMakeLists.txt

index 8706e154c26269df53063b52c9c5db16b9ceb1a5..aa53dd07e48ff86538baf1cd7f760000ad4accb7 100644 (file)
@@ -92,7 +92,6 @@ LYX_OPTION(MERGE_FILES      "Merge source files into one compilation unit" OFF A
 LYX_OPTION(MERGE_REBUILD    "Rebuild generated files from merged files build" OFF ALL)
 LYX_OPTION(QUIET            "Don't generate verbose makefiles" OFF ALL)
 LYX_OPTION(INSTALL_PREFIX   "Install path for LyX" OFF ALL)
-LYX_OPTION(EXTERNAL_LIBINTL "Use external libintl" ON ALL)
 LYX_OPTION(BUNDLE           "Build bundle  (experimental) " OFF ALL)
 
 # GCC specific
@@ -518,26 +517,6 @@ if(LYX_NLS)
        add_subdirectory(po "${TOP_BINARY_DIR}/po")
 endif()
 
-if(LYX_NLS)
-       if(LYX_EXTERNAL_LIBINTL)
-               find_package(Libintl REQUIRED)
-               if(DEFINED LIBINTL_LIBRARIES)
-                       # 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)
-               endif()
-       else()
-               add_subdirectory(intl "${TOP_BINARY_DIR}/intl")
-       endif()
-endif()
-
-if(LYX_EXTERNAL_LIBINTL)
-       set(intl_link ${LIBINTL_LIBRARIES})
-else()
-       set(intl_link intl)
-endif()
-
 find_package(ICONV REQUIRED)
 find_package(ZLIB REQUIRED)
 
@@ -778,9 +757,6 @@ if(LYX_NLS)
        message(STATUS)
        message(STATUS "Building Native Language Support (LYX_NLS is set), used libraries:")
        message(STATUS)
-       message(STATUS "  * intl")
-       message(STATUS "     - header : ${LIBINTL_HEADER}")
-       message(STATUS "     - library: ${LIBINTL_LIBRARIES}")
        message(STATUS "  * iconv")
        message(STATUS "     - header : ${ICONV_HEADER}")
        message(STATUS "     - library: ${ICONV_LIBRARY}")
index 86430b6bb3e6af1a80e60130522b09f2e5d408f9..23b1aa02492d3371104bf00492d78baf59b858f3 100644 (file)
@@ -148,7 +148,6 @@ Build options
     -- LYX_MERGE_REBUILD        = OFF    : Rebuild generated files from merged files build
     -- LYX_QUIET                = OFF    : Don't generate verbose makefiles
     -- LYX_INSTALL_PREFIX       = OFF    : Install path for LyX
-    -- LYX_EXTERNAL_LIBINTL     = ON     : Use external libintl
 
     # GCC specific 
     -- LYX_PROFILE              = OFF    : Build profile version
index 63d67af02be88b59b857dee9814e857410d19d3b..5c54a96f0575899378c01b74db8b4ce280542e14 100644 (file)
@@ -105,7 +105,6 @@ cmake/modules/FindEnchant.cmake \
 cmake/modules/FindGNUWIN32.cmake \
 cmake/modules/FindHunspell.cmake \
 cmake/modules/FindICONV.cmake \
-cmake/modules/FindLibintl.cmake \
 cmake/modules/FindLyXGettext.cmake \
 cmake/modules/FindMagic.cmake \
 cmake/modules/FindMyThesLIB.cmake \
index c7a5466975672ce53bca748a306e8b2829ea7a69..45c1e0df84ff475fadf4778658e48e3ca2373cf9 100644 (file)
@@ -20,7 +20,6 @@ Bug fixing
      This is what I do: copy them from an autotools install into the cmake project.
         Package.cpp and config.h.cmake has to be fixed.
   * check that .tar.gz and .xz are identical to those from autotools
-  * DONE: Fix libintl, LYX_EXTERNAL_LIBINTL=OFF triggers compilation in intl even when LYX_NLS is OFF
   * *.po are too often generated by Visual Studio
   * show correct values in cmake-gui: write forced to cache
 
index 43618ac6f10e7384033d55d7ffae9f3e6eab5401..7bbe09eec17e8398547b9c0e5bd73c4c4308347b 100644 (file)
 #cmakedefine LYX_NLS 1
 #ifdef LYX_NLS
 #define ENABLE_NLS 1
-// These are needed when building included gettext (taken from autoconf macro)
-#cmakedefine LYX_EXTERNAL_LIBINTL 1
-#if !defined(LYX_EXTERNAL_LIBINTL)
-// this only makes sense when LYX_EXTERNAL_LIBINTL is OFF.
-#define __libc_lock_t                   gl_lock_t
-#define __libc_lock_define              gl_lock_define
-#define __libc_lock_define_initialized  gl_lock_define_initialized
-#define __libc_lock_init                gl_lock_init
-#define __libc_lock_lock                gl_lock_lock
-#define __libc_lock_unlock              gl_lock_unlock
-#define __libc_lock_recursive_t                   gl_recursive_lock_t
-#define __libc_lock_define_recursive              gl_recursive_lock_define
-#define __libc_lock_define_initialized_recursive  gl_recursive_lock_define_initialized
-#define __libc_lock_init_recursive                gl_recursive_lock_init
-#define __libc_lock_lock_recursive                gl_recursive_lock_lock
-#define __libc_lock_unlock_recursive              gl_recursive_lock_unlock
-#define glthread_in_use  libintl_thread_in_use
-#define glthread_lock_init     libintl_lock_init
-#define glthread_lock_lock     libintl_lock_lock
-#define glthread_lock_unlock   libintl_lock_unlock
-#define glthread_lock_destroy  libintl_lock_destroy
-#define glthread_rwlock_init     libintl_rwlock_init
-#define glthread_rwlock_rdlock   libintl_rwlock_rdlock
-#define glthread_rwlock_wrlock   libintl_rwlock_wrlock
-#define glthread_rwlock_unlock   libintl_rwlock_unlock
-#define glthread_rwlock_destroy  libintl_rwlock_destroy
-#define glthread_recursive_lock_init     libintl_recursive_lock_init
-#define glthread_recursive_lock_lock     libintl_recursive_lock_lock
-#define glthread_recursive_lock_unlock   libintl_recursive_lock_unlock
-#define glthread_recursive_lock_destroy  libintl_recursive_lock_destroy
-#define glthread_once                 libintl_once
-#define glthread_once_call            libintl_once_call
-#define glthread_once_singlethreaded  libintl_once_singlethreaded
-#define hash_string                    libintl_hash_string
-#endif /* LYX_EXTERNAL_LIBINTL */
 #endif
 
 
diff --git a/development/cmake/modules/FindLibintl.cmake b/development/cmake/modules/FindLibintl.cmake
deleted file mode 100644 (file)
index 745f8dd..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-# Try to find Libintl functionality
-# Once done this will define
-#
-#  LIBINTL_FOUND - system has Libintl
-#  LIBINTL_INCLUDE_DIR - Libintl include directory
-#  LIBINTL_LIBRARIES - Libraries needed to use Libintl
-#
-# TODO: This will enable translations only if Gettext functionality is
-# present in libc. Must have more robust system for release, where Gettext
-# functionality can also reside in standalone Gettext library, or the one
-# embedded within kdelibs (cf. gettext.m4 from Gettext source).
-
-# Copyright (c) 2006, Chusslove Illich, <caslav.ilic@gmx.net>
-# Copyright (c) 2007, Alexander Neundorf, <neundorf@kde.org>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-if(LIBINTL_INCLUDE_DIR AND LIBINTL_LIB_FOUND)
-  set(Libintl_FIND_QUIETLY TRUE)
-endif(LIBINTL_INCLUDE_DIR AND LIBINTL_LIB_FOUND)
-
-find_path(LIBINTL_INCLUDE_DIR libintl.h)
-
-find_file(LIBINTL_HEADER libintl.h
-       PATHS ${LIBINTL_INCLUDE_DIR} NO_DEFAULT_PATH)
-       
-set(LIBINTL_LIB_FOUND FALSE)
-
-if(LIBINTL_INCLUDE_DIR)
-  include(CheckFunctionExists)
-  check_function_exists(dgettext LIBINTL_LIBC_HAS_DGETTEXT)
-
-  if (LIBINTL_LIBC_HAS_DGETTEXT)
-    set(LIBINTL_LIBRARIES)
-    set(LIBINTL_LIB_FOUND TRUE)
-  else (LIBINTL_LIBC_HAS_DGETTEXT)
-    find_library(LIBINTL_LIBRARIES NAMES intl libintl )
-    if(LIBINTL_LIBRARIES)
-      set(LIBINTL_LIB_FOUND TRUE)
-    endif(LIBINTL_LIBRARIES)
-  endif (LIBINTL_LIBC_HAS_DGETTEXT)
-
-endif(LIBINTL_INCLUDE_DIR)
-
-#include(FindPackageHandleStandardArgs)
-#find_package_handle_standard_args(Libintl  DEFAULT_MSG  LIBINTL_INCLUDE_DIR  LIBINTL_LIB_FOUND)
-
-mark_as_advanced(LIBINTL_INCLUDE_DIR  LIBINTL_LIBRARIES  LIBINTL_LIBC_HAS_DGETTEXT  LIBINTL_LIB_FOUND)
index a8d10e65314523f484d1b989380fbd803cba9b44..4ee7872d509434c2ebba912fc3e9cd7a293186a3 100644 (file)
@@ -134,7 +134,6 @@ target_link_libraries(${_lyx}
        frontend_qt4
        graphics
        support
-       ${intl_link}
        ${ICONV_LIBRARY}
        ${QT_QTMAIN_LIBRARY}
        ${vld_dll})
index 33024378093cfd8f85d283bd1c5767a2b29cadd0..10a972bf7cdcdbbc46b0047a7f351fff15e9a5ad 100644 (file)
@@ -17,8 +17,7 @@ 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}
-       ${LIBINTL_INCLUDE_DIR})
+       ${ZLIB_INCLUDE_DIR})
 
 if(LYX_MERGE_FILES)
        set(_lyxclient_sources ${_lyxclient_sources} ${TOP_SRC_DIR}/src/TexRow.cpp)
@@ -29,7 +28,6 @@ add_executable(${_lyxclient} ${_lyxclient_sources} ${_lyxclient_headers})
 target_link_libraries(${_lyxclient}
        support
        ${Lyx_Boost_Libraries}
-       ${intl_link}
        ${ICONV_LIBRARY}
        ${QT_QTCORE_LIBRARY}
        ${QT_QTGUI_LIBRARY})
index 93387ba0e0109bad65a0a83eed98b87c95c58d22..efda20541a01aa84004138cc7caac3d564930d7e 100644 (file)
@@ -53,8 +53,7 @@ include_directories(
        ${TOP_SRC_DIR}/src/support/mythes
        ${QT_INCLUDES}
        ${ICONV_INCLUDE_DIR}
-       ${ZLIB_INCLUDE_DIR}
-       ${LIBINTL_INCLUDE_DIR})
+       ${ZLIB_INCLUDE_DIR})
 
 
 if(NOT LYX_MERGE_FILES)
index 3e6198f6493efc7fdbd88fc16769657056b4194f..eac5aa79f23b1e254f431c966296a46ef1e51029 100644 (file)
@@ -13,7 +13,7 @@ macro(sources _program)
        endforeach()
        set(${_program}_SOURCES ${_tmplist})
        add_executable(${_program} ${_tmplist})
-       target_link_libraries(${_program} support ${intl_link}
+       target_link_libraries(${_program} support
                ${Lyx_Boost_Libraries} ${QT_QTGUI_LIBRARY} ${QT_QTCORE_LIBRARY}
                ${ZLIB_LIBRARY} ${ICONV_LIBRARY})
 endmacro()
@@ -24,8 +24,7 @@ include_directories(
        ${TOP_SRC_DIR}/src/support/tests
        ${QT_INCLUDES}
        ${ICONV_INCLUDE_DIR}
-       ${ZLIB_INCLUDE_DIR}
-       ${LIBINTL_INCLUDE_DIR})
+       ${ZLIB_INCLUDE_DIR})
 
 
 set(check_PROGRAMS check_convert check_filetools check_lstrings)
index c498b289f267dd47cc56af4780f807cb54e173c8..1e9401465485db1377107d57a93daf1b1c04a4fd 100644 (file)
@@ -23,9 +23,10 @@ else()
          message(STATUS "Allow multiple definitions for cxx-compiler ${CMAKE_CXX_COMPILER_ID} not handled")
        endif()
 
-target_link_libraries(check_layout support ${intl_link}
+target_link_libraries(check_layout support
   ${Lyx_Boost_Libraries} ${QT_QTGUI_LIBRARY} ${QT_QTCORE_LIBRARY}
   ${ZLIB_LIBRARY} ${ICONV_LIBRARY})
+
 add_dependencies(lyx_run_tests check_layout)
 set_target_properties(check_layout PROPERTIES FOLDER "tests/src")
 
index 751926e301651a57c9bf92602a7160bf93eca239..b1d7463b6eb4017fd5d53a7f93cecbd38e6dd530 100644 (file)
@@ -51,7 +51,6 @@ target_link_libraries(${_tex2lyx}
        ${Lyx_Boost_Libraries}
        ${QT_QTCORE_LIBRARY}
        ${QT_QTGUI_LIBRARY}
-       ${intl_link}
        ${ICONV_LIBRARY})
 
 add_dependencies(${_tex2lyx} lyx_version)