From 73144a6e02a67f9e7da276cd35c9d146e187653a Mon Sep 17 00:00:00 2001 From: Bjørn Forsman Date: Wed, 26 Jan 2011 22:18:42 +0100 Subject: Makefile: generate CMake toolchain-file in $(O) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Acked-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- package/Makefile.in | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'package/Makefile.in') 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 -- cgit v1.2.3