# @author Dariusz Michaluk <d.michaluk@samsung.com>
# @author Jaroslaw Pelczar <j.pelczar@samsung.com>
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-
-##### Configure project version when using
-##### outdated tools like CMake v2
-
-IF(POLICY CMP0048)
- CMAKE_POLICY(SET CMP0048 NEW)
-ENDIF()
-
-IF(CMAKE_VERSION VERSION_LESS 3.0)
- PROJECT(device-certificate-manager CXX C)
- SET(PROJECT_VERSION "2.0")
-ELSE()
- PROJECT(device-certificate-manager VERSION 2.0 LANGUAGES C CXX)
-ENDIF()
+CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
+PROJECT(device-certificate-manager VERSION 2.0 LANGUAGES C CXX)
INCLUDE(GNUInstallDirs)
INCLUDE(FindPkgConfig)
SET_PROPERTY(TARGET ${TARGET_CLIENT} APPEND PROPERTY LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/version_script.lds")
SET_TARGET_PROPERTIES(${TARGET_CLIENT}
PROPERTIES
- VERSION 2.0
+ VERSION ${PROJECT_VERSION}
DEFINE_SYMBOL DEVICE_CERTIFICATE_MANAGER_EXPORT
VISIBILITY_INLINES_HIDDEN TRUE
C_VISIBILITY_PRESET hidden
cp -a %{SOURCE1001} .
%build
-%cmake . -DVERSION=%{version} \
- -DCMAKE_BUILD_TYPE=%{?build_type:%build_type}%{!?build_type:Release} \
+%cmake . -DCMAKE_BUILD_TYPE=%{?build_type:%build_type}%{!?build_type:Release} \
-DSYSTEMD_UNIT_DIR=%{_unitdir} \
-DUSER_NAME=%{user_name} \
-DGROUP_NAME=%{group_name} \
Name: device-certificate-manager-backend
Description: Device Certificate Manager Backend Package
-Version: @VERSION@
+Version: @PROJECT_VERSION@
Requires: iotivity
Cflags: -I${includedir}/device-certificate-manager-backend
Name: device-certificate-manager
Description: Device Certificate Manager Package
-Version: @VERSION@
+Version: @PROJECT_VERSION@
Libs: -L${libdir} -ldevice-certificate-manager
Cflags: -I${includedir}/device-certificate-manager