Skip to content

Commit e1f5ff5

Browse files
committed
0.2.5 Staged Changes
1 parent 128351c commit e1f5ff5

23 files changed

Lines changed: 1015 additions & 318 deletions

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "contribs/bskia"]
2+
path = contribs/bskia
3+
url = https://github.com/boradevelopment/bskia.git

cmake/platform/linux.cmake

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
set(WAMR_BUILD_PLATFORM "windows")
2+
include(${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake)
3+
4+
if(NOT DEFINED WAMR_BUILD_TARGET)
5+
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
6+
set(WAMR_BUILD_TARGET "X86_64")
7+
else()
8+
set(WAMR_BUILD_TARGET "X86_32")
9+
endif()
10+
endif()
11+
12+
include(${WAMR_ROOT_DIR}/core/shared/utils/uncommon/shared_uncommon.cmake)
13+
include_directories(${WAMR_ROOT_DIR}/product-mini/platforms/common ./src/host/templates ../global/cpp ./src ./src/software/common ./src/software/win32 ./contribs ./3rdparty)
14+
15+
add_compile_definitions(
16+
TAZABASEDIR=\"${CMAKE_SOURCE_DIR}/contribs/TAZA/code\"
17+
NOMINMAX
18+
_WINSOCKAPI_
19+
GLEW_STATIC
20+
)
21+
if(ENABLE_ASAN)
22+
add_link_options("/INFERASANLIBS")
23+
endif()
24+
25+
# Executable
26+
add_executable(BORA
27+
${BORA_SOURCES_WRAPPER}
28+
${BORA_SOURCES_CONTRIBWRAPPER} ${BORA_TAZA} ${BORA_3RDPARTY}
29+
)
30+
target_compile_definitions(BORA PRIVATE
31+
TAZABASEDIR="${CMAKE_SOURCE_DIR}/contribs/TAZA/code"
32+
NOMINMAX _WINSOCKAPI_ WRAPPER
33+
)
34+
target_compile_options(BORA PRIVATE /FI${CMAKE_SOURCE_DIR}/../global/cpp/contribs/TypeDefinitions.h)
35+
36+
37+
file(GLOB_RECURSE BORA_SOURCES_CONTRIB_GRAPHICS contribs/bskia/src/* 3rdparty/GLEW/**/*.h)
38+
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
39+
set(BUILD_TYPE Debug)
40+
else()
41+
set(BUILD_TYPE Release)
42+
endif()
43+
44+
message(${BUILD_TYPE})
45+
file(GLOB_RECURSE BORA_SKIA ${CMAKE_SOURCE_DIR}/cached_libs/bskia/${BUILD_TYPE}${ASAN_PREFIX}/*.lib)
46+
file(GLOB_RECURSE BORA_LIBS ${CMAKE_SOURCE_DIR}/libs/Debug/*.lib)
47+
48+
add_library(BORA_COMPAT SHARED src/library.def ${BORA_SOURCES} ${BORA_CONTRIBS} ${BORA_TAZA} ${BORA_3RDPARTY})
49+
target_sources(BORA_COMPAT PRIVATE ${WAMR_RUNTIME_LIB_SOURCE})
50+
51+
target_link_libraries(BORA_COMPAT PRIVATE Vulkan::Vulkan ntdll ${BORA_SKIA} ${BORA_LIBS} opengl32.lib)
52+
target_precompile_headers(BORA_COMPAT PRIVATE
53+
../global/cpp/contribs/TypeDefinitions.h
54+
)
55+
add_dependencies(BORA_COMPAT skia_all)
56+
set_target_properties(BORA_COMPAT PROPERTIES
57+
OUTPUT_NAME "LATEST"
58+
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/compatibility"
59+
)
60+
61+
62+
add_dependencies(BORA BORA_COMPAT)

cmake/platform/windows.cmake

Whitespace-only changes.

cmake/skia.cmake

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
include(ExternalProject)
2+
3+
set(SKIA_SOURCE_DIR "${CMAKE_SOURCE_DIR}/contribs/bskia")
4+
set(SKIA_BUILD_DIR "${CMAKE_SOURCE_DIR}/cached_libs/bskia")
5+
6+
# Compiler flags
7+
if (MSVC)
8+
if(ENABLE_ASAN)
9+
set(ASAN_CODE "/fsanitize$address")
10+
endif ()
11+
endif()
12+
13+
if(ENABLE_ASAN)
14+
set(ASAN_PREFIX "ASAN")
15+
endif()
16+
17+
if(WIN32)
18+
set(SKIA_SUFFIX ".bat")
19+
else ()
20+
set(SKIA_SUFFIX ".sh")
21+
endif ()
22+
23+
# ----------------------
24+
# DEBUG BUILD
25+
# ----------------------
26+
ExternalProject_Add(
27+
skia_debug
28+
SOURCE_DIR ${SKIA_SOURCE_DIR}
29+
BINARY_DIR ${SKIA_BUILD_DIR}/Debug
30+
31+
CONFIGURE_COMMAND
32+
cmd /C
33+
"cd /D ${SKIA_SOURCE_DIR} && build_all${SKIA_SUFFIX} ${SKIA_BUILD_DIR} DEBUG ${ASAN_CODE} ${ASAN_PREFIX}"
34+
35+
INSTALL_COMMAND ""
36+
BUILD_COMMAND ""
37+
38+
USES_TERMINAL_CONFIGURE true
39+
)
40+
41+
ExternalProject_Add(
42+
skia_release
43+
SOURCE_DIR ${SKIA_SOURCE_DIR}
44+
BINARY_DIR ${SKIA_BUILD_DIR}/Release
45+
46+
CONFIGURE_COMMAND
47+
cmd /C
48+
"cd /D ${SKIA_SOURCE_DIR} && build_all${SKIA_SUFFIX} ${SKIA_BUILD_DIR} RELEASE ${ASAN_CODE} ${ASAN_PREFIX}"
49+
50+
INSTALL_COMMAND ""
51+
BUILD_COMMAND ""
52+
53+
USES_TERMINAL_CONFIGURE true
54+
)
55+
56+
57+
add_custom_target(skia_all
58+
DEPENDS skia_debug skia_release
59+
)

contribs/bskia

Submodule bskia added at 12f573b

src/host/Commands.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// Apart of the BORA Runtime Source which uses the TAOSU License
2+
// Check LICENSE.md for more information regarding the BORA license.
3+
4+
#include "Commands.h"

src/host/Commands.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// This header is apart of the BORA Source
2+
// Check LICENSE.md for more information regarding the BORA license.
3+
4+
/*
5+
* FileName: Commands.h
6+
* Purpose: ?
7+
*/
8+
9+
#pragma once
10+
class Commands {
11+
public:
12+
Commands();
13+
};

src/host/WasmTools.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// This header is apart of the BORA Source
2+
// Check LICENSE.md for more information regarding the BORA license.
3+
4+
/*
5+
* FileName: WasmTools.h
6+
* Purpose: ?
7+
*/
8+
9+
#pragma once
10+
class WasmTools {
11+
public:
12+
WasmTools();
13+
};
File renamed without changes.

0 commit comments

Comments
 (0)