PROJECT(motion)
INCLUDE(GNUInstallDirs)
+# Target lib (for backward compatibility, the below old naming is used)
+SET(target "core-context-manager")
+
# Source Lists
-SET(SRCS
- src/shared/ctx_util_misc.cpp
- src/shared/ctx_util_sensor.cpp
-# Gesture
- src/gesture/gesture.cpp
- src/gesture/motion_engine.cpp
-# Activity
- src/activity/activity.cpp
-)
+FILE(GLOB_RECURSE SRCS src/*.cpp)
SET(inc_subdir "context-service")
-SET(dependency "dlog glib-2.0 capi-base-common capi-system-info sensor")
-
-# Target lib (for backward compatibility, the below old naming is used)
-SET(target "core-context-manager")
+SET(dependency "glib-2.0 dlog capi-base-common capi-system-info sensor")
# Options
INCLUDE(FindPkgConfig)
${CMAKE_CURRENT_SOURCE_DIR}/src/shared
)
-ADD_DEFINITIONS(-O2 -Wall -fPIC -fvisibility=hidden -Wl,--as-needed)
+ADD_DEFINITIONS(-O2 -Wall -fPIC -fdata-sections -ffunction-sections -fvisibility=hidden)
+SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fPIC -Wl,--as-needed -Wl,--gc-section -Wl,--print-gc-section")
# Build
pkg_check_modules(pkgs REQUIRED ${dependency})
SET_TARGET_PROPERTIES(${target} PROPERTIES VERSION ${FULLVER})
# Install
-INSTALL(TARGETS ${target} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT RuntimeLibraries)
+INSTALL(TARGETS ${target} DESTINATION ${CMAKE_INSTALL_LIBDIR})
INSTALL(
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${inc_subdir}
FILES_MATCHING PATTERN "*.h"
SET(VERSION ${FULLVER})
SET(PC_PREFIX ${CMAKE_INSTALL_PREFIX})
-SET(PC_NAME ${target})
+SET(PC_NAME ${PROJECT_NAME})
SET(PC_LIBDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
SET(PC_INCLUDE "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/${inc_subdir}")
SET(PC_DESCRIPTION "Tizen Native Motion Recognition API")
Name: motion
Summary: Tizen Native Motion Recognition API
-Version: 1.1.3
+Version: 1.1.4
Release: 1
-Group: Framework/context
+Group: Service/Context
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
+
BuildRequires: cmake
-BuildRequires: pkgconfig(capi-base-common)
-BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(glib-2.0)
+BuildRequires: pkgconfig(dlog)
+BuildRequires: pkgconfig(capi-base-common)
BuildRequires: pkgconfig(capi-system-info)
BuildRequires: pkgconfig(sensor)
+
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
-%ifarch %{arm}
-%define ARCH arm
-%else
-%define ARCH i586
-%endif
-
%description
Tizen Native Motion Recognition API
%build
MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
-export CFLAGS+=" -Werror -Wextra -Wcast-align -Wcast-qual -Wshadow -Wwrite-strings -Wswitch-default"
-export CXXFLAGS+=" -Werror -Wextra -Wcast-align -Wcast-qual -Wshadow -Wwrite-strings -Wswitch-default -Wnon-virtual-dtor -Wno-c++0x-compat"
+export CFLAGS+=" -Wextra -Wcast-align -Wshadow -Wwrite-strings -Wswitch-default -Wno-unused-parameter"
+export CXXFLAGS+=" -Wextra -Wcast-align -Wshadow -Wwrite-strings -Wswitch-default -Wno-unused-parameter"
-#export CFLAGS+=" -Wno-array-bounds -Wno-ignored-qualifiers"
-export CFLAGS+=" -Wno-unused-parameter -Wno-empty-body"
-export CXXFLAGS+=" -Wno-unused-parameter -Wno-empty-body"
+export CFLAGS+=" -Wno-empty-body -fomit-frame-pointer -fno-optimize-sibling-calls"
+export CXXFLAGS+=" -Wno-empty-body -fomit-frame-pointer -fno-optimize-sibling-calls"
-export CFLAGS+=" -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-strict-aliasing -fno-unroll-loops -fsigned-char -fstrict-overflow -fno-common"
-export CXXFLAGS+=" -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-strict-aliasing -fno-unroll-loops -fsigned-char -fstrict-overflow"
+export CFLAGS+=" -fno-strict-aliasing -fno-unroll-loops -fsigned-char -fstrict-overflow"
+export CXXFLAGS+=" -fno-strict-aliasing -fno-unroll-loops -fsigned-char -fstrict-overflow"
-export CFLAGS="$CFLAGS -DTIZEN_ENGINEER_MODE"
-export CXXFLAGS="$CXXFLAGS -DTIZEN_ENGINEER_MODE"
-export FFLAGS="$FFLAGS -DTIZEN_ENGINEER_MODE"
+export CFLAGS+=" -fno-common"
+export CXXFLAGS+=" -Wnon-virtual-dtor"
+export CXXFLAGS+=" -std=c++11 -Wno-c++11-compat"
-cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DARCH=%{ARCH} -DMAJORVER=${MAJORVER} -DFULLVER=%{version} -DPROFILE=%{PROFILE}
+#export CFLAGS+=" -Wcast-qual"
+#export CXXFLAGS+=" -Wcast-qual"
+
+#export CFLAGS+=" -DTIZEN_ENGINEER_MODE"
+#export CXXFLAGS+=" -DTIZEN_ENGINEER_MODE"
+#export FFLAGS+=" -DTIZEN_ENGINEER_MODE"
+
+cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DMAJORVER=${MAJORVER} -DFULLVER=%{version}
make %{?jobs:-j%jobs}
%install
%description devel
Tizen Native Motion Recognition API (Development)
-%post devel
-/sbin/ldconfig
-
-%postun devel
-/sbin/ldconfig
-
%files devel
%defattr(-,root,root,-)
%{_includedir}/*/*.h