diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index bf5a46bc3..3a6477dfe 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -130,6 +130,9 @@ if(APPLE) endif() if(QT) + set(CMAKE_CXX_STANDARD 17) + set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_CXX_EXTENSIONS OFF) find_package(Qt5 COMPONENTS Core Widgets REQUIRED) endif() @@ -249,4 +252,4 @@ elseif(WIN32) add_subdirectory(win) else() add_subdirectory(unix) -endif() \ No newline at end of file +endif() diff --git a/src/qt/CMakeLists.txt b/src/qt/CMakeLists.txt index a9a80d042..0f119f8c5 100644 --- a/src/qt/CMakeLists.txt +++ b/src/qt/CMakeLists.txt @@ -4,6 +4,8 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) +find_package(Threads REQUIRED) + add_library(plat STATIC qt.c qt_main.cpp qt_platform.cpp qt_midi.cpp cpp11_thread.cpp) add_library(ui STATIC qt_ui.cpp @@ -78,10 +80,12 @@ target_link_libraries( plat PRIVATE Qt5::Widgets + Threads::Threads ) target_link_libraries( ui PRIVATE Qt5::Widgets + Threads::Threads )