Skip to content

Commit

Permalink
Bump mingw-std-threads submodule (LMMS#6817)
Browse files Browse the repository at this point in the history
* Bump submodule and generate std headers

* Commit submodule update

* Downgrade to earlier commit
Can be upgraded once a proper C++20 MinGW compiler
is available for the docker images.

* Downgrade to the correct commit

* Append mingw_stdthreads to EXTRA_LIBRARIES
Currently for this CMake version, it seems that there is no support to
link other targets to object libraries. I'll add it to EXTRA_LIBRARIES
instead.

* Add LMMS_ prefix to USE_MINGW_STD_THREADS

* Use built-in MINGW CMake variable

* Use lowercase rather than uppercase
  • Loading branch information
sakertooth authored Aug 22, 2023
1 parent 5cbf2c5 commit 2ca05d0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/3rdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ ADD_SUBDIRECTORY(hiir)
ADD_SUBDIRECTORY(rpmalloc)
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 compiled as part of the core
SET(RINGBUFFER_DIR "${CMAKE_SOURCE_DIR}/src/3rdparty/ringbuffer/")
SET(RINGBUFFER_DIR ${RINGBUFFER_DIR} PARENT_SCOPE)
Expand Down
4 changes: 4 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ if(LMMS_HAVE_MP3LAME)
list(APPEND EXTRA_LIBRARIES mp3lame::mp3lame)
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}
Expand Down

0 comments on commit 2ca05d0

Please sign in to comment.