grp.add_option( '--enable-local-yasm', default=False, action='store_true', help=h )
h = IfHost( 'Build and use local autotools', '*-*-*', none=optparse.SUPPRESS_HELP ).value
grp.add_option( '--enable-local-autotools', default=False, action='store_true', help=h )
+ h = IfHost( 'Build and use local cmake', '*-*-*', none=optparse.SUPPRESS_HELP ).value
+ grp.add_option( '--enable-local-cmake', default=False, action='store_true', help=h )
h = IfHost( 'Build and use local pkg-config', '*-*-darwin*', none=optparse.SUPPRESS_HELP ).value
grp.add_option( '--enable-local-pkgconfig', default=False, action='store_true', help=h )
yasm = ToolProbe( 'YASM.exe', 'yasm', abort=False, minversion=[1,2,0] )
autoconf = ToolProbe( 'AUTOCONF.exe', 'autoconf', abort=False )
automake = ToolProbe( 'AUTOMAKE.exe', 'automake', abort=False )
+ cmake = ToolProbe( 'CMAKE.exe', 'cmake', abort=False )
libtool = ToolProbe( 'LIBTOOL.exe', 'libtool', abort=False )
pkgconfig = ToolProbe( 'PKGCONFIG.exe', 'pkg-config', abort=False )
stdout.write( 'note: enabling local autotools\n' )
options.enable_local_autotools = True
+ ## enable local cmake when cmake probe fails
+ if not options.enable_local_cmake and (Tools.cmake.fail):
+ stdout.write( 'note: enabling local cmake\n' )
+ options.enable_local_cmake = True
+
## enable local pkg-config when probe fails
if not options.enable_local_pkgconfig and Tools.pkgconfig.fail:
stdout.write( 'note: enabling local pkgconfig\n' )
doc.addBlank()
doc.add( 'FEATURE.local_yasm', int( options.enable_local_yasm ))
doc.add( 'FEATURE.local_autotools', int( options.enable_local_autotools ))
+ doc.add( 'FEATURE.local_cmake', int( options.enable_local_cmake ))
doc.add( 'FEATURE.local_pkgconfig', int( options.enable_local_pkgconfig ))
doc.add( 'FEATURE.asm', 'disabled' )
doc.add( 'FEATURE.gtk', int( not options.disable_gtk ))
MODULES += contrib/pkgconfig
endif
+HB_TOOLS_PATH =
+ifeq (1,$(FEATURE.local_cmake))
+ MODULES += contrib/cmake
+ HB_TOOLS_PATH = $(call fn.ABSOLUTE,$(CONTRIB.build/)bin)
+endif
+
ifeq (1,$(FEATURE.local_autotools))
MODULES += contrib/autoconf
MODULES += contrib/automake
MODULES += contrib/libtool
MODULES += contrib/m4
AUTOTOOL_MODULES = AUTOCONF AUTOMAKE LIBTOOL M4
- PATH := $(call fn.ABSOLUTE,$(CONTRIB.build/)bin):$(PATH)
+ HB_TOOLS_PATH = $(call fn.ABSOLUTE,$(CONTRIB.build/)bin)
else
AUTOTOOL_MODULES =
endif
+ifneq (,$(HB_TOOLS_PATH))
+ PATH := $(HB_TOOLS_PATH):$(PATH)
+endif
+
ifneq (,$(filter $(BUILD.system),cygwin mingw))
ifneq ($(HAS.bz2),1)
MODULES += contrib/bzip2