diff --git a/CMakeLists.txt b/CMakeLists.txt index 8706e154c2..aa53dd07e4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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}") diff --git a/INSTALL.cmake b/INSTALL.cmake index 86430b6bb3..23b1aa0249 100644 --- a/INSTALL.cmake +++ b/INSTALL.cmake @@ -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 diff --git a/development/Makefile.am b/development/Makefile.am index 63d67af02b..5c54a96f05 100644 --- a/development/Makefile.am +++ b/development/Makefile.am @@ -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 \ diff --git a/development/cmake/TODO.txt b/development/cmake/TODO.txt index c7a5466975..45c1e0df84 100644 --- a/development/cmake/TODO.txt +++ b/development/cmake/TODO.txt @@ -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 diff --git a/development/cmake/config.h.cmake b/development/cmake/config.h.cmake index 43618ac6f1..7bbe09eec1 100644 --- a/development/cmake/config.h.cmake +++ b/development/cmake/config.h.cmake @@ -83,41 +83,6 @@ #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 index 745f8dd062..0000000000 --- a/development/cmake/modules/FindLibintl.cmake +++ /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, -# Copyright (c) 2007, Alexander Neundorf, -# -# 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) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a8d10e6531..4ee7872d50 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -134,7 +134,6 @@ target_link_libraries(${_lyx} frontend_qt4 graphics support - ${intl_link} ${ICONV_LIBRARY} ${QT_QTMAIN_LIBRARY} ${vld_dll}) diff --git a/src/client/CMakeLists.txt b/src/client/CMakeLists.txt index 3302437809..10a972bf7c 100644 --- a/src/client/CMakeLists.txt +++ b/src/client/CMakeLists.txt @@ -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}) diff --git a/src/support/CMakeLists.txt b/src/support/CMakeLists.txt index 93387ba0e0..efda20541a 100644 --- a/src/support/CMakeLists.txt +++ b/src/support/CMakeLists.txt @@ -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) diff --git a/src/support/tests/CMakeLists.txt b/src/support/tests/CMakeLists.txt index 3e6198f649..eac5aa79f2 100644 --- a/src/support/tests/CMakeLists.txt +++ b/src/support/tests/CMakeLists.txt @@ -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) diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index c498b289f2..1e94014654 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -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") diff --git a/src/tex2lyx/CMakeLists.txt b/src/tex2lyx/CMakeLists.txt index 751926e301..b1d7463b6e 100644 --- a/src/tex2lyx/CMakeLists.txt +++ b/src/tex2lyx/CMakeLists.txt @@ -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)