X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=CMakeLists.txt;h=933a8f38455e8ce82adf86fdd64d41b609210446;hb=b14e9d52ef6c3bd305812cb48ef5c485fd47d9d8;hp=48688dced37a097cd8d5f6e31e62d09e64479551;hpb=2b6f822badd407cf3780ec647f67fccfd94e52a4;p=lyx.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 48688dced3..933a8f3845 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -461,7 +461,14 @@ else() set(SYSTEM_DATADIR "${CMAKE_INSTALL_PREFIX}") endif() -if(LYX_PACKAGE_SUFFIX) +# The define below allows lyx-executable to find its default configuration files +# see routines +# Package::messages_file() +# get_default_user_support_dir() +# relative_system_support_dir() +# in src/support/Package.cpp +# +if(LYX_PROGRAM_SUFFIX) set(PACKAGE ${PACKAGE_BASE}${LYX_INSTALL_SUFFIX}) else() set(PACKAGE ${PACKAGE_BASE}) @@ -572,7 +579,15 @@ if(NOT MSVC) if(NOT LYX_QUIET) set(CMAKE_VERBOSE_MAKEFILE ON) endif() - set(LYX_CXX_FLAGS "-Wall -Wunused-parameter ${LYX_GCC11_MODE}") + set(LYX_CXX_FLAGS "-Wall -Wunused-parameter ${LYX_GCC11_MODE}") + if(LYX_CXX_FLAGS MATCHES "\\+\\+(14|11|98)") + # Thanks to Brad King + # for the pointer to https://cmake.org/cmake/help/v3.6/variable/CMAKE_CXX_STANDARD.html + # This allows us to use QT5.7 with recent g++ (version >= 4.9) compilers + # and still use our own c++ extension tests + set(CMAKE_CXX_STANDARD ${CMAKE_MATCH_1}) + message(STATUS "CMAKE_CXX_STANDARD set to ${CMAKE_CXX_STANDARD}") + endif() if(LYX_STDLIB_DEBUG) set(LYX_CXX_FLAGS "${LYX_CXX_FLAGS} -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC") endif() @@ -636,8 +651,9 @@ elseif(LYX_USE_QT MATCHES "QT4") macro (qt_wrap_uifiles) qt4_wrap_ui(${ARGN}) endmacro() + set(LYX_QTMAIN_LIBRARY ${QT_QTSVG_LIBRARY}) if(WIN32) - set(LYX_QTMAIN_LIBRARY ${QT_QTMAIN_LIBRARIES}) + list(APPEND LYX_QTMAIN_LIBRARY ${QT_QTMAIN_LIBRARIES}) endif() else() message(FATAL_ERROR "Unhandled value for LYX_USE_QT (${LYX_USE_QT})")