Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ add_library(${TARGET_NAME} SHARED EXCLUDE_FROM_ALL)

target_sources(
${TARGET_NAME}
PRIVATE src/example.cpp src/example.h src/register_types.cpp src/register_types.h src/tests.h
PRIVATE src/my_test.cpp src/my_test.h src/register_types.cpp src/register_types.h src/tests.h
)

# conditionally add doc data to compile output
Expand Down Expand Up @@ -52,8 +52,7 @@ set_target_properties(
PDB_OUTPUT_DIRECTORY "$<1:${OUTPUT_DIR}>" #MSVC Only, ignored on other platforms

PREFIX "lib"
OUTPUT_NAME "gdexample${GODOTCPP_SUFFIX}"
# TODO rename the file for both CMake and SCons
OUTPUT_NAME "mytest${GODOTCPP_SUFFIX}"

# Some IDE's respect this property to logically group targets
FOLDER "godot-cpp"
Expand All @@ -64,6 +63,6 @@ set_target_properties(
if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
set_target_properties(
${TARGET_NAME}
PROPERTIES SUFFIX "" OUTPUT_DIR "${OUTPUT_DIR}/libgdexample.macos.${GODOTCPP_TARGET}.framework"
PROPERTIES SUFFIX "" OUTPUT_DIR "${OUTPUT_DIR}/libmytest.macos.${GODOTCPP_TARGET}.framework"
)
endif()
8 changes: 4 additions & 4 deletions test/SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,25 @@ if env["target"] in ["editor", "template_debug"]:

if env["platform"] == "macos":
library = env.SharedLibrary(
"project/bin/libgdexample.{}.{}.framework/libgdexample.{}.{}".format(
"project/bin/libmytest.{}.{}.framework/libmytest.{}.{}".format(
env["platform"], env["target"], env["platform"], env["target"]
),
source=sources,
)
elif env["platform"] == "ios":
if env["ios_simulator"]:
library = env.StaticLibrary(
"project/bin/libgdexample.{}.{}.simulator.a".format(env["platform"], env["target"]),
"project/bin/libmytest.{}.{}.simulator.a".format(env["platform"], env["target"]),
source=sources,
)
else:
library = env.StaticLibrary(
"project/bin/libgdexample.{}.{}.a".format(env["platform"], env["target"]),
"project/bin/libmytest.{}.{}.a".format(env["platform"], env["target"]),
source=sources,
)
else:
library = env.SharedLibrary(
"project/bin/libgdexample{}{}".format(env["suffix"], env["SHLIBSUFFIX"]),
"project/bin/libmytest{}{}".format(env["suffix"], env["SHLIBSUFFIX"]),
source=sources,
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Example" inherits="Control" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/godotengine/godot/master/doc/class.xsd">
<class name="MyTestMain" inherits="Control" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/godotengine/godot/master/doc/class.xsd">
<brief_description>
A test control defined in GDExtension.
</brief_description>
Expand Down
2 changes: 1 addition & 1 deletion test/generate_xcframework.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
scons arch=universal ios_simulator=yes platform=ios target=$1 $2
scons arch=arm64 ios_simulator=no platform=ios target=$1 $2

xcodebuild -create-xcframework -library ./project/bin/libgdexample.ios.$1.a -library ./project/bin/libgdexample.ios.$1.simulator.a -output ./project/bin/libgdexample.ios.$1.xcframework
xcodebuild -create-xcframework -library ./project/bin/libmytest.ios.$1.a -library ./project/bin/libmytest.ios.$1.simulator.a -output ./project/bin/libmytest.ios.$1.xcframework
xcodebuild -create-xcframework -library ../bin/libgodot-cpp.ios.$1.arm64.a -library ../bin/libgodot-cpp.ios.$1.universal.simulator.a -output ./project/bin/libgodot-cpp.ios.$1.xcframework
43 changes: 0 additions & 43 deletions test/project/example.gdextension

This file was deleted.

Loading
Loading