Skip to content

Commit

Permalink
[godot] try platform=linuxbsd
Browse files Browse the repository at this point in the history
  • Loading branch information
luncliff committed Feb 17, 2025
1 parent 67edb20 commit 6d3e585
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 10 deletions.
31 changes: 23 additions & 8 deletions ports/godot/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,10 @@ function(scons_build)
if(NOT arg_DIRECTORY)
set(arg_DIRECTORY "${SOURCE_PATH}")
endif()
set(TEST_OPT "tests=false")
set(DEBUG_SYMBOLS_OPT "debug_symbols=no")
message(STATUS "Building target ${arg_TARGET}")
vcpkg_execute_required_process(
COMMAND "${SCONS}"
target=${arg_TARGET} ${arg_SCONS_FLAGS} ${TEST_OPT} ${DEBUG_SYMBOLS_OPT}
COMMAND "${SCONS}" target=${arg_TARGET} ${arg_SCONS_FLAGS}
tests=false deprecated=no debug_symbols=no
LOGNAME "build-${arg_TARGET}"
WORKING_DIRECTORY "${arg_DIRECTORY}"
)
Expand All @@ -68,16 +66,19 @@ elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
endif()

# ${SOURCE_PATH}/.github/workflows
# todo: linux, android, ios, web
# todo: android, ios, web
if(VCPKG_TARGET_IS_WINDOWS) # windows_build.yml
scons_build(TARGET template_release
SCONS_FLAGS platform=windows arch=${ARCH_NAME} vsproj=yes vsproj_gen_only=no
)
scons_build(TARGET editor
SCONS_FLAGS platform=windows arch=${ARCH_NAME} vsproj=yes vsproj_gen_only=no windows_subsystem=console
)
file(GLOB EXE_FILES "${SOURCE_PATH}/bin/*.exe")
file(INSTALL ${EXE_FILES} DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
vcpkg_copy_tools(
TOOL_NAMES godot.windows.template_release.${ARCH_NAME}
godot.windows.editor.${ARCH_NAME}
SEARCH_DIR "${SOURCE_PATH}/bin" AUTO_CLEAN
)

elseif(VCPKG_TARGET_IS_OSX) # macos_build.yml
scons_build(TARGET template_release
Expand All @@ -87,7 +88,21 @@ elseif(VCPKG_TARGET_IS_OSX) # macos_build.yml
SCONS_FLAGS platform=macos arch=${ARCH_NAME} optimize=size vulkan=false
)
vcpkg_copy_tools(
TOOL_NAMES godot.macos.template_release.${ARCH_NAME} godot.macos.editor.${ARCH_NAME}
TOOL_NAMES godot.macos.template_release.${ARCH_NAME}
godot.macos.editor.${ARCH_NAME}
SEARCH_DIR "${SOURCE_PATH}/bin" AUTO_CLEAN
)

elseif(VCPKG_TARGET_IS_LINUX) # linux_build.yml
scons_build(TARGET template_release
SCONS_FLAGS platform=linuxbsd arch=${ARCH_NAME} optimize=size
)
scons_build(TARGET editor
SCONS_FLAGS platform=linuxbsd arch=${ARCH_NAME} optimize=size
)
vcpkg_copy_tools(
TOOL_NAMES godot.linuxbsd.template_release.${ARCH_NAME}
godot.linuxbsd.editor.${ARCH_NAME}
SEARCH_DIR "${SOURCE_PATH}/bin" AUTO_CLEAN
)

Expand Down
2 changes: 1 addition & 1 deletion ports/godot/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Godot Engine - Multi-platform 2D and 3D game engine",
"homepage": "https://godotengine.org/",
"license": "MIT",
"supports": "windows | osx",
"supports": "windows | osx | linux",
"dependencies": [
{
"name": "vcpkg-get-python-packages",
Expand Down
2 changes: 1 addition & 1 deletion test/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"glslang",
{
"name": "godot",
"platform": "osx"
"platform": "osx | linux"
},
{
"name": "libdispatch",
Expand Down

0 comments on commit 6d3e585

Please sign in to comment.