"
LYX_CALLSTACK_PRINTING)
-get_filename_component(cxx_base "${CMAKE_CXX_COMPILER}" NAME_WE)
-if(cxx_base MATCHES "^clang(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\+\\+)?$")
- set(STD_STRING_USES_COW)
-else()
- if("${MINGW}")
- set(STD_STRING_USES_COW)
- else()
- set(STD_STRING_USES_COW 1)
- endif()
+# Check whether STL is libstdc++
+check_cxx_source_compiles(
+ "
+ #include <vector>
+ int main() {
+ #if ! defined(__GLIBCXX__) && ! defined(__GLIBCPP__)
+ this is not libstdc++
+ #endif
+ return(0);
+ }
+ "
+STD_STRING_USES_COW)
+
+check_cxx_source_compiles(
+ "
+ #ifndef __clang__
+ this is not clang
+ #endif
+ int main() {
+ return(0);
+ }
+ "
+lyx_cv_prog_clang)
+
+set(USE_LLVM_LIBCPP)
+if(NOT STD_STRING_USES_COW)
+ if(lyx_cv_prog_clang)
+ # use libc++ provided by llvm instead of GNU libstdc++
+ set(USE_LLVM_LIBCPP 1)
+ endif()
endif()
if(LYX_USE_QT MATCHES "QT5")
"
QT_USES_X11)
endif()
+ if (Qt5WinExtras_FOUND)
+ get_target_property(_winextra_prop Qt5::WinExtras IMPORTED_CONFIGURATIONS)
+ get_target_property(_winextra_link_libraries Qt5::WinExtras IMPORTED_LOCATION_${_winextra_prop})
+ set(CMAKE_REQUIRED_LIBRARIES ${_winextra_link_libraries})
+ set(CMAKE_REQUIRED_INCLUDES ${Qt5WinExtras_INCLUDE_DIRS})
+ set(CMAKE_REQUIRED_FLAGS ${Qt5WinExtras_EXECUTABLE_COMPILE_FLAGS})
+ endif()
elseif(LYX_USE_QT MATCHES "QT4")
set(CMAKE_REQUIRED_LIBRARIES ${QT_QTGUI_LIBRARY})
set(CMAKE_REQUIRED_INCLUDES ${QT_INCLUDES})