Skip to content

Commit

Permalink
Update for build emscripten
Browse files Browse the repository at this point in the history
  • Loading branch information
ducphamhong committed Aug 21, 2024
1 parent ea15014 commit 2561380
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion BuildCommand/BuildEmscripten.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ python BuildAssetBundles.py
cd..
mkdir Bin\BuiltIn
copy Bin\BuiltIn.zip Bin\BuiltIn
cmake -DCMAKE_TOOLCHAIN_FILE=C:\emsdk\upstream\emscripten\cmake\Modules\Platform\Emscripten.cmake -S . -B ./PrjEmscripten -G "MinGW Makefiles" -DCMAKE_SH="CMAKE_SH-NOTFOUND
cmake -DCMAKE_TOOLCHAIN_FILE=C:\emsdk\upstream\emscripten\cmake\Modules\Platform\Emscripten.cmake -S . -B ./PrjEmscripten -G "MinGW Makefiles" -DCMAKE_SH="CMAKE_SH-NOTFOUND"
C:\MinGW\bin\mingw32-make.exe -C PrjEmscripten
24 changes: 14 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,20 @@ endif()
# network
if (BUILD_SKYLICHT_NETWORK)
add_definitions(-DBUILD_SKYLICHT_NETWORK)
# enable curl
set(BUILD_CURL ON)
add_definitions(-DHAVE_CURL)
add_definitions(-DCURL_STATICLIB)
add_definitions(-DHTTP_ONLY)
add_definitions(-DBUILDING_LIBCURL)
# enable openssl for https
if (MSVC)
set(BUILD_OPENSSL ON)
add_definitions(-DUSE_OPENSSL)
# curl on/off
if (CMAKE_SYSTEM_NAME STREQUAL Emscripten)
set(BUILD_CURL OFF)
else()
set(BUILD_CURL ON)
add_definitions(-DHAVE_CURL)
add_definitions(-DCURL_STATICLIB)
add_definitions(-DHTTP_ONLY)
add_definitions(-DBUILDING_LIBCURL)
# enable openssl for https
if (MSVC)
set(BUILD_OPENSSL ON)
add_definitions(-DUSE_OPENSSL)
endif()
endif()
else()
set(BUILD_CURL OFF)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ This file is part of the "Skylicht Engine".
!#
*/

#pragma once

#include "pch.h"
#include "CUIEventManager.h"
#include "CUIContainer.h"
Expand Down

0 comments on commit 2561380

Please sign in to comment.