#18630: Enhance include/cmake.mk to better support out-of-source-dir builds
-------------------------+------------------------
Reporter: abecher22@… | Owner: developers
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: base system | Version: Trunk
Keywords: cmake |
-------------------------+------------------------
include/cmake.mk is difficult to use if a package wants to use an out-of-
source build. For example, the qpid-cpp and qpid-proton packages specify
that one should:
1. unpack the dist tarball
2. cd into the unpacked tree
3. mkdir bld
4. cd bld
5. cmake ..
include/cmake.mk doesn't handle that possibility very well. The preferred
solution is given in include/package-defaults.mk. The section:
define Build/Install/Default
$(MAKE_VARS) \
$(MAKE) -C $(PKG_BUILD_DIR)/$(MAKE_PATH) \
$(MAKE_INSTALL_FLAGS) \
$(if $(1), $(1), install);
endef
provides a much easier way for a package developer to integrate. In this
case, a package dev could simply code:
MAKE_PATH:=bld
define Build/Install
(cd $(PKG_BUILD_DIR)/$(MAKE_PATH); \
$(call Build/Install/Default,) \
)
endef
to integrate. IMHO, cmake.mk should follow that pattern for its
Build/Configure/Default.
--
Ticket URL: <https://dev.openwrt.org/ticket/18630>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets