From: Hwankyu Jhun Date: Wed, 10 Apr 2019 02:01:23 +0000 (+0900) Subject: Change package name X-Git-Tag: submit/tizen/20190411.012356~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a04acd9fe8a2b7789c4b57cd8ca1dca1f732a49b;p=platform%2Fcore%2Fapi%2Fapp-control.git Change package name The unittests package name is changed to "capi-appfw-app-control-unittests". The unittests executable file is changed to "appctrl_unittests". Change-Id: Id963d05d50bf20910ec6f0cee2e83d7b63049295 Signed-off-by: Hwankyu Jhun --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 7cae589..cfb1bde 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,7 +13,7 @@ INSTALL( IF(NOT DEFINED MINIMUM_BUILD) ENABLE_TESTING() -SET(UNITTESTS unittests) +SET(UNITTESTS appctrl_unittests) ADD_TEST(NAME ${UNITTESTS} COMMAND ${UNITTESTS} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/unit_tests) diff --git a/packaging/capi-appfw-app-control.spec b/packaging/capi-appfw-app-control.spec index c0ecd1b..03d01cf 100644 --- a/packaging/capi-appfw-app-control.spec +++ b/packaging/capi-appfw-app-control.spec @@ -12,13 +12,13 @@ BuildRequires: pkgconfig(bundle) BuildRequires: pkgconfig(aul) BuildRequires: pkgconfig(capi-base-common) BuildRequires: pkgconfig(appcore-common) -Recommends: amd-mod-share BuildRequires: pkgconfig(gmock) %if 0%{?gcov:1} BuildRequires: lcov BuildRequires: zip %endif +Recommends: amd-mod-share %description An Application Control library in Tizen C API @@ -34,12 +34,12 @@ An Application Control library in Tizen C API (Development) package. ################################################# # unittests ################################################# -%package -n unittests +%package unittests Summary: GTest for uri Group: Development/Libraries Requires: %{name} -%description -n unittests +%description unittests GTest for app_control ################################################# @@ -96,9 +96,9 @@ install -m 0644 app_control.zip %{buildroot}%{_datadir}/gcov/app_control.zip %post -p /sbin/ldconfig %postun -p /sbin/ldconfig -%post -n unittests +%post unittests %if 0%{?gcov:1} -%{_bindir}/unittests +%{_bindir}/appctrl_unittests %endif %files @@ -119,8 +119,8 @@ install -m 0644 app_control.zip %{buildroot}%{_datadir}/gcov/app_control.zip ################################################# # unittests ################################################# -%files -n unittests -%{_bindir}/unittests +%files unittests +%{_bindir}/appctrl_unittests ################################################# # uri-gcov diff --git a/unit_tests/CMakeLists.txt b/unit_tests/CMakeLists.txt index 1941c22..f3daf08 100644 --- a/unit_tests/CMakeLists.txt +++ b/unit_tests/CMakeLists.txt @@ -1,19 +1,20 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8) -PROJECT(unittests CXX) +PROJECT(appctrl_unittests CXX) INCLUDE(FindPkgConfig) -pkg_check_modules(unittests REQUIRED +pkg_check_modules(appctrl_unittests REQUIRED glib-2.0 gmock aul appcore-common ) -FOREACH(flag ${unittests_CFLAGS}) +FOREACH(flag ${appctrl_unittests_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") ENDFOREACH(flag) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden -Wall -Werror -Winline") -SET(CMAKE_C_FLAGS "${EXTRA_CFLAGS}") +SET(CMAKE_C_FLAGS "${EXTRA_CFLAGS} ${EXTRA_CFLAGS}") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} -std=c++11") SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g") @@ -34,6 +35,7 @@ ADD_EXECUTABLE(${PROJECT_NAME} ${TEST_SOURCES} ) -TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${unittests_LDFLAGS}) +SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "${EXTRA_CFLAGS}") +TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${appctrl_unittests_LDFLAGS}) INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /usr/bin)