All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] openjpeg: fix build without C++ support
@ 2017-09-23 17:18 Peter Korsgaard
  2017-09-23 17:21 ` Arnout Vandecappelle
  2017-09-24  7:04 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Peter Korsgaard @ 2017-09-23 17:18 UTC (permalink / raw)
  To: buildroot

Fixes:
http://autobuild.buildroot.net/results/e2f/e2ff0a7fa2b911157edf6c43a8eed797b22edd46/
http://autobuild.buildroot.net/results/670/6706339e7df2f2e7d0d7a15663bed185ca55c2a1/

Openjpeg is written in C, but with the move to CMake the build system now
errors out if a C++ compiler isn't available.  Fix it by patching the
CMakeLists.txt to not require C++ support.

Patch submitted upstream:
https://github.com/uclouvain/openjpeg/pull/1027

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 ...CMakeLists.txt-Don-t-require-a-C-compiler.patch | 34 ++++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 package/openjpeg/0004-CMakeLists.txt-Don-t-require-a-C-compiler.patch

diff --git a/package/openjpeg/0004-CMakeLists.txt-Don-t-require-a-C-compiler.patch b/package/openjpeg/0004-CMakeLists.txt-Don-t-require-a-C-compiler.patch
new file mode 100644
index 0000000000..13cceef195
--- /dev/null
+++ b/package/openjpeg/0004-CMakeLists.txt-Don-t-require-a-C-compiler.patch
@@ -0,0 +1,34 @@
+From 786ddcd1475adc6193c59d53e0d8ed2c502f2b00 Mon Sep 17 00:00:00 2001
+From: Peter Korsgaard <peter@korsgaard.com>
+Date: Sat, 23 Sep 2017 18:49:31 +0200
+Subject: [PATCH] CMakeLists.txt: Don't require a C++ compiler
+
+By default, CMake assumes that the project is using both C and C++.  By
+explicitly passing 'C' as argument of the project() macro, we tell CMake
+that only C is used, which prevents CMake from erroring out if a C++
+compiler doesn't exist.
+
+Submitted upstream:
+https://github.com/uclouvain/openjpeg/pull/1027
+
+Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ec42bc99..d80eb48b 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -24,7 +24,7 @@ endif()
+ #string(TOLOWER ${OPENJPEG_NAMESPACE} OPENJPEG_LIBRARY_NAME)
+ set(OPENJPEG_LIBRARY_NAME openjp2)
+ 
+-project(${OPENJPEG_NAMESPACE})
++project(${OPENJPEG_NAMESPACE} C)
+ 
+ # Do full dependency headers.
+ include_regular_expression("^.*$")
+-- 
+2.11.0
+
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] openjpeg: fix build without C++ support
  2017-09-23 17:18 [Buildroot] [PATCH] openjpeg: fix build without C++ support Peter Korsgaard
@ 2017-09-23 17:21 ` Arnout Vandecappelle
  2017-09-24  7:04 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Arnout Vandecappelle @ 2017-09-23 17:21 UTC (permalink / raw)
  To: buildroot



On 23-09-17 19:18, Peter Korsgaard wrote:
> Fixes:
> http://autobuild.buildroot.net/results/e2f/e2ff0a7fa2b911157edf6c43a8eed797b22edd46/
> http://autobuild.buildroot.net/results/670/6706339e7df2f2e7d0d7a15663bed185ca55c2a1/
> 
> Openjpeg is written in C, but with the move to CMake the build system now
> errors out if a C++ compiler isn't available.  Fix it by patching the
> CMakeLists.txt to not require C++ support.
> 
> Patch submitted upstream:
> https://github.com/uclouvain/openjpeg/pull/1027
> 
> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>

 Applied to master, thanks.

 Regards,
 Arnout

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] openjpeg: fix build without C++ support
  2017-09-23 17:18 [Buildroot] [PATCH] openjpeg: fix build without C++ support Peter Korsgaard
  2017-09-23 17:21 ` Arnout Vandecappelle
@ 2017-09-24  7:04 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2017-09-24  7:04 UTC (permalink / raw)
  To: buildroot

>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:

 > Fixes:
 > http://autobuild.buildroot.net/results/e2f/e2ff0a7fa2b911157edf6c43a8eed797b22edd46/
 > http://autobuild.buildroot.net/results/670/6706339e7df2f2e7d0d7a15663bed185ca55c2a1/

 > Openjpeg is written in C, but with the move to CMake the build system now
 > errors out if a C++ compiler isn't available.  Fix it by patching the
 > CMakeLists.txt to not require C++ support.

 > Patch submitted upstream:
 > https://github.com/uclouvain/openjpeg/pull/1027

 > Signed-off-by: Peter Korsgaard <peter@korsgaard.com>

Committed to 2017.02.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-09-24  7:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-23 17:18 [Buildroot] [PATCH] openjpeg: fix build without C++ support Peter Korsgaard
2017-09-23 17:21 ` Arnout Vandecappelle
2017-09-24  7:04 ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.