Skip to content

Commit

Permalink
[Build] nns-edge version info
Browse files Browse the repository at this point in the history
Update build script to set version info.

Signed-off-by: Jaeyun Jung <[email protected]>
  • Loading branch information
jaeyun-jung committed Dec 7, 2023
1 parent 863a42d commit 9239a0c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ LIST(GET VERSION_LIST 0 VERSION_MAJOR)
LIST(GET VERSION_LIST 1 VERSION_MINOR)
LIST(GET VERSION_LIST 2 VERSION_MICRO)

SET(NNS_EDGE_FLAGS "${NNS_EDGE_FLAGS} -DVERSION_MAJOR=${VERSION_MAJOR} -DVERSION_MINOR=${VERSION_MINOR} -DVERSION_MICRO=${VERSION_MICRO}")
SET(NNS_EDGE_FLAGS "${NNS_EDGE_FLAGS} -DVERSION=\"${VERSION}\" -DVERSION_MAJOR=${VERSION_MAJOR} -DVERSION_MINOR=${VERSION_MINOR} -DVERSION_MICRO=${VERSION_MICRO}")

# Set as-needed option
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--as-needed")
Expand Down
1 change: 1 addition & 0 deletions packaging/nnstreamer-edge.spec
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Summary: Common library set for nnstreamer-edge
# 1. CMake : ./CMakeLists.txt
# 2. Ubuntu : ./debian/changelog
# 3. Tizen : ./packaging/nnstreamer-edge.spec
# 4. TizenRT : ./tools/build_TizenRT/Makefile
Version: 0.2.5
Release: 1
Group: Machine Learning/ML Framework
Expand Down
11 changes: 9 additions & 2 deletions tools/build_TizenRT/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@
-include $(TOPDIR)/.config
-include $(TOPDIR)/Make.defs

# Set nnstreamer-edge version
VERSION = 0.2.5
VERSION_MAJOR = $(word 1,$(subst ., ,$(VERSION)))
VERSION_MINOR = $(word 2,$(subst ., ,$(VERSION)))
VERSION_MICRO = $(word 3,$(subst ., ,$(VERSION)))

ASRCS =
CSRCS = src/libnnstreamer-edge/nnstreamer-edge-data.c \
src/libnnstreamer-edge/nnstreamer-edge-event.c \
Expand All @@ -62,10 +68,11 @@ CSRCS = src/libnnstreamer-edge/nnstreamer-edge-data.c \
src/libnnstreamer-edge/nnstreamer-edge-queue.c \
src/libnnstreamer-edge/nnstreamer-edge-util.c

CFLAGS += -I ./include -DDEBUG=0
CFLAGS += -I./include -DDEBUG=0
CFLAGS += -DVERSION=\"$(VERSION)\" -DVERSION_MAJOR=$(VERSION_MAJOR) -DVERSION_MINOR=$(VERSION_MINOR) -DVERSION_MICRO=$(VERSION_MICRO)

ifeq ($(CONFIG_NETUTILS_MQTT),y)
CFLAGS += -I ../mosquitto
CFLAGS += -I../mosquitto -I../include/mosquitto
CFLAGS += -DENABLE_MQTT=1
CSRCS += src/libnnstreamer-edge/nnstreamer-edge-mqtt-mosquitto.c
endif
Expand Down

0 comments on commit 9239a0c

Please sign in to comment.