From 1d953c529e71045a90f9df588011bc2f91fc5552 Mon Sep 17 00:00:00 2001 From: Wook Song Date: Wed, 24 Oct 2018 13:21:12 +0900 Subject: [PATCH] [CMAKE] Set VERSION to use @VERSION@ in input file of config_file In order to reference variable values using '@VAR@' forms, VAR should be defined using the 'set' cmake command. However, 'instead of 'VERSION', since '-DVERSION' is defined using 'add_definitions', @VERSION@ could not be properly substitued. As a result, the 'Version' field in the pkg-config file for nnstreamer only contains a white space. This patch fixes this issue. Signed-off-by: Wook Song --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cec8aa6..e096631 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,8 @@ ELSE(SINGLE_BINARY) MESSAGE(STATUS "The nnstreamer elements will be created as multple plugin binaries, one binary for one element. This is no more the standard method to release since nnstreamer 0.0.3.") ENDIF(SINGLE_BINARY) -ADD_DEFINITIONS(-DVERSION="0.0.3") +SET(VERSION "0.0.3") +ADD_DEFINITIONS(-DVERSION="${VERSION}") SET(PREFIX ${CMAKE_INSTALL_PREFIX}) SET(EXEC_PREFIX "${PREFIX}/bin") -- 2.7.4