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
if(LYX_NLS)
FIND_PROGRAM(LYX_PYTHON_EXECUTABLE python2 python HINTS ${GNUWIN32_DIR}/python)
- if(${LYX_PYTHON_EXECUTABLE} MATCHES "-NOTFOUND")
- message(FATAL_ERROR "Python 2.6 needed!")
- endif()
- find_package(LyXGettext REQUIRED)
- 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()
+ find_package(LyXGettext)
+ if(LYX_PYTHON_EXECUTABLE AND GETTEXT_FOUND)
+ add_subdirectory(po "${TOP_BINARY_DIR}/po")
else()
- add_subdirectory(intl "${TOP_BINARY_DIR}/intl")
+ # Install only supplied .gmo-files
+ file(GLOB _gmofiles RELATIVE "${TOP_SRC_DIR}/po" "${TOP_SRC_DIR}/po/*.gmo")
+ message(STATUS "Installing provided .gmo-files only")
+ foreach( _gmo ${_gmofiles})
+ string(REGEX REPLACE "\\.gmo$" "" _lang ${_gmo})
+ install(FILES "${TOP_SRC_DIR}/po/${_gmo}" DESTINATION ${LYX_DATA_SUBDIR}${LYX_LOCALEDIR}/${_lang}/LC_MESSAGES RENAME ${PACKAGE}.mo)
+ endforeach()
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)
MESSAGE(STATUS "---- Using XCode compiler CMAKE_XCODE_ATTRIBUTE_GCC_VERSION=${CMAKE_XCODE_ATTRIBUTE_GCC_VERSION}")
ENDIF(CMAKE_GENERATOR MATCHES Xcode)
+if (WIN32 AND Qt5Core_FOUND)
+ set(Z_PREFIX 1)
+endif()
# compiler tests, config.h generation
if(MSVC AND NOT LYX_CONFIGURE_CHECKS)
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}")