]> git.lyx.org Git - lyx.git/blobdiff - development/cmake/ConfigureChecks.cmake
UserGuide.lyx: accept and distribute more recent changes (part 2/3)
[lyx.git] / development / cmake / ConfigureChecks.cmake
index 146330a56a0b3be4be402ea8aab6f09cdb13b491..f09ba8bd921c460d69d83f1d3d10f9664558009e 100644 (file)
@@ -184,6 +184,17 @@ check_cxx_source_compiles(
   "
 HAVE_DEF_MAKE_UNIQUE)
 
+check_cxx_source_compiles(
+  "
+  #include <mutex>
+  static std::once_flag flag;
+  int main() {
+    std::call_once(flag, [](){ return; });
+    return(0);
+  }
+  "
+LYX_USE_STD_CALL_ONCE)
+
 set(USE_LLVM_LIBCPP)
 set(STD_STRING_USES_COW)
 set(USE_GLIBCXX_CXX11_ABI)
@@ -205,9 +216,15 @@ if(LYX_USE_QT MATCHES "QT5")
   set(CMAKE_REQUIRED_INCLUDES ${Qt5Core_INCLUDE_DIRS})
   set(CMAKE_REQUIRED_FLAGS)
   #message(STATUS "Qt5Core_INCLUDE_DIRS = ${Qt5Core_INCLUDE_DIRS}")
+  check_include_file_cxx(QtGui/qtgui-config.h HAVE_QTGUI_CONFIG_H)
+  if (HAVE_QTGUI_CONFIG_H)
+    set(lyx_qt5_config "QtGui/qtgui-config.h")
+  else()
+    set(lyx_qt5_config "QtCore/qconfig.h")
+  endif()
   check_cxx_source_runs(
     "
-    #include <QtCore/qconfig.h>
+    #include <${lyx_qt5_config}>
     #include <string>
     using namespace std;
     string a(QT_QPA_DEFAULT_PLATFORM_NAME);