[flutter] Fix Windows/Linux build

This commit is contained in:
badlogic 2022-08-15 10:14:50 +02:00
parent 075ed81426
commit 5c9c204fe5
3 changed files with 10 additions and 3 deletions

View File

@ -33,6 +33,9 @@
#include <spine/SpineObject.h>
#include <string.h>
// Needed for older MSVC versions
#undef min
#undef max
namespace spine {

View File

@ -6,4 +6,5 @@ pushd $dir > /dev/null
# all source files to be under the same folder hierarchy the podspec file resides in.
cp -r ../spine-cpp/spine-cpp ios/Classes
cp -r ../spine-cpp/spine-cpp macos/Classes
cp -r ../spine-cpp/spine-cpp src
popd

View File

@ -3,15 +3,18 @@
# the plugin to fail to compile for some customers of the plugin.
cmake_minimum_required(VERSION 3.10)
project(spine_flutter_library VERSION 0.0.1 LANGUAGES C)
project(spine_flutter_library VERSION 0.0.1)
file(GLOB SPINE_SOURCES "spine-cpp/src/**/*.cpp")
add_library(spine_flutter SHARED
"spine_flutter.c"
"spine_flutter.cpp"
${SPINE_SOURCES}
)
set_target_properties(spine_flutter PROPERTIES
PUBLIC_HEADER spine_flutter.h
OUTPUT_NAME "spine_flutter"
)
target_include_directories(spine_flutter PUBLIC spine-cpp/include)
target_compile_definitions(spine_flutter PUBLIC DART_SHARED_LIB)