Remove mingw-std-threads from 3rd party deps and use native libs/headers instead (#7283)
* Remove mingw-std-threads from 3rd party deps and use native libs/headers instead * switch MinGW to POSIX in CI
This commit is contained in:
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
@@ -183,6 +183,12 @@ jobs:
|
||||
CCACHE_NOCOMPRESS: 1
|
||||
MAKEFLAGS: -j2
|
||||
steps:
|
||||
- name: Enable POSIX MinGW
|
||||
run: |
|
||||
update-alternatives --set i686-w64-mingw32-gcc /usr/bin/i686-w64-mingw32-gcc-posix
|
||||
update-alternatives --set i686-w64-mingw32-g++ /usr/bin/i686-w64-mingw32-g++-posix
|
||||
update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix
|
||||
update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
|
||||
- name: Configure git
|
||||
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
- name: Check out
|
||||
|
||||
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -25,9 +25,6 @@
|
||||
[submodule "src/3rdparty/weakjack/weakjack"]
|
||||
path = src/3rdparty/weakjack/weakjack
|
||||
url = https://github.com/x42/weakjack.git
|
||||
[submodule "src/3rdparty/mingw-std-threads"]
|
||||
path = src/3rdparty/mingw-std-threads
|
||||
url = https://github.com/meganz/mingw-std-threads.git
|
||||
[submodule "doc/wiki"]
|
||||
path = doc/wiki
|
||||
url = https://github.com/lmms/lmms.wiki.git
|
||||
|
||||
@@ -25,11 +25,7 @@
|
||||
#ifndef LMMS_AUDIO_ENGINE_H
|
||||
#define LMMS_AUDIO_ENGINE_H
|
||||
|
||||
#ifdef __MINGW32__
|
||||
#include <mingw.mutex.h>
|
||||
#else
|
||||
#include <mutex>
|
||||
#endif
|
||||
|
||||
#include <QThread>
|
||||
#include <samplerate.h>
|
||||
|
||||
@@ -31,17 +31,10 @@
|
||||
#include <type_traits>
|
||||
#include <vector>
|
||||
|
||||
#ifdef __MINGW32__
|
||||
#include <mingw.condition_variable.h>
|
||||
#include <mingw.future.h>
|
||||
#include <mingw.mutex.h>
|
||||
#include <mingw.thread.h>
|
||||
#else
|
||||
#include <condition_variable>
|
||||
#include <future>
|
||||
#include <mutex>
|
||||
#include <thread>
|
||||
#endif
|
||||
|
||||
namespace lmms {
|
||||
//! A thread pool that can be used for asynchronous processing.
|
||||
|
||||
@@ -87,11 +87,7 @@
|
||||
#undef Unsorted
|
||||
#endif
|
||||
|
||||
#ifdef USE_MINGW_THREADS_REPLACEMENT
|
||||
# include <mingw.mutex.h>
|
||||
#else
|
||||
# include <mutex>
|
||||
#endif
|
||||
#include <mutex>
|
||||
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
|
||||
@@ -66,21 +66,6 @@ endif()
|
||||
|
||||
if(IS_MINGW)
|
||||
SET(CMAKE_REQUIRED_FLAGS "-std=c++17")
|
||||
|
||||
CHECK_CXX_SOURCE_COMPILES("
|
||||
#include <mutex>
|
||||
int main(int argc, const char* argv[]) {
|
||||
std::mutex m;
|
||||
return 0;
|
||||
}
|
||||
" HAS_STD_MUTEX)
|
||||
|
||||
if(NOT HAS_STD_MUTEX)
|
||||
target_include_directories(${EXE_NAME} SYSTEM PRIVATE
|
||||
"${LMMS_SOURCE_DIR}/src/3rdparty/mingw-std-threads")
|
||||
target_compile_definitions(${EXE_NAME} PRIVATE
|
||||
-DUSE_MINGW_THREADS_REPLACEMENT)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(LMMS_BUILD_WIN32)
|
||||
|
||||
@@ -111,12 +111,6 @@ set_target_properties(zynaddsubfx_nio PROPERTIES SYSTEM TRUE)
|
||||
set_target_properties(zynaddsubfx_gui PROPERTIES SYSTEM TRUE)
|
||||
set_target_properties(zynaddsubfx_synth PROPERTIES SYSTEM TRUE)
|
||||
|
||||
if(MINGW)
|
||||
target_link_libraries(zynaddsubfx_nio PUBLIC mingw_stdthreads)
|
||||
target_link_libraries(zynaddsubfx_gui PUBLIC mingw_stdthreads)
|
||||
target_link_libraries(zynaddsubfx_synth PUBLIC mingw_stdthreads)
|
||||
endif()
|
||||
|
||||
# Relative include paths don't work automatically for the GUI, because the
|
||||
# generated C++ files aren't in the source directory. Thus, add the expected
|
||||
# source directory as an additional include directory.
|
||||
|
||||
@@ -1,9 +1,3 @@
|
||||
#include <condition_variable>
|
||||
#include <mutex>
|
||||
#include <thread>
|
||||
|
||||
#if defined(__MINGW32__) && !defined(_GLIBCXX_HAS_GTHREADS)
|
||||
# include <mingw.condition_variable.h>
|
||||
# include <mingw.mutex.h>
|
||||
# include <mingw.thread.h>
|
||||
#endif
|
||||
|
||||
6
src/3rdparty/CMakeLists.txt
vendored
6
src/3rdparty/CMakeLists.txt
vendored
@@ -11,12 +11,6 @@ target_include_directories(jack_headers INTERFACE jack2/common)
|
||||
ADD_SUBDIRECTORY(hiir)
|
||||
ADD_SUBDIRECTORY(weakjack)
|
||||
|
||||
if(MINGW)
|
||||
option(MINGW_STDTHREADS_GENERATE_STDHEADERS "" ON)
|
||||
add_subdirectory(mingw-std-threads)
|
||||
set(LMMS_USE_MINGW_STD_THREADS ON PARENT_SCOPE)
|
||||
endif()
|
||||
|
||||
# The lockless ring buffer library is linked as part of the core
|
||||
add_library(ringbuffer OBJECT
|
||||
ringbuffer/src/lib/ringbuffer.cpp
|
||||
|
||||
1
src/3rdparty/mingw-std-threads
vendored
1
src/3rdparty/mingw-std-threads
vendored
Submodule src/3rdparty/mingw-std-threads deleted from 6c2061b7da
@@ -154,10 +154,6 @@ if(LMMS_HAVE_OGGVORBIS)
|
||||
list(APPEND EXTRA_LIBRARIES Vorbis::vorbisenc Vorbis::vorbisfile)
|
||||
endif()
|
||||
|
||||
if(LMMS_USE_MINGW_STD_THREADS)
|
||||
list(APPEND EXTRA_LIBRARIES mingw_stdthreads)
|
||||
endif()
|
||||
|
||||
SET(LMMS_REQUIRED_LIBS ${LMMS_REQUIRED_LIBS}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${QT_LIBRARIES}
|
||||
|
||||
@@ -28,11 +28,7 @@
|
||||
#include <chrono>
|
||||
#include <lmmsconfig.h>
|
||||
|
||||
#ifdef __MINGW32__
|
||||
#include <mingw.thread.h>
|
||||
#else
|
||||
#include <thread>
|
||||
#endif
|
||||
|
||||
namespace lmms {
|
||||
FileSearch::FileSearch(const QString& filter, const QStringList& paths, const QStringList& extensions,
|
||||
|
||||
Reference in New Issue
Block a user