|
|
|
#!/usr/bin/make -f
|
|
|
|
|
|
|
|
BUILD_FLAGS_FILE = build-flags.cmake
|
|
|
|
set_build_flag = echo 'set($(1) $(2) CACHE \
|
|
|
|
$(if $(filter $(2),YES ON TRUE NO OFF FALSE),BOOL,STRING) \
|
|
|
|
$(or $(3),"") FORCE)' >> $(BUILD_FLAGS_FILE)
|
|
|
|
|
|
|
|
$(BUILD_FLAGS_FILE):
|
|
|
|
touch $@
|
|
|
|
$(call $(flag_action),CMAKE_SKIP_RPATH,ON,"Skip rpath")
|
|
|
|
$(call $(flag_action),CMAKE_USE_RELATIVE_PATHS,ON,"Use relative paths")
|
|
|
|
$(call $(flag_action),CMAKE_VERBOSE_MAKEFILE,ON,"Verbose build")
|
|
|
|
$(call $(flag_action),CMAKE_C_FLAGS,"$(CFLAGS)","C flags")
|
|
|
|
$(call $(flag_action),CMAKE_CXX_FLAGS,"$(CFLAGS)","C++ flags")
|
|
|
|
$(call $(flag_action),CMAKE_SKIP_BOOTSTRAP_TEST,ON,"Skip BootstrapTest")
|
|
|
|
$(call $(flag_action),BUILD_WXDialog,ON,"Build WXDialog")
|
|
|
|
$(call $(flag_action),BUILD_CursesDialog,ON,"Build curses GUI")
|
|
|
|
$(call $(flag_action),BUILD_QtDialog,ON,"Build Qt4 GUI")
|
|
|
|
# $(call $(flag_action),TARGET_VERSION)
|
|
|
|
# $(call $(flag_action),TARGET_SOVERSION)
|
|
|
|
# $(call $(flag_action),BUILD_DOCUMENTATION,ON)
|
|
|
|
# $(call $(flag_action),BUILD_DOXYGEN,ON)
|
|
|
|
$(call $(flag_action),CMAKE_USE_SYSTEM_LIBARCHIVE,ON)
|
|
|
|
$(call $(flag_action),CTEST_USE_XMLRPC,ON)
|
|
|
|
|
|
|
|
$(BUILD_FLAGS_FILE): flag_action := set_build_flag
|
|
|
|
|
|
|
|
override_dh_auto_configure: $(BUILD_FLAGS_FILE)
|
|
|
|
rm -rf Build && mkdir -p Build
|
|
|
|
+cd Build && ../bootstrap --prefix=/usr --docdir=/share/doc/cmake --mandir=/share/man \
|
|
|
|
--init=../$(BUILD_FLAGS_FILE) --system-libs $(CONFIGURE_PARALLEL)
|
|
|
|
|
|
|
|
override_dh_auto_test:
|
|
|
|
HOME="`pwd`/Build" dh_auto_test
|
|
|
|
|
|
|
|
override_dh_auto_clean:
|
|
|
|
dh_auto_clean
|
|
|
|
rm -f $(BUILD_FLAGS_FILE)
|
|
|
|
|
|
|
|
override_dh_installdocs:
|
|
|
|
dh_installdocs --link-doc=cmake-data
|
|
|
|
|
|
|
|
%:
|
|
|
|
dh $@ --parallel --builddirectory=Build --dbg-package=cmake-dbg
|
|
|
|
|
|
|
|
.PHONY: override_dh_auto_configure override_dh_auto_clean
|