summaryrefslogtreecommitdiffstats
path: root/package/Makefile.in
diff options
context:
space:
mode:
authorBjørn Forsman <bjorn.forsman@gmail.com>2011-01-26 22:18:42 +0100
committerPeter Korsgaard <jacmet@sunsite.dk>2011-01-26 23:22:32 +0100
commit73144a6e02a67f9e7da276cd35c9d146e187653a (patch)
tree1b38a45bfc7d7b016524d774bc8c4209112717ce /package/Makefile.in
parent0fa46e59db087478b4844b2358a496eacdef7569 (diff)
downloadbuildroot-novena-73144a6e02a67f9e7da276cd35c9d146e187653a.tar.gz
buildroot-novena-73144a6e02a67f9e7da276cd35c9d146e187653a.zip
Makefile: generate CMake toolchain-file in $(O)
A CMake toolchain-file makes it easy to develop CMake-based packages outside of Buildroot. Just give the toolchain-file to CMake via the -DCMAKE_TOOLCHAIN_FILE=... option. Signed-off-by: Bjørn Forsman <bjorn.forsman@gmail.com> Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/Makefile.in')
-rw-r--r--package/Makefile.in8
1 files changed, 8 insertions, 0 deletions
diff --git a/package/Makefile.in b/package/Makefile.in
index 644eb1f47..599f68494 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -143,6 +143,14 @@ TARGET_CC := $(CCACHE) $(TARGET_CC)
TARGET_CXX := $(CCACHE) $(TARGET_CXX)
endif
+# * CMake doesn't support having the --sysroot option directly in the
+# compiler path, so move this option to CFLAGS/CXXFLAGS variables.
+# * Don't use ccache because then CMake will fail to detect compiler.
+CMAKE_TARGET_CC = $(filter-out --sysroot=%,$(TARGET_CC_NOCCACHE))
+CMAKE_TARGET_CXX = $(filter-out --sysroot=%,$(TARGET_CXX_NOCCACHE))
+CMAKE_TARGET_CFLAGS = $(filter --sysroot=%,$(TARGET_CC_NOCCACHE)) $(TARGET_CFLAGS)
+CMAKE_TARGET_CXXFLAGS = $(filter --sysroot=%,$(TARGET_CXX_NOCCACHE)) $(TARGET_CXXFLAGS)
+
ifeq ($(BR2_STRIP_strip),y)
STRIP_DISCARD_ALL:=--discard-all
STRIP_STRIP_UNNEEDED:=--strip-unneeded