From 93585a01b4e89c596abb7b84553741a34ff14b14 Mon Sep 17 00:00:00 2001 From: Minje Ahn Date: Wed, 13 Jul 2016 14:45:41 +0900 Subject: [PATCH] Add build definitions Change-Id: Ib345aa1f0c4d07cb8a7eed395fc1426b75645c6b Signed-off-by: Minje Ahn --- CMakeLists.txt | 17 ++++++++++++++--- packaging/capi-content-media-content.spec | 9 +++++++-- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9d8dec9..577efe0 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,8 +5,11 @@ PROJECT(${fw_name}) SET(CMAKE_INSTALL_PREFIX /usr) SET(PREFIX ${CMAKE_INSTALL_PREFIX}) - -SET(INC_DIR include) +IF(TIZEN_PRODUCT_TV) + SET(INC_DIR include_product) +ELSE() + SET(INC_DIR include) +ENDIF(TIZEN_PRODUCT_TV) INCLUDE_DIRECTORIES(${INC_DIR}) SET(dependents "dlog libmedia-service media-thumbnail libmedia-utils capi-base-common capi-system-info vconf cynara-client cynara-creds-socket cynara-session") @@ -27,13 +30,21 @@ ENDIF("${ARCH}" STREQUAL "arm") ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") ADD_DEFINITIONS("-DTIZEN_DEBUG") +IF(TIZEN_PRODUCT_TV) + ADD_DEFINITIONS("-D_USE_TV_PROFILE") +ENDIF(TIZEN_PRODUCT_TV) SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=${LIB_INSTALL_DIR}") aux_source_directory(src SOURCES) ADD_LIBRARY(${fw_name} SHARED ${SOURCES}) -TARGET_LINK_LIBRARIES(${fw_name} ${${fw_name}_LDFLAGS}) +IF(TIZEN_PRODUCT_TV) + TARGET_LINK_LIBRARIES(${fw_name} ${${fw_name}_LDFLAGS} capi-system-info) +ELSE() + TARGET_LINK_LIBRARIES(${fw_name} ${${fw_name}_LDFLAGS}) +ENDIF(TIZEN_PRODUCT_TV) + SET_TARGET_PROPERTIES(${fw_name} PROPERTIES diff --git a/packaging/capi-content-media-content.spec b/packaging/capi-content-media-content.spec index a072a6d..e365775 100755 --- a/packaging/capi-content-media-content.spec +++ b/packaging/capi-content-media-content.spec @@ -36,7 +36,13 @@ cp %{SOURCE1001} . %build MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'` -%cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER} +%cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER} \ +%if 0%{?TIZEN_PRODUCT_TV} + -DTIZEN_PRODUCT_TV=YES +%else + -DTIZEN_PRODUCT_TV=NO +%endif + %__make %{?jobs:-j%jobs} %install @@ -56,7 +62,6 @@ cp -rf %{_builddir}/%{name}-%{version}/LICENSE.APLv2.0 %{buildroot}/%{_datadir}/ %{_libdir}/libcapi-content-media-content.so.* #License %{_datadir}/license/%{name} -#%{_bindir}/* %files devel %manifest %{name}.manifest -- 2.7.4