aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/CMakeLists.txt6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index 38af768a..119bbbee 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_library(CruBase SHARED
+add_library(CruBase
Base.cpp
Exception.cpp
Format.cpp
@@ -17,7 +17,7 @@ target_compile_definitions(CruBase PRIVATE CRU_BASE_EXPORT_API)
target_include_directories(CruBase PUBLIC ${CRU_INCLUDE_DIR})
target_compile_definitions(CruBase PUBLIC $<$<CONFIG:Debug>:CRU_DEBUG>)
-if (UNIX)
+if (UNIX AND NOT EMSCRIPTEN)
target_sources(CruBase PRIVATE
platform/unix/ErrnoException.cpp
platform/unix/UnixFileStream.cpp
@@ -55,6 +55,8 @@ if (WIN32)
target_compile_definitions(CruBase PUBLIC CRU_PLATFORM_WINDOWS)
elseif(APPLE)
target_compile_definitions(CruBase PUBLIC CRU_PLATFORM_OSX)
+elseif(EMSCRIPTEN)
+ target_compile_definitions(CruBase PUBLIC CRU_PLATFORM_EMSCRIPTEN)
else()
target_compile_definitions(CruBase PUBLIC CRU_PLATFORM_LINUX)
endif()