]> git.lyx.org Git - features.git/commitdiff
1.) Removed the unconditional set of option LYX_MERGE_FILES if option
authorKornel Benko <kornel@lyx.org>
Sun, 18 Jul 2010 15:30:54 +0000 (15:30 +0000)
committerKornel Benko <kornel@lyx.org>
Sun, 18 Jul 2010 15:30:54 +0000 (15:30 +0000)
  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
development/cmake/po/CMakeLists.txt

index b9686fa14a918a02cf8a5e0f901cc4a74070cf67..d19aa59bb3f18634ad0e84f8373d4c2b56257b14 100644 (file)
@@ -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)
index ed3128d37ba020d3ac3ce9d874208389ecbe67d4..8fa1748cedf52d3921c2f5fd37ab8cfaa9c3c0e7 100755 (executable)
@@ -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})