Change cmake to build cynara-tests only when enabled and enable it in spec
file. This will enable cynara build outside of Tizen (without tests).
Current setup for cynara-tests build depends on Tizen-specific packaging of
gmock package. This dependency cannot be met outside of Tizen, which would
break the whole build.
It is not easy to apply a proper fix to have cynara-tests built outside of
Tizen. Gmock is not meant to be used as dependency in such way.
Most certainly we will have to handle gmock dependency differently in
upstream and in Tizen.
Change-Id: Id9fc8142979d1a2061c1c72c610520479d9e61a2
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
SET(TARGET_LIB_SESSION "cynara-session")
ADD_SUBDIRECTORY(src)
-ADD_SUBDIRECTORY(test)
ADD_SUBDIRECTORY(pkgconfig)
ADD_SUBDIRECTORY(systemd)
+
+IF (BUILD_TESTS)
+ADD_SUBDIRECTORY(test)
+ENDIF()
export LDFLAGS+="-Wl,--rpath=%{_libdir}"
%cmake . \
+ -DBUILD_TESTS=ON \
-DCMAKE_BUILD_TYPE=%{?build_type} \
-DCMAKE_VERBOSE_MAKEFILE=ON
make %{?jobs:-j%jobs}