]> git.lyx.org Git - features.git/commitdiff
Keep options together
authorKornel Benko <kornel@lyx.org>
Tue, 6 Jul 2010 18:19:53 +0000 (18:19 +0000)
committerKornel Benko <kornel@lyx.org>
Tue, 6 Jul 2010 18:19:53 +0000 (18:19 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34788 a592a061-630c-0410-9148-cb99ea01b6c8

development/cmake/CMakeLists.txt

index 9610c5e68ad94987dd9ca7ac39f50613d2f06e78..33d355b9de01d8c6d6d6b02ab8896f0a34ccf823 100644 (file)
@@ -23,9 +23,14 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/modules")
 set(EXECUTABLE_OUTPUT_PATH  ${CMAKE_BINARY_DIR}/bin)
 set(LIBRARY_OUTPUT_PATH  ${CMAKE_BINARY_DIR}/lib)
 
-
+option(LYX_DEBUG_GLIBC "Enable libstdc++ debug mode" OFF)
+option(LYX_DEBUG_GLIBC_PEDANTIC "Enable libstdc++pedantic debug mode" OFF)
 option(LYX_INSTALL "Build install projects/rules" ON)
-
+option(LYX_USE_VERSION_SUFFIX "Using executables with versioned suffix" OFF)
+option(LYX_ASPELL "Use aspell library" OFF)
+option(LYX_NLS "Enable build with nls support" OFF)
+option(LYX_USE_EXTERNAL_BOOST "Use external boost" OFF)
+option(LYX_DISABLE_PCH "Disable precompiled headers" ON)
 
 if(UNIX OR MINGW)
     execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
@@ -92,12 +97,12 @@ foreach(_c_l ${_config_lines} )
   endif()
 endforeach(_c_l)
 
-if(UseVersionSuffix)
-  message(STATUS "-- Using versioned PACKAGE. Disable with -DUseVersionSuffix=0")
+if(LYX_USE_VERSION_SUFFIX)
+  message(STATUS "-- Using versioned PACKAGE. Disable with -DLYX_USE_VERSION_SUFFIX=OFF")
   set(PACKAGE ${PACKAGE_BASE}${LYX_INSTALL_SUFFIX})
   set(PROGRAM_SUFFIX "${LYX_INSTALL_SUFFIX}")
 else()
-  message(STATUS "-- PACKAGE not versioned, to enable use -DUseVersionSuffix=1")
+  message(STATUS "-- PACKAGE not versioned, to enable use -DLYX_USE_VERSION_SUFFIX=ON")
   set(PACKAGE ${PACKAGE_BASE})
   set(PROGRAM_SUFFIX "")
 endif()
@@ -215,13 +220,13 @@ add_definitions(-DQT_NO_STL -DQT_NO_KEYWORDS)
 
 find_package(ZLIB REQUIRED)
 
-if(all OR aspell)
-       set(aspell TRUE CACHE TYPE STRING)
+if(all OR LYX_ASPELL)
+       set(LYX_ASPELL TRUE CACHE TYPE STRING)
        find_package(ASPELL REQUIRED)
 else()
        find_package(ASPELL)
 endif()
-set(aspell)
+set(LYX_ASPELL)
 
 set(use_external_libintl TRUE)
 
@@ -263,30 +268,31 @@ else()
 endif()
 
 message(STATUS "")
-if(nls OR all)
-       set(nls TRUE CACHE TYPE STRING)
+if(LYX_NLS OR all)
+       set(LYX_NLS TRUE CACHE TYPE STRING)
        add_definitions(-DENABLE_NLS=1)
        message(STATUS "----- Building with ENABLE_NLS")
 else()
-       message(STATUS "----- No nls, to enable use -Dnls=1")
+       message(STATUS "----- No nls, to enable use -DLYX_NLS=1")
 endif()
-set(nls)
+set(LYX_NLS)
 if(ASPELL_FOUND)
        add_definitions(-DUSE_ASPELL=1)
        message(STATUS "----- Building with USE_ASPELL")
 else()
-       message(STATUS "----- No aspell, to get more information use -Daspell=1")
+       message(STATUS "----- No aspell, to get more information use -DLYX_ASPELL=ON")
 endif()
 set(all)
 
 if(WIN32)
-       if(noconsole)
-               set(noconsole TRUE CACHE TYPE STRING)
+        option(LYX_NO_CONSOLE "Compile LyX as a GUI" OFF)
+       if(LYX_NO_CONSOLE)
+               set(LYX_NO_CONSOLE TRUE CACHE TYPE STRING)
                set(WIN32_CONSOLE WIN32)
                set(LYX_QTMAIN_LIBRARY ${QT_QTMAIN_LIBRARY})
                message(STATUS "----- Console disabled")
        else()
-               message(STATUS "----- Console enabled, disable it with -Dnoconsole=1")
+               message(STATUS "----- Console enabled, disable it with -DLYX_NO_CONSOLE=ON")
        endif()
        if(MSVC)
                add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DNOMINMAX)
@@ -314,11 +320,6 @@ message(STATUS "")
 # PCHs not supported by cmake: http://www.cmake.org/Bug/view.php?id=1260
 # Not sure if it works for all non-msvc compilers
 include(PCHSupport_26)
-if (MSVC)
-       option(LYX_DISABLE_PCH "Disable precompiled headers" ON)
-else()
-       option(LYX_DISABLE_PCH "Disable precompiled headers" ON)
-endif()
 
 if(NOT LYX_DISABLE_PCH)
 
@@ -449,16 +450,13 @@ endif()
 
 FIND_PROGRAM(_PERL_EXECUTABLE perl)
 if(NOT ${_PERL_EXECUTABLE} MATCHES "-NOTFOUND")
-    if(nls OR all)
+    if(LYX_NLS OR all)
       find_package(LyXGettext REQUIRED)
       include_directories(${TOP_SRC_DIR}/po)
       add_subdirectory(po)
     endif()
 endif()
 
-option(LYX_DEBUG_GLIBC "Enable libstdc++ debug mode" OFF)
-option(LYX_DEBUG_GLIBC_PEDANTIC "Enable libstdc++pedantic debug mode" OFF)
-
 if(LYX_DEBUG_GLIBC)
   set(_GLIBCXX_DEBUG 1)
 endif()
@@ -485,7 +483,6 @@ include_directories(
   ${CMAKE_BINARY_DIR}
   ${TOP_SRC_DIR}/src)
 
-option(LYX_USE_EXTERNAL_BOOST "Use external boost" OFF)
 if(LYX_USE_EXTERNAL_BOOST)
   message(STATUS "Searching for boost")
   find_package(Boost COMPONENTS signals regex)