Skip to content
Snippets Groups Projects
Commit 8062d1be authored by Giacomo Strangolino's avatar Giacomo Strangolino
Browse files
parents 05f6ee27 af68c77b
No related branches found
No related tags found
No related merge requests found
Makefile 0 → 100644
# Makefile
# Get the current working directory
CURRENT_DIR := $(shell pwd)
TMP_INSTALL_DIR=$(CURRENT_DIR)/tmp-install-dir
PREFIX ?= /runtime
CUMBIA_ROOT ?= /runtime
MKF_OUT=Makefile.qmake
export MAKE := $(MAKE)
# The default target when you run 'make'
all:
@qmake INSTALL_ROOT=$(TMP_INSTALL_DIR) prefix=$(PREFIX) -o $(MKF_OUT) && $(MAKE) -f $(MKF_OUT) \
&& $(MAKE) -f $(MKF_OUT) install
# The target when you run 'make install'
install:
@echo "[ Makefile ] installing from $(TMP_INSTALL_DIR) to $(PREFIX)"
@mkdir -p $(PREFIX)
@cp -rv $(TMP_INSTALL_DIR)/* $(PREFIX)
clean:
@rm -rf objs obj moc $(MKF_OUT) lib*.so.*
# Makefile
# Get the current working directory
CURRENT_DIR := $(shell pwd)
TMP_INSTALL_DIR=$(CURRENT_DIR)/tmp-install-dir
PREFIX ?= /runtime
CUMBIA_ROOT ?= /runtime
MKF_OUT=Makefile.qmake
export MAKE := $(MAKE)
# The default target when you run 'make'
all:
@qmake INSTALL_ROOT=$(TMP_INSTALL_DIR) prefix=$(PREFIX) -o $(MKF_OUT) && $(MAKE) -f $(MKF_OUT) \
&& $(MAKE) -f $(MKF_OUT) install
# The target when you run 'make install'
install:
@echo "[ Makefile ] installing from $(TMP_INSTALL_DIR) to $(PREFIX)"
@mkdir -p $(PREFIX)
@cp -rv $(TMP_INSTALL_DIR)/* $(PREFIX)
clean:
@rm -rf objs obj moc $(MKF_OUT) lib*.so.*
# Makefile
# Get the current working directory
CURRENT_DIR := $(shell pwd)
# Set default values for build_dir and install_prefix
BUILD_DIR := $(CURRENT_DIR)/build
TMP_INSTALL_DIR=$(CURRENT_DIR)/tmp-install-dir
PREFIX ?= /runtime
export MAKE := $(MAKE)
# The default target when you run 'make'
all:
@echo "[ Makefile ] build_dir=$(BUILD_DIR) install_prefix=$(PREFIX) jobs $(JOBS)"
mkdir -p $(BUILD_DIR); \
cd $(BUILD_DIR) && cmake .. -DCMAKE_INSTALL_PREFIX=$(TMP_INSTALL_DIR) -DCMAKE_PREFIX_PATH=$(PREFIX)/lib -DCMAKE_MODULE_PATH=$(PREFIX)/lib/cmake && $(MAKE) && $(MAKE) install
# The target when you run 'make install'
install:
@echo "[ Makefile ] installing from $(TMP_INSTALL_DIR) to $(PREFIX)"
@mkdir -p $(PREFIX)
@cp -rv $(TMP_INSTALL_DIR)/* $(PREFIX)
# Set the build_dir and install_prefix from the command line if provided
# Example: make build_dir=/custom/build install_prefix=/custom/install install
build:
@echo "[ Makefile ] build_dir=$(BUILD_DIR) and install_prefix=$(PREFIX)"
mkdir -p $(BUILD_DIR); \
cd $(BUILD_DIR) && cmake .. -DCMAKE_INSTALL_PREFIX=$(TMP_INSTALL_DIR) && $(MAKE) && $(MAKE) install
exists(../qumbia-plugins.pri/qumbia-plugins.pri) { isEmpty(INSTALL_ROOT) {
include(../qumbia-plugins.pri/qumbia-plugins.pri) INSTALL_ROOT = /usr/local/cumbia-libs
} else {
message("*")
message("* download qumbia-plugins.pri project into parent directory")
message("*")
message("> git clone https://gitlab.elettra.eu/cs/lib/cumbia/qumbia-plugins.pri ../qumbia-plugins.pri")
message("*")
error("* missing ../qumbia-plugins.pri/qumbia-plugins.pri file")
} }
isEmpty(prefix) {
exists($${INSTALL_ROOT}/include/quapps/quapps.pri) { prefix = $${INSTALL_ROOT}
include($${INSTALL_ROOT}/include/quapps/quapps.pri) }
isEmpty(CUMBIA_ROOT) {
CUMBIA_ROOT=$${prefix}
} }
include ($${INSTALL_ROOT}/include/cumbia-qtcontrols/cumbia-qtcontrols.pri) exists($${CUMBIA_ROOT}/include/cumbia-tango) {
INCLUDEPATH += $${CUMBIA_ROOT}/include/cumbia-tango
LIBS += -lcumbia-tango
} else {
error("cumbia-tango installation not found under $${CUMBIA_ROOT}")
}
QT += core gui exists($${CUMBIA_ROOT}/include/quapps/quapps.pri) {
include ($${CUMBIA_ROOT}/include/quapps/quapps.pri)
} else {
error("cumbia-qtcontrols installation not found under $${CUMBIA_ROOT}")
}
TARGET = actions-extension-plugin isEmpty(INSTALL_ROOT) {
TEMPLATE = lib INSTALL_ROOT = /usr/local/cumbia-libs
CONFIG += plugin }
isEmpty(buildtype) { isEmpty(buildtype) {
buildtype = release buildtype = release
} else { } else {
equals(buildtype, debug) { equals(buildtype, debug) {
message("")
message("debug build") message("debug build")
message("")
} }
} }
CONFIG += $${buildtype} MAKEFILE=Makefile.qmake
TEMPLATE = lib
CONFIG += plugin $${buildtype}
QT += core gui
QUMBIA_PLUGINS_INCLUDES=$${INSTALL_ROOT}/include/qumbia-plugins
QUMBIA_PLUGINS_SHARE=$${INSTALL_ROOT}/share/qumbia-plugins
QUMBIA_PLUGINS_LIBDIR=$${INSTALL_ROOT}/lib/qumbia-plugins
QUMBIA_PLUGINS_DOCDIR=$${INSTALL_ROOT}/share/doc/qumbia-plugins
INC_DIR = $${QUMBIA_PLUGINS_INCLUDES}
SHAREDIR = $${QUMBIA_PLUGINS_SHARE}
PLUGIN_LIB_DIR = $${QUMBIA_PLUGINS_LIBDIR}
DESTDIR = plugins
DEFINES += CUMBIAQTCONTROLS_HAS_QWT=1
!isEmpty(docs) {
DOC_DIR = $${QUMBIA_PLUGINS_DOCDIR}
doc.commands = \
doxygen \
Doxyfile;
doc.files = doc/*
doc.path = $${DOC_DIR}
QMAKE_EXTRA_TARGETS += doc
INSTALLS += doc
}
else {
message("call qmake docs=1 to generate and install docs")
}
DEFINES_QUMBIA_PLUGINS_LIBDIR = $${prefix}/lib/qumbia-plugins
# added by cumbia-qtcontrols.pri, not included by this file
#
DEFINES += \
CUMBIA_QTCONTROLS_PLUGIN_DIR=\"\\\"$${DEFINES_QUMBIA_PLUGINS_LIBDIR}\\\"\" \
SOURCES += \ SOURCES += \
src/actionextensions.cpp \ src/actionextensions.cpp \
...@@ -54,10 +94,12 @@ HEADERS += \ ...@@ -54,10 +94,12 @@ HEADERS += \
src/engineswitchdialogextension.h src/engineswitchdialogextension.h
DISTFILES += actions-extension.json DISTFILES += actions-extension.json
inc.files += $${HEADERS}
unix.INCLUDEPATH += src unix.INCLUDEPATH += src
TARGET = actions-extension-plugin
target.path = $${PLUGIN_LIB_DIR}
inc.files += $${HEADERS}
inc.path = $${INC_DIR}
# qumbia-plugins.pri defines default INSTALLS for target inc and doc INSTALLS += target inc
# doc commands, target.path and inc.path are defined there as well.
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include <quapps.h> #include <quapps.h>
#include <cucontexti.h> #include <cucontexti.h>
#include <cucontext.h> #include <cucontext.h>
#include <cumbiatango.h>
#include <cuengine_swap.h> #include <cuengine_swap.h>
class CuEngineSwitchDialogPrivate { class CuEngineSwitchDialogPrivate {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment