Before we set LyX 2.0 in stone by releasing it,
I clean up the cmake's build option naming:
- only positive naming (remplace NO_, DISBALE_ names)
- short names when it is clear what the option means (no USE_)
- no redundant option RELEASE=0 is a debug build
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37293
a592a061-630c-0410-9148-
cb99ea01b6c8
if (WIN32)
set(LYX_HUNSPELL ON CACHE BOOL "Hunspell option" FORCE)
endif()
if (WIN32)
set(LYX_HUNSPELL ON CACHE BOOL "Hunspell option" FORCE)
endif()
- set(LYX_NO_CONSOLE ON CACHE BOOL "No console option" FORCE)
+ set(LYX_CONSOLE OFF CACHE BOOL "No console option" FORCE)
set(LYX_PACKAGE_SUFFIX ON CACHE BOOL "Package suffix option" FORCE)
set(LYX_RELEASE ON CACHE BOOL "Release option" FORCE)
set(LYX_PACKAGE_SUFFIX ON CACHE BOOL "Package suffix option" FORCE)
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)
endif()
set(LYX_PROFILE OFF CACHE BOOL "Profile option" FORCE)
endif()
LYX_OPTION(ASPELL "Require aspell" OFF ALL)
LYX_OPTION(ENCHANT "Require Enchant" OFF ALL)
LYX_OPTION(HUNSPELL "Require Hunspell" OFF ALL)
LYX_OPTION(ASPELL "Require aspell" OFF ALL)
LYX_OPTION(ENCHANT "Require Enchant" OFF ALL)
LYX_OPTION(HUNSPELL "Require Hunspell" OFF ALL)
-LYX_OPTION(DEBUG "Build debug version" OFF ALL)
LYX_OPTION(DEVEL_VERSION "Build developer version" OFF ALL)
LYX_OPTION(DEVEL_VERSION "Build developer version" OFF ALL)
-LYX_OPTION(RELEASE "Build release version" ON ALL)
+LYX_OPTION(RELEASE "Build release version, build debug when disabled" ON ALL)
LYX_OPTION(PROFILE "Build profile version" OFF GCC)
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(EXTERNAL_BOOST "Use external boost" OFF GCC)
+LYX_OPTION(EXTERNAL_LIBINTL "Use external libintl" ON 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(INSTALL_PREFIX "Install path for LyX" 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(INSTALL_PREFIX "Install path for LyX" OFF ALL)
-LYX_OPTION(NO_CONSOLE "Suppress console on Windows" OFF MSVC)
+LYX_OPTION(CONSOLE "Show console on Windows" ON MSVC)
LYX_OPTION(VLD "Use VLD with MSVC" OFF MSVC)
LYX_OPTION(WALL "Enable all warnings" OFF MSVC)
LYX_OPTION(VLD "Use VLD with MSVC" OFF MSVC)
LYX_OPTION(WALL "Enable all warnings" OFF MSVC)
-LYX_OPTION(DISABLE_PCH "Disable precompiled headers" ON ALL)
+LYX_OPTION(PCH "Use precompiled headers" OFF ALL)
LYX_OPTION(MERGE_FILES "Merge source files into one compilation unit" OFF ALL)
LYX_OPTION(MERGE_REBUILD "Rebuild generated files from merged files build" OFF ALL)
LYX_OPTION(DEBUG_GLIBC "Enable libstdc++ debug mode" OFF GCC)
LYX_OPTION(MERGE_FILES "Merge source files into one compilation unit" OFF ALL)
LYX_OPTION(MERGE_REBUILD "Rebuild generated files from merged files build" OFF ALL)
LYX_OPTION(DEBUG_GLIBC "Enable libstdc++ debug mode" OFF GCC)
- set(CMAKE_BUILD_TYPE Release CACHE TYPE STRING FORCE)
-endif()
-
-if(LYX_DEBUG)
- set(CMAKE_BUILD_TYPE Debug CACHE TYPE STRING FORCE)
+ set(CMAKE_BUILD_TYPE Release CACHE STRING "Build release version" FORCE)
+else()
+ set(CMAKE_BUILD_TYPE Debug CACHE STRING "Build debug version" FORCE)
endif()
# When shared libs are supported enable this option
endif()
# When shared libs are supported enable this option
add_subdirectory(po)
endif()
add_subdirectory(po)
endif()
-if(LYX_USE_EXTERNAL_LIBINTL)
+if(LYX_EXTERNAL_LIBINTL)
find_package(Libintl REQUIRED)
add_definitions(-DHAVE_GETTEXT) #TODO move to config.h
else()
add_subdirectory(intl)
endif()
find_package(Libintl REQUIRED)
add_definitions(-DHAVE_GETTEXT) #TODO move to config.h
else()
add_subdirectory(intl)
endif()
-if(LYX_USE_EXTERNAL_BOOST)
message(STATUS "Searching for boost")
find_package(Boost COMPONENTS signals regex) #TODO could REQUIRED be used
if(Boost_FOUND)
message(STATUS "Searching for boost")
find_package(Boost COMPONENTS signals regex) #TODO could REQUIRED be used
if(Boost_FOUND)
set(WIN32_CONSOLE WIN32)
set(LYX_QTMAIN_LIBRARY ${QT_QTMAIN_LIBRARY})
endif()
set(WIN32_CONSOLE WIN32)
set(LYX_QTMAIN_LIBRARY ${QT_QTMAIN_LIBRARY})
endif()
# Not sure if it works for all non-msvc compilers
include(PCHSupport_26)
# Not sure if it works for all non-msvc compilers
include(PCHSupport_26)
configure_file(${CMAKE_SOURCE_DIR}/pcheaders.h ${CMAKE_BINARY_DIR}/pcheaders.h)
configure_file(${CMAKE_SOURCE_DIR}/config.cpp.cmake ${CMAKE_BINARY_DIR}/config_pch.cpp)
add_definitions(-DLYX_ENABLE_PCH)
configure_file(${CMAKE_SOURCE_DIR}/pcheaders.h ${CMAKE_BINARY_DIR}/pcheaders.h)
configure_file(${CMAKE_SOURCE_DIR}/config.cpp.cmake ${CMAKE_BINARY_DIR}/config_pch.cpp)
add_definitions(-DLYX_ENABLE_PCH)
endmacro()
endif()
else()
endmacro()
endif()
else()
- set(LYX_DISABLE_PCH TRUE CACHE TYPE STRING)
+ set(LYX_PCH OFF CACHE STRING "Disaböe pre-compiled headers")
macro(lyx_add_msvc_pch)
endmacro(lyx_add_msvc_pch)
macro(lyx_add_gcc_pch name_)
macro(lyx_add_msvc_pch)
endmacro(lyx_add_msvc_pch)
macro(lyx_add_gcc_pch name_)
if(ENCHANT_FOUND)
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libenchant1c2a (>= 1.6.0-0),${CPACK_DEBIAN_PACKAGE_DEPENDS}")
endif()
if(ENCHANT_FOUND)
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libenchant1c2a (>= 1.6.0-0),${CPACK_DEBIAN_PACKAGE_DEPENDS}")
endif()
-if(LYX_USE_EXTERNAL_BOOST)
if(Boost_FOUND)
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libboost-regex1.40.0 (>= 1.40.0-4),libboost-signals1.40.0 (>= 1.40.0-4),${CPACK_DEBIAN_PACKAGE_DEPENDS}")
endif()
if(Boost_FOUND)
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libboost-regex1.40.0 (>= 1.40.0-4),libboost-signals1.40.0 (>= 1.40.0-4),${CPACK_DEBIAN_PACKAGE_DEPENDS}")
endif()
if "%1%" == "devel" (
REM Build solution to develop LyX
if "%1%" == "devel" (
REM Build solution to develop LyX
- cmake %LYX_SOURCE%\development\cmake -G%USED_STUDIO% -DLYX_MERGE_FILES=0 -DLYX_NLS=1 -DLYX_DEBUG=1
+ cmake %LYX_SOURCE%\development\cmake -G%USED_STUDIO% -DLYX_MERGE_FILES=0 -DLYX_NLS=1 -DLYX_RELEAE=0
REM needed when running lyx from the debugger
set LYX_DIR_20x=%LYX_SOURCE%\lib
start lyx.sln /build Debug
REM needed when running lyx from the debugger
set LYX_DIR_20x=%LYX_SOURCE%\lib
start lyx.sln /build Debug