add a variable LIBRPC to refer to the external librpc if used
[openwrt.git] / include / cmake.mk
1 PKG_INSTALL:=1
2
3 MAKE_FLAGS+=VERBOSE=1
4
5 define Build/Configure/Default
6 (cd $(PKG_BUILD_DIR); \
7 CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
8 CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
9 cmake \
10 -DCMAKE_SYSTEM_NAME=Linux \
11 -DCMAKE_SYSTEM_VERSION=1 \
12 -DCMAKE_SYSTEM_PROCESSOR=$(ARCH) \
13 -DCMAKE_BUILD_TYPE=Release \
14 -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" \
15 -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \
16 -DCMAKE_C_COMPILER=$(TOOLCHAIN_DIR)/bin/$(TARGET_CC) \
17 -DCMAKE_CXX_COMPILER=$(TOOLCHAIN_DIR)/bin/$(TARGET_CXX) \
18 -DCMAKE_EXE_LINKER_FLAGS="$(TARGET_LDFLAGS)" \
19 -DCMAKE_MODULE_LINKER_FLAGS="$(TARGET_LDFLAGS)" \
20 -DCMAKE_SHARED_LINKER_FLAGS="$(TARGET_LDFLAGS)" \
21 -DCMAKE_FIND_ROOT_PATH=$(STAGING_DIR) \
22 -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=$(STAGING_DIR_HOST) \
23 -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=$(STAGING_DIR) \
24 -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=$(STAGING_DIR) \
25 -DCMAKE_STRIP=: \
26 -DCMAKE_INSTALL_PREFIX=/usr \
27 $(CMAKE_OPTIONS) \
28 . \
29 )
30 endef
31
32 define Build/InstallDev/cmake
33 $(INSTALL_DIR) $(1)
34 $(CP) $(PKG_INSTALL_DIR)/* $(1)/
35 endef
36
37 Build/InstallDev = $(if $(CMAKE_INSTALL),$(Build/InstallDev/cmake))
This page took 0.043218 seconds and 5 git commands to generate.