From: Thomas Petazzoni Date: Thu, 2 Nov 2017 21:57:02 +0000 (+0100) Subject: lua-sdl2: fix build without C++ compiler X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8161a2f5367534a92978dd455bd736ff3f630abf;p=buildroot.git lua-sdl2: fix build without C++ compiler lua-sdl2 CMakeLists.txt files did not explicitly indicate that it's a C-only project, and therefore CMake by default tries to find a C++ compiler, causing a build failure when none was available. This commit fixes that by adding a patch that adjusts the project() definitions in CMakeLists.txt. Fixes: http://autobuild.buildroot.net/results/45e39562a68c236c582861d410ee1a9924f2bfc5/ Signed-off-by: Thomas Petazzoni --- diff --git a/package/lua-sdl2/0002-CMakeLists-do-not-require-C.patch b/package/lua-sdl2/0002-CMakeLists-do-not-require-C.patch new file mode 100644 index 0000000000..eb03ca58ee --- /dev/null +++ b/package/lua-sdl2/0002-CMakeLists-do-not-require-C.patch @@ -0,0 +1,58 @@ +From 5732174debfe027f7620af55c283060201f0ad03 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Thu, 2 Nov 2017 22:54:51 +0100 +Subject: [PATCH] CMakeLists: do not require C++ + +The project doesn't use C++, so don't let CMake check for a C++ +compiler by explicitly specifying that this is a C-only project. + +Submitted-upstream: https://github.com/Tangent128/luasdl2/pull/69 +Signed-off-by: Thomas Petazzoni +--- + common/CMakeLists.txt | 2 +- + examples/CMakeLists.txt | 2 +- + tutorials/CMakeLists.txt | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt +index 9e19709..8cfb748 100644 +--- a/common/CMakeLists.txt ++++ b/common/CMakeLists.txt +@@ -15,7 +15,7 @@ + # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +-project(common) ++project(common C) + + set( + SOURCES +diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt +index 572b3b7..4e3af4d 100644 +--- a/examples/CMakeLists.txt ++++ b/examples/CMakeLists.txt +@@ -16,7 +16,7 @@ + # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + # + +-project(examples) ++project(examples C) + + # Option to enable / disable examples installation + option(WITH_DOCS "Installation of documentation and examples" On) +diff --git a/tutorials/CMakeLists.txt b/tutorials/CMakeLists.txt +index adefbc9..6ec069e 100644 +--- a/tutorials/CMakeLists.txt ++++ b/tutorials/CMakeLists.txt +@@ -16,7 +16,7 @@ + # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + # + +-project(tutorials) ++project(tutorials C) + + # Option to enable / disable examples installation + option(WITH_DOCS "Installation of tutorials" On) +-- +2.13.6 +