diff options
author | crupest <crupest@outlook.com> | 2022-09-29 17:49:35 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-09-29 17:49:35 +0800 |
commit | 65f920e9b88dc89124b286d82668ece9178a665f (patch) | |
tree | 23f29b4171366e23b6ac88d5149352ca8ef597e2 /CMakeLists.txt | |
parent | 6b14866d4cb0e496d28142f3f42e5f2624d6dc77 (diff) | |
download | cru-65f920e9b88dc89124b286d82668ece9178a665f.tar.gz cru-65f920e9b88dc89124b286d82668ece9178a665f.tar.bz2 cru-65f920e9b88dc89124b286d82668ece9178a665f.zip |
Start to work on emscripten.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 776f4638..d83e4b07 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,13 @@ cmake_minimum_required(VERSION 3.21) +set(CRU_DEFAULT_BUILD_SHARED_LIBS ON) +if (EMSCRIPTEN) + # Webassembly has no idea about static/dynamic libraries. + set(CRU_DEFAULT_BUILD_SHARED_LIBS OFF) +endif() + +option(BUILD_SHARED_LIBS "Try to build shared libraries as default" CRU_DEFAULT_BUILD_SHARED_LIBS) + set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_EXTENSIONS OFF) |