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)
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()
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)
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)
# 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)
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()
${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)