From 65f920e9b88dc89124b286d82668ece9178a665f Mon Sep 17 00:00:00 2001 From: crupest Date: Thu, 29 Sep 2022 17:49:35 +0800 Subject: Start to work on emscripten. --- src/common/CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/common') 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 $<$: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() -- cgit v1.2.3