Private
Public Access
2
0

CMakeLists.txt: add BUILDCPP option

C++ is a mandatory dependency since version 1.4.0 and
122cab1f1e

As a result, build on embedded toolchains that do not support C++ fails
on:

CMake Error at CMakeLists.txt:2 (project):
  The CMAKE_CXX_COMPILER:

    /home/naourr/work/instance-1/output-1/per-package/mraa/host/bin/arm-linux-g++

  is not a full path to an existing compiler tool.

Fixes:
 - http://autobuild.buildroot.org/results/31086422e03611c16ab59c4418e3669b580bc0c0

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
This commit is contained in:
Fabrice Fontaine
2020-06-13 22:51:37 +02:00
committed by Propanu
parent d74b0d8a73
commit cb88e4dd1f
3 changed files with 58 additions and 47 deletions

View File

@@ -16,7 +16,9 @@ include_directories (
set_source_files_properties (mraajava.i PROPERTIES SWIG_FLAGS ";-package;mraa;-I${CMAKE_BINARY_DIR}/src")
set_source_files_properties (mraajava.i PROPERTIES CPLUSPLUS ON)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive -DJAVACALLBACK")
if (BUILDCPP)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive -DJAVACALLBACK")
endif()
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DJAVACALLBACK")
if (NOT DEFINED ENV{JAVA_HOME_NATIVE})