-
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Cpp WASM Lightweight Framework
FBW PR 7711 fix fix
- Loading branch information
Showing
46 changed files
with
609 additions
and
362 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
cmake_minimum_required(VERSION 3.18) | ||
project(flybywire-aircraft C CXX) | ||
|
||
set(CMAKE_CXX_STANDARD 20) | ||
set(CMAKE_VERBOSE_MAKEFILE OFF) | ||
set(FBW_ROOT ${CMAKE_CURRENT_SOURCE_DIR}) | ||
set(FBW_COMMON ${FBW_ROOT}/build-a333x-common/src/wasm) | ||
|
||
# cmake helper scripts | ||
include("${FBW_COMMON}/cpp-msfs-framework/cmake/TargetDefinition.cmake") | ||
|
||
# compiler refinement | ||
set(COMPILER_FLAGS "-Wall -Wextra -Wno-unused-function -Wno-unused-command-line-argument -Wno-ignored-attributes -Wno-macro-redefined -target wasm32-unknown-wasi --sysroot \"${MSFS_SDK}/WASM/wasi-sysroot\" -mthread-model single -fno-exceptions -fms-extensions -fvisibility=hidden -ffunction-sections -fdata-sections -fno-stack-protector") | ||
|
||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMPILER_FLAGS}") | ||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -flto -O2 -DNDEBUG") | ||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -DDEBUG") | ||
|
||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILER_FLAGS}") | ||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -flto -O2 -DNDEBUG") | ||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -DDEBUG") | ||
|
||
message("MSFS_SDK: " ${MSFS_SDK}) | ||
|
||
# add the include paths | ||
include_directories( | ||
"${MSFS_SDK}/WASM/include" | ||
"${MSFS_SDK}/WASM/wasi-sysroot/include" | ||
"${MSFS_SDK}/WASM/wasi-sysroot/include/c++/v1" | ||
"${MSFS_SDK}/SimConnect SDK/include" | ||
"${FBW_COMMON}/cpp-msfs-framework/lib" | ||
"${FBW_COMMON}/cpp-msfs-framework/MsfsHandler" | ||
"${FBW_COMMON}/cpp-msfs-framework/MsfsHandler/DataTypes" | ||
) | ||
|
||
# add compiler definitions | ||
add_definitions( | ||
-D_MSFS_WASM=1 | ||
-D__wasi__ | ||
-D_LIBC_NO_EXCEPTIONS | ||
-D_LIBCPP_HAS_NO_THREADS | ||
-D_WINDLL | ||
-D_MBCS | ||
# ZERO_LVL=0 CRITICAL_LVL=1 ERROR_LVL=2 WARN_LVL=3 INFO_LVL=4 DEBUG_LVL=5 VERBOSE=6 TRACE_LVL=7 | ||
-DLOG_LEVEL=4 | ||
# EXAMPLES | NO_EXAMPLES | ||
-DNO_EXAMPLES | ||
#PROFILING | NO_PROFILING - for logging of profiling information of pre-, post-, update() calls | ||
-DNO_PROFILING | ||
) | ||
|
||
# add the common components | ||
add_subdirectory(build-a333x-common/src/wasm) | ||
|
||
# add the A333X components | ||
add_subdirectory(build-a333x/src/wasm) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
cmake_minimum_required(VERSION 3.18) | ||
project(flybywire-aircraft C CXX) | ||
|
||
set(CMAKE_CXX_STANDARD 20) | ||
set(CMAKE_VERBOSE_MAKEFILE OFF) | ||
set(FBW_ROOT ${CMAKE_CURRENT_SOURCE_DIR}) | ||
set(FBW_COMMON ${FBW_ROOT}/build-a339x-common/src/wasm) | ||
|
||
# cmake helper scripts | ||
include("${FBW_COMMON}/cpp-msfs-framework/cmake/TargetDefinition.cmake") | ||
|
||
# compiler refinement | ||
set(COMPILER_FLAGS "-Wall -Wextra -Wno-unused-function -Wno-unused-command-line-argument -Wno-ignored-attributes -Wno-macro-redefined -target wasm32-unknown-wasi --sysroot \"${MSFS_SDK}/WASM/wasi-sysroot\" -mthread-model single -fno-exceptions -fms-extensions -fvisibility=hidden -ffunction-sections -fdata-sections -fno-stack-protector") | ||
|
||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMPILER_FLAGS}") | ||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -flto -O2 -DNDEBUG") | ||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -DDEBUG") | ||
|
||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILER_FLAGS}") | ||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -flto -O2 -DNDEBUG") | ||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -DDEBUG") | ||
|
||
message("MSFS_SDK: " ${MSFS_SDK}) | ||
|
||
# add the include paths | ||
include_directories( | ||
"${MSFS_SDK}/WASM/include" | ||
"${MSFS_SDK}/WASM/wasi-sysroot/include" | ||
"${MSFS_SDK}/WASM/wasi-sysroot/include/c++/v1" | ||
"${MSFS_SDK}/SimConnect SDK/include" | ||
"${FBW_COMMON}/cpp-msfs-framework/lib" | ||
"${FBW_COMMON}/cpp-msfs-framework/MsfsHandler" | ||
"${FBW_COMMON}/cpp-msfs-framework/MsfsHandler/DataTypes" | ||
) | ||
|
||
# add compiler definitions | ||
add_definitions( | ||
-D_MSFS_WASM=1 | ||
-D__wasi__ | ||
-D_LIBC_NO_EXCEPTIONS | ||
-D_LIBCPP_HAS_NO_THREADS | ||
-D_WINDLL | ||
-D_MBCS | ||
# ZERO_LVL=0 CRITICAL_LVL=1 ERROR_LVL=2 WARN_LVL=3 INFO_LVL=4 DEBUG_LVL=5 VERBOSE=6 TRACE_LVL=7 | ||
-DLOG_LEVEL=4 | ||
# EXAMPLES | NO_EXAMPLES | ||
-DNO_EXAMPLES | ||
#PROFILING | NO_PROFILING - for logging of profiling information of pre-, post-, update() calls | ||
-DNO_PROFILING | ||
) | ||
|
||
# add the common components | ||
add_subdirectory(build-a339x-common/src/wasm) | ||
|
||
# add the A339X components | ||
add_subdirectory(build-a339x/src/wasm) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
cmake_minimum_required(VERSION 3.18) | ||
project(flybywire-aircraft C CXX) | ||
|
||
set(CMAKE_CXX_STANDARD 20) | ||
set(CMAKE_VERBOSE_MAKEFILE OFF) | ||
set(FBW_ROOT ${CMAKE_CURRENT_SOURCE_DIR}) | ||
set(FBW_COMMON ${FBW_ROOT}/build-su95x-common/src/wasm) | ||
|
||
# cmake helper scripts | ||
include("${FBW_COMMON}/cpp-msfs-framework/cmake/TargetDefinition.cmake") | ||
|
||
# compiler refinement | ||
set(COMPILER_FLAGS "-Wall -Wextra -Wno-unused-function -Wno-unused-command-line-argument -Wno-ignored-attributes -Wno-macro-redefined -target wasm32-unknown-wasi --sysroot \"${MSFS_SDK}/WASM/wasi-sysroot\" -mthread-model single -fno-exceptions -fms-extensions -fvisibility=hidden -ffunction-sections -fdata-sections -fno-stack-protector") | ||
|
||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMPILER_FLAGS}") | ||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -flto -O2 -DNDEBUG") | ||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -DDEBUG") | ||
|
||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILER_FLAGS}") | ||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -flto -O2 -DNDEBUG") | ||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -DDEBUG") | ||
|
||
message("MSFS_SDK: " ${MSFS_SDK}) | ||
|
||
# add the include paths | ||
include_directories( | ||
"${MSFS_SDK}/WASM/include" | ||
"${MSFS_SDK}/WASM/wasi-sysroot/include" | ||
"${MSFS_SDK}/WASM/wasi-sysroot/include/c++/v1" | ||
"${MSFS_SDK}/SimConnect SDK/include" | ||
"${FBW_COMMON}/cpp-msfs-framework/lib" | ||
"${FBW_COMMON}/cpp-msfs-framework/MsfsHandler" | ||
"${FBW_COMMON}/cpp-msfs-framework/MsfsHandler/DataTypes" | ||
) | ||
|
||
# add compiler definitions | ||
add_definitions( | ||
-D_MSFS_WASM=1 | ||
-D__wasi__ | ||
-D_LIBC_NO_EXCEPTIONS | ||
-D_LIBCPP_HAS_NO_THREADS | ||
-D_WINDLL | ||
-D_MBCS | ||
# ZERO_LVL=0 CRITICAL_LVL=1 ERROR_LVL=2 WARN_LVL=3 INFO_LVL=4 DEBUG_LVL=5 VERBOSE=6 TRACE_LVL=7 | ||
-DLOG_LEVEL=4 | ||
# EXAMPLES | NO_EXAMPLES | ||
-DNO_EXAMPLES | ||
#PROFILING | NO_PROFILING - for logging of profiling information of pre-, post-, update() calls | ||
-DNO_PROFILING | ||
) | ||
|
||
# add the common components | ||
add_subdirectory(build-su95x-common/src/wasm) | ||
|
||
# add the A339X components | ||
add_subdirectory(build-su95x/src/wasm) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# folder structure | ||
set(OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../../../build-a333x/out/headwindsim-aircraft-a330-300/SimObjects/Airplanes/Headwind_A330_300/panel) | ||
|
||
# add compiler definitions | ||
add_definitions(-DA32NX) | ||
|
||
add_subdirectory(extra-backend-a32nx) | ||
|
||
# FIXME: remove the if-clause as soon as all components are using CMake | ||
if (WIN32) | ||
add_subdirectory(fadec_a330) | ||
add_subdirectory(fbw_a320) | ||
endif () |
Oops, something went wrong.