Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v4.1.x - Add PThreads option for Emscripten #792

Conversation

Blaquewithaq
Copy link
Contributor

This PR adds back the USE_PTHREADS option for Emscripten builds only.

This flag is required in Emscripten builds to access certain features in the browser environment.

@Blaquewithaq Blaquewithaq changed the title Add pthreads option for emscripten v4.1.x - Add PThreads option for Emscripten Mar 6, 2024
CMakeLists.txt Outdated
@@ -60,6 +60,7 @@ file(TOUCH "${PROJECTM_DUMMY_SOURCE_FILE}")

if(CMAKE_SYSTEM_NAME STREQUAL Emscripten)
set(ENABLE_EMSCRIPTEN ON CACHE BOOL "Build for web with emscripten. Will also build the SDL2-based entrypoint." FORCE)
option(USE_PTHREADS "Enable pthreads" OFF)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might consider adding a status message below if Emscripten and USE_PTHREADS is enabled to make it clear when configuring. No change necessary though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay I added a status message below!

Is this what you had in mind?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, looks good!

Copy link
Collaborator

@dpw13 dpw13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One optional comment.

@Blaquewithaq Blaquewithaq force-pushed the add-pthreads-for-emscripten-only branch from 9348a5c to 2eb0a41 Compare March 6, 2024 17:42
@dpw13 dpw13 added this to the 4.1.1 milestone Mar 6, 2024
@dpw13 dpw13 added the cmake label Mar 6, 2024
@Blaquewithaq Blaquewithaq merged commit 2eb0a41 into projectM-visualizer:v4.1.x Mar 6, 2024
9 checks passed
@Blaquewithaq Blaquewithaq deleted the add-pthreads-for-emscripten-only branch March 6, 2024 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants