summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--contrib/cmake/module.defs9
-rw-r--r--contrib/cmake/module.rules2
-rw-r--r--contrib/x265/module.defs3
-rw-r--r--make/configure.py9
-rw-r--r--make/include/gcc.defs2
-rw-r--r--make/include/main.defs12
6 files changed, 34 insertions, 3 deletions
diff --git a/contrib/cmake/module.defs b/contrib/cmake/module.defs
new file mode 100644
index 000000000..c4f0ddf68
--- /dev/null
+++ b/contrib/cmake/module.defs
@@ -0,0 +1,9 @@
+$(eval $(call import.MODULE.defs,CMAKE,cmake))
+$(eval $(call import.CONTRIB.defs,CMAKE))
+
+CMAKE.FETCH.url = http://download.handbrake.fr/handbrake/contrib/cmake-3.0.1.tar.gz
+
+CMAKE.CONFIGURE.deps =
+CMAKE.CONFIGURE.shared =
+CMAKE.CONFIGURE.static =
+CMAKE.CONFIGURE.extra = --no-qt-gui
diff --git a/contrib/cmake/module.rules b/contrib/cmake/module.rules
new file mode 100644
index 000000000..fb046bdb9
--- /dev/null
+++ b/contrib/cmake/module.rules
@@ -0,0 +1,2 @@
+$(eval $(call import.MODULE.rules,CMAKE))
+$(eval $(call import.CONTRIB.rules,CMAKE))
diff --git a/contrib/x265/module.defs b/contrib/x265/module.defs
index 89e7171bf..33d73625c 100644
--- a/contrib/x265/module.defs
+++ b/contrib/x265/module.defs
@@ -1,4 +1,5 @@
-$(eval $(call import.MODULE.defs,X265,x265,YASM))
+__deps__ := YASM CMAKE
+$(eval $(call import.MODULE.defs,X265,x265,$(__deps__)))
$(eval $(call import.CONTRIB.defs,X265))
X265.FETCH.url = http://download.handbrake.fr/contrib/x265-7246-d6257335c537-1.2.tar.bz2
diff --git a/make/configure.py b/make/configure.py
index 571093e24..89a1edec6 100644
--- a/make/configure.py
+++ b/make/configure.py
@@ -1248,6 +1248,8 @@ def createCLI():
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 )
@@ -1419,6 +1421,7 @@ try:
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 )
@@ -1492,6 +1495,11 @@ try:
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' )
@@ -1660,6 +1668,7 @@ int main ()
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 ))
diff --git a/make/include/gcc.defs b/make/include/gcc.defs
index e6695c329..b27c4a6ce 100644
--- a/make/include/gcc.defs
+++ b/make/include/gcc.defs
@@ -83,7 +83,7 @@ GCC.args.extra.exe++ = $(LDFLAGS)
define import.GCC
$(1).GCC.gcc = $$(GCC.gcc)
- $(1).GCC.gxx = $$(dir $$($(1).GCC.gcc))$$(subst gcc,g++,$$(notdir $$($(1).GCC.gcc)))
+ $(1).GCC.gxx = $$(dir $$($(1).GCC.gcc))$$(subst clang,clang++,$$(subst gcc,g++,$$(notdir $$($(1).GCC.gcc))))
$(1).GCC.pipe = $$(GCC.pipe)
$(1).GCC.c_std = $$(GCC.c_std)
diff --git a/make/include/main.defs b/make/include/main.defs
index 504d814cc..a6ea8a4cd 100644
--- a/make/include/main.defs
+++ b/make/include/main.defs
@@ -12,17 +12,27 @@ ifeq (1,$(FEATURE.local_pkgconfig))
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