Skip to content

Commit

Permalink
added BUILD_WITH_ALL option to build all the scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
nesbox committed May 11, 2024
1 parent c2f5336 commit f125e5c
Show file tree
Hide file tree
Showing 14 changed files with 30 additions and 49 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
run: |
COPY /Y build\janet\janetconf.h vendor\janet\src\conf\janetconf.h
cd build
cmake -G "Visual Studio 16 2019" -A Win32 -T v141_xp -DCMAKE_BUILD_TYPE=%BUILD_TYPE% ..
cmake -G "Visual Studio 16 2019" -A Win32 -T v141_xp -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DBUILD_WITH_ALL=ON ..
cmake --build . --config %BUILD_TYPE% --parallel
- name: Deploy
Expand All @@ -39,7 +39,7 @@ jobs:
run: |
COPY /Y build\janet\janetconf.h vendor\janet\src\conf\janetconf.h
cd build
cmake -G "Visual Studio 16 2019" -A Win32 -T v141_xp -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DBUILD_PRO=On ..
cmake -G "Visual Studio 16 2019" -A Win32 -T v141_xp -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DBUILD_PRO=On -DBUILD_WITH_ALL=ON ..
cmake --build . --config %BUILD_TYPE% --parallel
# === Windows ===
Expand All @@ -60,7 +60,7 @@ jobs:
shell: cmd
run: |
cd build
cmake -G "Visual Studio 16 2019" -DBUILD_SDLGPU=On -DCMAKE_BUILD_TYPE=%BUILD_TYPE% ..
cmake -G "Visual Studio 16 2019" -DBUILD_SDLGPU=On -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DBUILD_WITH_ALL=ON ..
cmake --build . --config %BUILD_TYPE% --parallel
- name: Deploy
Expand All @@ -73,7 +73,7 @@ jobs:
shell: cmd
run: |
cd build
cmake -G "Visual Studio 16 2019" -DBUILD_SDL=Off -DBUILD_SOKOL=On -DCMAKE_BUILD_TYPE=%BUILD_TYPE% ..
cmake -G "Visual Studio 16 2019" -DBUILD_SDL=Off -DBUILD_SOKOL=On -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DBUILD_WITH_ALL=ON ..
cmake --build . --config %BUILD_TYPE% --parallel
cp bin/tic80-sokol.exe bin/tic80.exe
Expand All @@ -87,7 +87,7 @@ jobs:
shell: cmd
run: |
cd build
cmake -G "Visual Studio 16 2019" -DBUILD_SDLGPU=On -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DBUILD_PRO=On ..
cmake -G "Visual Studio 16 2019" -DBUILD_SDLGPU=On -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DBUILD_PRO=On -DBUILD_WITH_ALL=ON ..
cmake --build . --config %BUILD_TYPE% --parallel
# === Windows MinGW-64 ===
Expand Down Expand Up @@ -116,7 +116,7 @@ jobs:
shell: bash
run: |
cd build
cmake -G "MSYS Makefiles" -DCMAKE_C_COMPILER=C:/msys64/mingw64/bin/gcc.exe -DCMAKE_CXX_COMPILER=C:/msys64/mingw64/bin/c++.exe -DBUILD_SDLGPU=On -DCMAKE_BUILD_TYPE=%BUILD_TYPE% ..
cmake -G "MSYS Makefiles" -DCMAKE_C_COMPILER=C:/msys64/mingw64/bin/gcc.exe -DCMAKE_CXX_COMPILER=C:/msys64/mingw64/bin/c++.exe -DBUILD_SDLGPU=On -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DBUILD_WITH_ALL=ON ..
cmake --build . --config %BUILD_TYPE% --parallel
# === Ubuntu ===
Expand All @@ -141,7 +141,7 @@ jobs:
- name: Build
run: |
cd build
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_SDLGPU=On ..
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_SDLGPU=On -DBUILD_WITH_ALL=ON ..
cmake --build . --config $BUILD_TYPE --parallel
cpack
Expand All @@ -160,7 +160,7 @@ jobs:
- name: Build Pro
run: |
cd build
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_SDLGPU=On -DBUILD_PRO=On ..
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_SDLGPU=On -DBUILD_PRO=On -DBUILD_WITH_ALL=ON ..
cmake --build . --config $BUILD_TYPE --parallel
cpack
Expand All @@ -183,7 +183,7 @@ jobs:
- name: Build
run: |
cd build
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE=rpi/toolchain.cmake ..
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE=rpi/toolchain.cmake -DBUILD_WITH_ALL=ON ..
cmake --build . --config $BUILD_TYPE --parallel
cpack
Expand Down Expand Up @@ -242,7 +242,7 @@ jobs:
run: |
git apply build/baremetalpi/circle.patch
cd build
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE=baremetalpi/toolchain.cmake ..
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE=baremetalpi/toolchain.cmake -DBUILD_WITH_ALL=ON ..
make tic80studio -j$(nproc)
cd baremetalpi
make -j$(nproc)
Expand Down Expand Up @@ -302,7 +302,7 @@ jobs:
run: |
git apply build/baremetalpi/circle.patch
cd build
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE=baremetalpi/toolchain.cmake ..
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE=baremetalpi/toolchain.cmake -DBUILD_WITH_ALL=ON ..
make tic80studio -j$(nproc)
cd baremetalpi
make -j$(nproc)
Expand Down Expand Up @@ -348,7 +348,7 @@ jobs:
- name: Build
run: |
cd build
cmake -DCMAKE_TOOLCHAIN_FILE=$DEVKITPRO/3ds.cmake -DN3DS=TRUE -DCMAKE_BUILD_TYPE=$BUILD_TYPE ..
cmake -DCMAKE_TOOLCHAIN_FILE=$DEVKITPRO/3ds.cmake -DN3DS=TRUE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_WITH_ALL=ON ..
make -j$(nproc)
- name: Deploy
Expand Down Expand Up @@ -393,7 +393,7 @@ jobs:
- name: Build
run: |
cd build
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_SDLGPU=On -DBUILD_PRO=On ..
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_SDLGPU=On -DBUILD_PRO=On -DBUILD_WITH_ALL=ON ..
cmake --build . --config $BUILD_TYPE --parallel
# === MacOS 14 / arm64 ===
Expand Down Expand Up @@ -432,7 +432,7 @@ jobs:
- name: Build
run: |
cd build
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_SDLGPU=On -DBUILD_PRO=On ..
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_SDLGPU=On -DBUILD_PRO=On -DBUILD_WITH_ALL=ON ..
cmake --build . --config $BUILD_TYPE --parallel
# === Android ===
Expand Down Expand Up @@ -494,7 +494,7 @@ jobs:
- name: Build
run: |
cd build
emcmake cmake -DBUILD_SDLGPU=On -DCMAKE_BUILD_TYPE=$BUILD_TYPE ..
emcmake cmake -DBUILD_SDLGPU=On -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_WITH_ALL=ON ..
cmake --build . --config $BUILD_TYPE --parallel
mkdir bin/html bin/html-export
cp html/export.html bin/html-export/index.html
Expand Down
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ else()
endif()

set(BUILD_TOUCH_INPUT_DEFAULT ${ANDROID})
set(BUILD_WITH_ALL_DEFAULT OFF)

option(BUILD_STATIC "Static runtime" ON)
option(BUILD_WITH_ALL "Build all supported scripts" ${BUILD_WITH_ALL_DEFAULT})
option(BUILD_SDL "SDL Enabled" ON)
option(BUILD_SDLGPU "SDL GPU Enabled" OFF)
option(BUILD_SOKOL "Sokol Enabled" OFF)
Expand Down Expand Up @@ -66,6 +68,7 @@ target_compile_definitions(runtime INTERFACE BUILD_DEPRECATED)
message("BUILD_STATIC: ${BUILD_STATIC}")
message("BUILD_SDLGPU: ${BUILD_SDLGPU}")
message("BUILD_TOUCH_INPUT: ${BUILD_TOUCH_INPUT}")
message("BUILD_WITH_ALL: ${BUILD_WITH_ALL}")

if (N3DS)
set(BUILD_SDL OFF)
Expand Down
2 changes: 1 addition & 1 deletion build/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ android {
arguments "APP_PLATFORM=android-31"
}
cmake {
arguments "-DBUILD_WITH_MRUBY=Off", "-DBUILD_PRO=Off", "-DCMAKE_BUILD_TYPE=MinSizeRel"
arguments "-DBUILD_WITH_MRUBY=OFF", "-DBUILD_PRO=Off", "-DCMAKE_BUILD_TYPE=MinSizeRel", "-DBUILD_WITH_ALL=ON"
}
}
}
Expand Down
4 changes: 1 addition & 3 deletions cmake/fennel.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
# Fennel
################################

set(BUILD_WITH_FENNEL_DEFAULT FALSE)

option(BUILD_WITH_FENNEL "Fennel Enabled" ${BUILD_WITH_FENNEL_DEFAULT})
option(BUILD_WITH_FENNEL "Fennel Enabled" ${BUILD_WITH_ALL})
message("BUILD_WITH_FENNEL: ${BUILD_WITH_FENNEL}")

if(BUILD_WITH_FENNEL)
Expand Down
4 changes: 1 addition & 3 deletions cmake/janet.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
# Janet
################################

set(BUILD_WITH_JANET_DEFAULT FALSE)

option(BUILD_WITH_JANET "Janet Enabled" ${BUILD_WITH_JANET_DEFAULT})
option(BUILD_WITH_JANET "Janet Enabled" ${BUILD_WITH_ALL})
message("BUILD_WITH_JANET: ${BUILD_WITH_JANET}")

if(BUILD_WITH_JANET)
Expand Down
4 changes: 1 addition & 3 deletions cmake/lua.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
# LUA
################################

set(BUILD_WITH_LUA_DEFAULT TRUE)

option(BUILD_WITH_LUA "Lua Enabled" ${BUILD_WITH_LUA_DEFAULT})
option(BUILD_WITH_LUA "Lua Enabled" ON)
message("BUILD_WITH_LUA: ${BUILD_WITH_LUA}")

if(BUILD_WITH_LUA)
Expand Down
4 changes: 1 addition & 3 deletions cmake/moon.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
# MoonScript
################################

set(BUILD_WITH_MOON_DEFAULT FALSE)

option(BUILD_WITH_MOON "Moon Enabled" ${BUILD_WITH_MOON_DEFAULT})
option(BUILD_WITH_MOON "Moon Enabled" ${BUILD_WITH_ALL})
message("BUILD_WITH_MOON: ${BUILD_WITH_MOON}")

if(BUILD_WITH_MOON)
Expand Down
4 changes: 1 addition & 3 deletions cmake/mruby.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
# MRUBY
################################

set(BUILD_WITH_MRUBY_DEFAULT FALSE)

option(BUILD_WITH_MRUBY "mruby Enabled" ${BUILD_WITH_MRUBY_DEFAULT})
option(BUILD_WITH_MRUBY "mruby Enabled" ${BUILD_WITH_ALL})
message("BUILD_WITH_MRUBY: ${BUILD_WITH_MRUBY}")

if(BUILD_WITH_MRUBY)
Expand Down
4 changes: 1 addition & 3 deletions cmake/pocketpy.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
# pocketpy (Python)
################################

set(BUILD_WITH_PYTHON_DEFAULT FALSE)

option(BUILD_WITH_PYTHON "Python Enabled" ${BUILD_WITH_PYTHON_DEFAULT})
option(BUILD_WITH_PYTHON "Python Enabled" ${BUILD_WITH_ALL})
message("BUILD_WITH_PYTHON: ${BUILD_WITH_PYTHON}")

if(BUILD_WITH_PYTHON)
Expand Down
4 changes: 1 addition & 3 deletions cmake/quickjs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
# QuickJS
################################

set(BUILD_WITH_JS_DEFAULT FALSE)

option(BUILD_WITH_JS "JS Enabled" ${BUILD_WITH_JS_DEFAULT})
option(BUILD_WITH_JS "JS Enabled" ${BUILD_WITH_ALL})
message("BUILD_WITH_JS: ${BUILD_WITH_JS}")

if(BUILD_WITH_JS)
Expand Down
4 changes: 1 addition & 3 deletions cmake/scheme.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
# SCHEME (S7)
################################

set(BUILD_WITH_SCHEME_DEFAULT FALSE)

option(BUILD_WITH_SCHEME "Scheme Enabled" ${BUILD_WITH_SCHEME_DEFAULT})
option(BUILD_WITH_SCHEME "Scheme Enabled" ${BUILD_WITH_ALL})
message("BUILD_WITH_SCHEME: ${BUILD_WITH_SCHEME}")

if(BUILD_WITH_SCHEME)
Expand Down
4 changes: 1 addition & 3 deletions cmake/squirrel.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
# SQUIRREL
################################

set(BUILD_WITH_SQUIRREL_DEFAULT FALSE)

option(BUILD_WITH_SQUIRREL "Squirrel Enabled" ${BUILD_WITH_SQUIRREL_DEFAULT})
option(BUILD_WITH_SQUIRREL "Squirrel Enabled" ${BUILD_WITH_ALL})
message("BUILD_WITH_SQUIRREL: ${BUILD_WITH_SQUIRREL}")

if(BUILD_WITH_SQUIRREL)
Expand Down
4 changes: 1 addition & 3 deletions cmake/wasm.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
# WASM
################################

set(BUILD_WITH_WASM_DEFAULT FALSE)

option(BUILD_WITH_WASM "Wasm Enabled" ${BUILD_WITH_WASM_DEFAULT})
option(BUILD_WITH_WASM "Wasm Enabled" ${BUILD_WITH_ALL})
message("BUILD_WITH_WASM: ${BUILD_WITH_WASM}")

if(BUILD_WITH_WASM)
Expand Down
4 changes: 1 addition & 3 deletions cmake/wren.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
# WREN
################################

set(BUILD_WITH_WREN_DEFAULT FALSE)

option(BUILD_WITH_WREN "WREN Enabled" ${BUILD_WITH_WREN_DEFAULT})
option(BUILD_WITH_WREN "WREN Enabled" ${BUILD_WITH_ALL})
message("BUILD_WITH_WREN: ${BUILD_WITH_WREN}")

if(BUILD_WITH_WREN)
Expand Down

0 comments on commit f125e5c

Please sign in to comment.