diff options
author | Tae-Young Chung <ty83.chung@samsung.com> | 2016-08-18 19:18:01 +0900 |
---|---|---|
committer | Tae-Young Chung <ty83.chung@samsung.com> | 2016-08-18 19:44:36 +0900 |
commit | f26100a2491b83c4f0dad532eaab201aae15f155 (patch) | |
tree | f512fe45b0a4eff904a9d44daa0082f9eb149e32 | |
parent | 9db5b0e313474a3bb82caaf2d8fc126949f4c738 (diff) | |
download | mediavision-f26100a2491b83c4f0dad532eaab201aae15f155.tar.gz mediavision-f26100a2491b83c4f0dad532eaab201aae15f155.tar.bz2 mediavision-f26100a2491b83c4f0dad532eaab201aae15f155.zip |
Add check arm_neon supportsubmit/tizen_3.0_wearable/20161015.000000submit/tizen_3.0_tv/20161015.000000submit/tizen_3.0_mobile/20161015.000001submit/tizen_3.0_ivi/20161010.000005submit/tizen_3.0_common/20161104.104000submit/tizen/20160824.052737accepted/tizen/wearable/20160825.050345accepted/tizen/tv/20160825.050321accepted/tizen/mobile/20160825.050223accepted/tizen/ivi/20160825.050409accepted/tizen/common/20160824.154740accepted/tizen/3.0/wearable/20161015.080306accepted/tizen/3.0/tv/20161016.003322accepted/tizen/3.0/mobile/20161015.032540accepted/tizen/3.0/ivi/20161011.055302accepted/tizen/3.0/common/20161114.105245
Change-Id: I0a3b550bd3aaa0afef1c91230bb88b0116b1cb81
Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
-rw-r--r-- | CMakeLists.txt | 33 | ||||
-rw-r--r-- | packaging/capi-media-vision.spec | 16 |
2 files changed, 36 insertions, 13 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 5898b983..cd6895c2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -91,10 +91,39 @@ FOREACH(flag ${${fw_name}_CFLAGS}) SET(EXTRA_CXXFLAGS "${EXTRA_CXXFLAGS} ${flag}") ENDFOREACH(flag) -SET(CMAKE_C_FLAGS "-I./include -I./include/headers ${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Wall -w") +SET(TEST_SRC_SUPPORT_ARM_NEON " +#include <arm_neon.h> + +int main (int argc, char **argv) { +float32x4_t acc = vdupq_n_f32(0.f); +return 0; +} +") + +message("arch is ${ARCH}") +INCLUDE(CheckCSourceCompiles) +CHECK_C_SOURCE_COMPILES("${TEST_SRC_SUPPORT_ARM_NEON}" SUPPORT_NEON) +IF(SUPPORT_NEON) + ADD_DEFINITIONS("-DENABLE_NEON") +ELSE() + SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -mfpu=neon") + message("CMAKE_REQUIRED_FLAGS: ${CMAKE_REQUIRED_FLAGS}") + + CHECK_C_SOURCE_COMPILES("${TEST_SRC_SUPPORT_ARM_NEON}" SUPPORT_NEON_) + message("Again check SUPPORT_NEON ${SUPPORT_NEON_}") + IF(SUPPORT_NEON_) + ADD_DEFINITIONS("-DENABLE_NEON") + IF("${ARCH}" STREQUAL "arm") + SET(NEON_CFLAGS "-mfpu=neon") + SET(NEON_CXXFLAGS "-mfpu=neon") + ENDIF() + ENDIF() +ENDIF() + +SET(CMAKE_C_FLAGS "-I./include -I./include/headers ${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} ${NEON_CFLAGS} -fPIC -Wall -w") SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") -SET(CMAKE_CXX_FLAGS "-I./include -I./include/headers ${CMAKE_CXX_FLAGS} ${EXTRA_CXXFLAGS} -fPIC") +SET(CMAKE_CXX_FLAGS "-I./include -I./include/headers ${CMAKE_CXX_FLAGS} ${EXTRA_CXXFLAGS} ${NEON_CXXFLAGS} -fPIC") SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g --w") IF("${ARCH}" STREQUAL "arm") diff --git a/packaging/capi-media-vision.spec b/packaging/capi-media-vision.spec index 8707ca14..ea2be680 100644 --- a/packaging/capi-media-vision.spec +++ b/packaging/capi-media-vision.spec @@ -1,7 +1,7 @@ Name: capi-media-vision Summary: Media Vision library for Tizen Native API Version: 0.3.20 -Release: 3 +Release: 4 Group: Multimedia/Framework License: Apache-2.0 and BSD-2.0 Source0: %{name}-%{version}.tar.gz @@ -48,20 +48,14 @@ export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE" export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE" %endif -%ifarch %{arm} -export CFLAGS="$CFLAGS -DENABLE_NEON" -export CXXFLAGS="$CXXFLAGS -DENABLE_NEON" -%endif - -%ifarch %{aarch64} -export CFLAGS="$CFLAGS -DENABLE_NEON" -export CXXFLAGS="$CXXFLAGS -DENABLE_NEON" -%endif export CFLAGS+=" -DMV_CONFIG_PATH=\\\"%{TZ_SYS_RO_SHARE}/%{name}/\\\"" export CXXFLAGS+=" -DMV_CONFIG_PATH=\\\"%{TZ_SYS_RO_SHARE}/%{name}/\\\"" MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'` -%cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DTZ_SYS_BIN=%TZ_SYS_BIN +%cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DTZ_SYS_BIN=%TZ_SYS_BIN \ +%ifarch %arm + -DARCH=arm +%endif make %{?jobs:-j%jobs} |