From 8ffb386899e1a96ff3ff3bd6c59a113a13ddc9bf Mon Sep 17 00:00:00 2001 From: Kornel Benko Date: Sun, 18 Jul 2010 15:30:54 +0000 Subject: [PATCH] 1.) Removed the unconditional set of option LYX_MERGE_FILES if option LYX_INSTALL set. Does not compile on ubuntu. 2.) translations handling depends now from LYX_CPACK option if CPACK option not set translations will be done only if explicitly specified on the command line for make e.g. ==> make translations git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34976 a592a061-630c-0410-9148-cb99ea01b6c8 --- development/cmake/CMakeLists.txt | 9 +++++++-- development/cmake/po/CMakeLists.txt | 5 ++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/development/cmake/CMakeLists.txt b/development/cmake/CMakeLists.txt index b9686fa14a..d19aa59bb3 100644 --- a/development/cmake/CMakeLists.txt +++ b/development/cmake/CMakeLists.txt @@ -34,6 +34,7 @@ message(STATUS "Switch LYX_* variables by -DLYX_*=1 or 0:") message(STATUS) message(STATUS "Switch LYX_* variables by -DLYX_*=1 or 0:") message(STATUS) +LYX_OPTION(CPACK "Use the CPack management (Implies LYX_INSTALL option)" ON ALL) LYX_OPTION(NLS "Use nls" OFF ALL) LYX_OPTION(ASPELL "Require aspell" OFF ALL) LYX_OPTION(AIKSAURUS "Require Aiksaurus" OFF ALL) @@ -44,7 +45,7 @@ LYX_OPTION(RELEASE "Build release version" ON ALL) LYX_OPTION(PROFILE "Build profile version" OFF GCC) LYX_OPTION(USE_EXTERNAL_BOOST "Use external boost" OFF GCC) LYX_OPTION(USE_EXTERNAL_LIBINTL "Use external libintl" ON ALL) -LYX_OPTION(INSTALL "Build install projects/rules" OFF ALL) +LYX_OPTION(INSTALL "Build install projects/rules (implies a bunch of other options)" OFF ALL) LYX_OPTION(PACKAGE_SUFFIX "Use version suffix for packaging" ON ALL) LYX_OPTION(PROGRAM_SUFFIX "Append version suffix to binaries" ON GCC) LYX_OPTION(NO_CONSOLE "Suppress console on Windows" OFF MSVC) @@ -61,6 +62,9 @@ LYX_OPTION(SHARED_LIBRARIES "Build shared libraries" OFF ALL) message(STATUS) +if(LYX_CPACK) + set(LYX_INSTALL ON CACHE BOOL "INSTALL option" FORCE) +endif() if(LYX_INSTALL) set(LYX_NLS ON CACHE BOOL "Nls option" FORCE) set(LYX_ASPELL ON CACHE BOOL "Aspell option" FORCE) @@ -73,7 +77,6 @@ if(LYX_INSTALL) set(LYX_RELEASE ON CACHE BOOL "Release option" FORCE) set(LYX_DEBUG OFF CACHE BOOL "Debug option" FORCE) set(LYX_PROFILE OFF CACHE BOOL "Profile option" FORCE) - set(LYX_MERGE_FILES ON CACHE BOOL "Merge option" FORCE) endif() @@ -245,6 +248,8 @@ if(NOT MSVC) endif() +# We need in FindICONV.cmake this one +include(CheckFunctionExists) find_package(Qt4 REQUIRED) find_package(ICONV REQUIRED) find_package(ZLIB REQUIRED) diff --git a/development/cmake/po/CMakeLists.txt b/development/cmake/po/CMakeLists.txt index ed3128d37b..8fa1748ced 100755 --- a/development/cmake/po/CMakeLists.txt +++ b/development/cmake/po/CMakeLists.txt @@ -124,7 +124,10 @@ foreach(_pofile ${LYX_BASE_PO_FILES}) list(APPEND LYX_UPDATED_PO_FILES ${CMAKE_CURRENT_BINARY_DIR}/${_pofile}.copied) endforeach(_pofile) -GETTEXT_CREATE_TRANSLATIONS(${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.pot ${LYX_PO_FILES}) +if(LYX_CPACK) + set(_addALLOption ALL) +endif() +GETTEXT_CREATE_TRANSLATIONS(${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.pot ${__addALLOption} ${LYX_PO_FILES}) # ALL omitted here, to prevent from automatic creation ADD_CUSTOM_TARGET(update_po_files DEPENDS ${LYX_UPDATED_PO_FILES})