diff --git a/CMakeLists.txt b/CMakeLists.txt index 933a8f3845..7bd6c3d794 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -143,9 +143,10 @@ LYX_OPTION(ENABLE_KEYTESTS "Enable for keytests" OFF ALL) LYX_OPTION(ASAN "Use address sanitizer" OFF ALL) LYX_COMBO(USE_QT "Use Qt version as frontend" QT4 QT5) #LYX_OPTION(3RDPARTY_BUILD "Build 3rdparty libs" OFF ALL) -LYX_OPTION(EXTERNAL_Z "Build 3rdparty lib zlib" ON ALL) -LYX_OPTION(EXTERNAL_ICONV "Build 3rdparty lib iconvlib" ON ALL) -LYX_OPTION(EXTERNAL_HUNSPELL "Build 3rdparty lib hunspelllib" ON ALL) +LYX_OPTION(EXTERNAL_Z "Do not build 3rdparty lib zlib" ON ALL) +LYX_OPTION(EXTERNAL_ICONV "Do not build 3rdparty lib iconvlib" ON ALL) +LYX_OPTION(EXTERNAL_HUNSPELL "Do not build 3rdparty lib hunspelllib" ON ALL) +LYX_OPTION(EXTERNAL_MYTHES "Do not build 3rdparty lib mytheslib" OFF ALL) # GCC specific LYX_OPTION(PROFILE "Build profile version" OFF GCC) @@ -183,6 +184,12 @@ if(LYX_DMG) set(LYX_CPACK ON) endif() +if (LYX_EXTERNAL_MYTHES) + message(FATAL_ERROR "Compilation with system mythes not supported yet") +else() + set(MYTHES_DIR "${TOP_SRC_DIR}/3rdparty/mythes/1.2.5") +endif() + if(LYX_CPACK) set(LYX_INSTALL ON) endif() @@ -284,7 +291,7 @@ if(UNIX OR MINGW) # see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53631 set(LYX_USE_STD_REGEX 0) else() - set(LYX_USE_STD_REGEX 1) + set(LYX_USE_STD_REGEX 0) endif() endif() set(LYX_GCC11_MODE "${CXX11_FLAG}") diff --git a/development/cmake/config.h.cmake b/development/cmake/config.h.cmake index dbd2c83bc7..f0a504a81a 100644 --- a/development/cmake/config.h.cmake +++ b/development/cmake/config.h.cmake @@ -96,7 +96,7 @@ ${Include_used_spellchecker} #endif // config.h guard - +#define MYTHES_H_LOCATION <${MYTHES_DIR}/mythes.hxx> // Unguarded cleanup of global namespace: diff --git a/src/support/CMakeLists.txt b/src/support/CMakeLists.txt index d93fbe42b1..1cb6c4aef3 100644 --- a/src/support/CMakeLists.txt +++ b/src/support/CMakeLists.txt @@ -18,8 +18,8 @@ endif() file(GLOB support_headers ${TOP_SRC_DIR}/src/support/${LYX_HPP_FILES}) -file(GLOB support_mythes_sources ${TOP_SRC_DIR}/src/support/mythes/*.cxx) -file(GLOB support_mythes_headers ${TOP_SRC_DIR}/src/support/mythes/*.hxx) +file(GLOB support_mythes_sources ${MYTHES_DIR}/*.cxx) +file(GLOB support_mythes_headers ${MYTHES_DIR}/*.hxx) file(GLOB support_linkback_sources ${TOP_SRC_DIR}/src/support/linkback/*.m*) file(GLOB support_linkback_headers ${TOP_SRC_DIR}/src/support/linkback/*.h) @@ -58,7 +58,7 @@ lyx_automoc(${support_sources}) include_directories( ${TOP_SRC_DIR}/src/support ${TOP_BINARY_DIR}/src/support - ${TOP_SRC_DIR}/src/support/mythes + ${MYTHES_DIR} ${QT_INCLUDES} ${ICONV_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR})