Source1001: cynara.manifest
Source1002: libcynara-client.manifest
Source1003: libcynara-admin.manifest
+Source1004: cynara-tests.manifest
BuildRequires: cmake
BuildRequires: zip
BuildRequires: pkgconfig(libsystemd-daemon)
%description -n cynara-devel
service (devel version)
+#######################################################
+%package -n cynara-tests
+Summary: Cynara tests
+BuildRequires: pkgconfig(gmock)
+
+%description -n cynara-tests
+cynara tests
+
+
%prep
%setup -q
cp -a %{SOURCE1001} .
cp -a %{SOURCE1002} .
cp -a %{SOURCE1003} .
+cp -a %{SOURCE1004} .
%build
%if 0%{?sec_build_binary_debug_enable}
%{_includedir}/cynara/cynara-admin.h
%{_libdir}/pkgconfig/cynara-admin.pc
%{_libdir}/libcynara-admin.so
+
+%files -n cynara-tests
+%manifest cynara-tests.manifest
+%attr(755,root,root) /usr/bin/cynara-tests
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.3)
PROJECT("cynara-tests")
-ADD_SUBDIRECTORY(${GMOCK_DIR} gmock)
+PKG_CHECK_MODULES(PKGS REQUIRED gmock_main)
+
+SET(CYNARA_SRC ${PROJECT_SOURCE_DIR}/../src)
SET(CYNARA_SOURCES_FOR_TESTS
${CYNARA_SRC}/service/storage/Storage.cpp
)
INCLUDE_DIRECTORIES(
- ${GMOCK_DIR}/include
- ${GMOCK_DIR}/gtest/include
+ ${PKGS_INCLUDE_DIRS}
${CYNARA_SRC}
${CYNARA_SRC}/common
${CYNARA_SRC}/include
TARGET_LINK_LIBRARIES(cynara-tests
${CMAKE_THREAD_LIBS_INIT}
- gmock gtest_main
+ ${PKGS_LDFLAGS} ${PKGS_LIBRARIES}
)
+
+INSTALL(TARGETS cynara-tests DESTINATION bin)