From b6e97c169e7be2140e7d23827070a7e2e8838bd7 Mon Sep 17 00:00:00 2001 From: Joakim Roubert Date: Tue, 29 Oct 2024 14:04:12 +0100 Subject: [PATCH] Minor build improvements Change-Id: I9fb0f90dd60a2c9b758cd6c88ea0ba2d80d68345 Signed-off-by: Joakim Roubert --- Dockerfile | 4 ++-- Makefile | 4 ++-- README.md | 2 +- manifest.json | 2 +- src/opcuaserver.cpp | 4 +++- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index f9de08a..2c03746 100644 --- a/Dockerfile +++ b/Dockerfile @@ -107,11 +107,11 @@ WORKDIR "$OPEN62541_BUILD_DIR" RUN . /opt/axis/acapsdk/environment-setup* && \ cmake -j \ -DCMAKE_INSTALL_PREFIX="$SDKTARGETSYSROOT"/usr \ - -DBUILD_BUILD_EXAMPLES=OFF \ + -DCMAKE_BUILD_TYPE=Release \ -DBUILD_SHARED_LIBS=ON \ -DUA_ENABLE_NODEMANAGEMENT=ON \ "$OPEN62541_SRC_DIR" -RUN make -j install +RUN make -j "$(nproc)" install # Copy the built library files to application directory WORKDIR "$ACAP_BUILD_DIR"/lib diff --git a/Makefile b/Makefile index 4508ce1..3e8860a 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ CXXFLAGS += $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config --cflags-only- LDLIBS += $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config --libs $(PKGS)) CXXFLAGS += -I$(SDKTARGETSYSROOT)/usr/include/opencv4 -I$(CURDIR)/include -LDFLAGS = -L./lib -Wl,--no-as-needed,-rpath,'$$ORIGIN/lib' +LDFLAGS = -L./lib -Wl,--no-as-needed,-rpath,'$$ORIGIN/lib' -flto=auto LDLIBS += -lm -lopencv_core -lopencv_imgproc -lopencv_video -lpthread # Set DEBUG_WRITE to write debug images to storage @@ -29,7 +29,7 @@ $(TARGET): $(OBJECTS) # docker build container targets %.eap: - DOCKER_BUILDKIT=1 docker build $(DOCKER_ARGS) --build-arg ARCH=$(basename $@) -o type=local,dest=. "$(CURDIR)" + DOCKER_BUILDKIT=1 docker build $(DOCKER_ARGS) --build-arg ARCH=$(*F) -o type=local,dest=. "$(CURDIR)" dockerbuild: armv7hf.eap aarch64.eap diff --git a/README.md b/README.md index 93a26a8..1517306 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # OPC UA Color Checker ACAP -[![Build ACAPs](https://github.com/AxisCommunications/opc-ua-colorchecker-acap/actions/workflows/build.yml/badge.svg)](https://github.com/AxisCommunications/opc-ua-colorchecker-acap/actions/workflows/build.yml) +[![Build ACAP packages](https://github.com/AxisCommunications/opc-ua-colorchecker-acap/actions/workflows/build.yml/badge.svg)](https://github.com/AxisCommunications/opc-ua-colorchecker-acap/actions/workflows/build.yml) [![GitHub Super-Linter](https://github.com/AxisCommunications/opc-ua-colorchecker-acap/actions/workflows/super-linter.yml/badge.svg)](https://github.com/AxisCommunications/opc-ua-colorchecker-acap/actions/workflows/super-linter.yml) This repository contains the source code to build a small example diff --git a/manifest.json b/manifest.json index 6cfbd98..bf58bf1 100644 --- a/manifest.json +++ b/manifest.json @@ -12,7 +12,7 @@ }, "vendorUrl": "https://www.axis.com/", "runMode": "respawn", - "version": "1.1.0" + "version": "1.1.1" }, "configuration": { "settingPage": "settings.html", diff --git a/src/opcuaserver.cpp b/src/opcuaserver.cpp index 0e1632f..7a30128 100644 --- a/src/opcuaserver.cpp +++ b/src/opcuaserver.cpp @@ -14,8 +14,10 @@ * limitations under the License. */ -#include "opcuaserver.hpp" +#include + #include "common.hpp" +#include "opcuaserver.hpp" using namespace std;