[LyX/master] Cmake build: Set defaults for using 3rdparty sources according to build type
Kornel Benko
kornel at lyx.org
Sun Aug 9 08:18:17 UTC 2020
commit f78fac5a91e55029c228c02bc2d22d21eb835f38
Author: Kornel Benko <kornel at lyx.org>
Date: Sun Aug 9 10:42:02 2020 +0200
Cmake build: Set defaults for using 3rdparty sources according to build type
---
CMakeLists.txt | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1523397..62eff71 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -161,24 +161,28 @@ if(LYX_BUILD_TYPE STREQUAL "development")
set(DefaultLyxStdlibDebug ON)
set(DefaultLyxEnableAssertions ON)
set(DefaultLyxProfile OFF)
+ set(DefaultExternalLibs OFF)
elseif(LYX_BUILD_TYPE STREQUAL "prerelease")
set(DefaultLyxDebug OFF)
set(DefaultLyxRelease OFF)
set(DefaultLyxStdlibDebug OFF)
set(DefaultLyxEnableAssertions OFF)
set(DefaultLyxProfile OFF)
+ set(DefaultExternalLibs ON)
elseif(LYX_BUILD_TYPE STREQUAL "release")
set(DefaultLyxDebug OFF)
set(DefaultLyxRelease ON)
set(DefaultLyxStdlibDebug OFF)
set(DefaultLyxEnableAssertions OFF)
set(DefaultLyxProfile OFF)
+ set(DefaultExternalLibs ON)
elseif(LYX_BUILD_TYPE STREQUAL "gprof")
set(DefaultLyxDebug ON)
set(DefaultLyxRelease OFF)
set(DefaultLyxStdlibDebug OFF)
set(DefaultLyxEnableAssertions OFF)
set(DefaultLyxProfile ON)
+ set(DefaultExternalLibs OFF)
else()
message(FATAL_ERROR "Invalid build type (${LYX_BUILD_TYPE}) encountered")
endif()
@@ -220,15 +224,15 @@ LYX_COMBO(USE_QT "Use Qt version as frontend" AUTO QT4 QT5)
LYX_COMBO(USE_IPO "Interprocedural optimization" OFF AUTO ON)
#LYX_OPTION(3RDPARTY_BUILD "Build 3rdparty libs" OFF ALL)
LYX_OPTION(DISABLE_CALLSTACK_PRINTING "do not print a callstack when crashing" OFF ALL)
-LYX_OPTION(EXTERNAL_Z "OFF := Build 3rdparty lib zlib" ON ALL)
-LYX_OPTION(EXTERNAL_DTL "OFF := Build 3rdparty commands dt2dv and dv2dt" ON ALL)
-LYX_OPTION(EXTERNAL_ICONV "OFF := Build 3rdparty lib iconvlib" ON ALL)
-LYX_OPTION(EXTERNAL_HUNSPELL "OFF := Build 3rdparty lib hunspelllib" ON ALL)
+LYX_OPTION(EXTERNAL_Z "OFF := Build 3rdparty lib zlib" ${DefaultExternalLibs} ALL)
+LYX_OPTION(EXTERNAL_DTL "OFF := Build 3rdparty commands dt2dv and dv2dt" ${DefaultExternalLibs} ALL)
+LYX_OPTION(EXTERNAL_ICONV "OFF := Build 3rdparty lib iconvlib" ${DefaultExternalLibs} ALL)
+LYX_OPTION(EXTERNAL_HUNSPELL "OFF := Build 3rdparty lib hunspelllib" ${DefaultExternalLibs} ALL)
LYX_COMBO(EXTERNAL_MYTHES "OFF := Build 3rdparty lib mytheslib" AUTO OFF ON)
# GCC specific
LYX_OPTION(PROFILE "Build with options for gprof" ${DefaultLyxProfile} GCC)
-LYX_OPTION(EXTERNAL_BOOST "Use external boost" OFF GCC)
+LYX_OPTION(EXTERNAL_BOOST "Use external boost" ${DefaultExternalLibs} GCC)
LYX_OPTION(PROGRAM_SUFFIX "Append version suffix to binaries" ON GCC)
LYX_OPTION(DEBUG_GLIBC "Enable libstdc++ debug mode" OFF GCC)
LYX_OPTION(DEBUG_GLIBC_PEDANTIC "Enable libstdc++ pedantic debug mode" OFF GCC)
More information about the lyx-cvs
mailing list