-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
34 lines (26 loc) · 892 Bytes
/
CMakeLists.txt
File metadata and controls
34 lines (26 loc) · 892 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
cmake_minimum_required(VERSION 3.15 FATAL_ERROR)
project(projectM_Emscripten)
message(STATUS "${CMAKE_PREFIX_PATH}")
find_package(libprojectM REQUIRED CONFIG)
# Setting the suffix to .html also creates an HTML file in addition to the .js and .wasm outputs.
set(CMAKE_EXECUTABLE_SUFFIX ".html")
add_executable(projectM_SDL_emscripten
projectM_SDL_emscripten.cpp
)
target_link_libraries(projectM_SDL_emscripten
PRIVATE
libprojectM::static
)
target_compile_options(projectM_SDL_emscripten
PRIVATE
"SHELL:-s USE_SDL=2"
)
target_link_options(projectM_SDL_emscripten
PRIVATE
"SHELL:-s USE_SDL=2"
"SHELL:-s MIN_WEBGL_VERSION=2"
"SHELL:-s MAX_WEBGL_VERSION=2"
"SHELL:-s FULL_ES2=1"
"SHELL:-s ALLOW_MEMORY_GROWTH=1"
"SHELL:--preload-file ${PRESETS_DIR}@/presets"
)