Modify

Opened 3 years ago

#18630 new enhancement

Enhance include/cmake.mk to better support out-of-source-dir builds

Reported by: abecher22@… Owned by: developers
Priority: normal Milestone:
Component: base system Version: Trunk
Keywords: cmake Cc:

Description

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.

Attachments (0)

Change History (0)

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.