From 679b1d9c6c87fe46d927191a4581066524935f22 Mon Sep 17 00:00:00 2001 From: badlogic Date: Fri, 9 Jul 2021 17:29:42 +0200 Subject: [PATCH] [cpp] Force c++11 on spine-cpp Cmake build, closes #1922 --- spine-cpp/CMakeLists.txt | 9 +++++++++ spine-cpp/README.md | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/spine-cpp/CMakeLists.txt b/spine-cpp/CMakeLists.txt index 92f355180..e008c339e 100644 --- a/spine-cpp/CMakeLists.txt +++ b/spine-cpp/CMakeLists.txt @@ -1,3 +1,12 @@ +if(MSVC) + message("MSCV detected") + set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") + set (CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS}") +else() + set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic -std=c89") + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wnon-virtual-dtor -pedantic -std=c++11 -fno-exceptions -fno-rtti") +endif() + include_directories(include) file(GLOB INCLUDES "spine-cpp/include/**/*.h") file(GLOB SOURCES "spine-cpp/src/**/*.cpp") diff --git a/spine-cpp/README.md b/spine-cpp/README.md index 186793c3b..1f0773e86 100644 --- a/spine-cpp/README.md +++ b/spine-cpp/README.md @@ -1,6 +1,6 @@ # spine-cpp -The spine-cpp runtime provides basic functionality to load and manipulate [spine](http://esotericsoftware.com) skeletal animation data using C++. It does not perform rendering but can be extended to enable spine animations for other projects that utilize C++. Note, this library uses C++03 for maximum portability and therefore does not take advantage of any C++11 or newer features such as std::unique_ptr. +The spine-cpp runtime provides basic functionality to load and manipulate [spine](http://esotericsoftware.com) skeletal animation data using C++. It does not perform rendering but can be extended to enable spine animations for other projects that utilize C++. ## Licensing