From 93b30c7ece9a8c8c9293b863cb969edbd15a78fb Mon Sep 17 00:00:00 2001 From: Woochan Lee Date: Tue, 21 Jun 2016 14:15:51 +0900 Subject: [PATCH] Fix build error, demo launching issues. Change-Id: Iac75aaa7ed38c256352bd58f39541531149b91ff --- CMakeLists.txt | 10 +++++----- packaging/ui-viewmgr.spec | 11 +++++------ src/examples/efl/c/CMakeLists.txt | 4 ++-- src/lib/CMakeLists.txt | 2 +- ui.viewmgr.demo.manifest | 14 ++++++-------- ui.viewmgr.demo.xml.in | 8 ++------ 6 files changed, 21 insertions(+), 28 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f9ea537..6977f3d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,12 +6,12 @@ SET(VERSION 0.1.0) SET(VENDOR "samsung") SET(LIBNAME ui-viewmgr) -SET(LIBDIR ${PREFIX}/lib) +SET(LIBDIR ${CMAKE_INSTALL_LIBDIR}) SET(INCDIR ${PREFIX}/include) SET(EDJDIR "/usr/share/edje/${LIBNAME}") SET(BINNAME ui.viewmgr.demo) -SET(BINDIR /opt/usr/apps/${BINNAME}) +SET(BINDIR /usr/apps/${BINNAME}) SET(IMGDIR ${BINDIR}/data/images) SET(ICONDIR ${BINDIR}/shared/res) @@ -33,14 +33,14 @@ ENDIF() INCLUDE(FindPkgConfig) -SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -g -O2 -Wall -fPIE") -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O2 -Wall -fPIE -std=c++0x") +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -g -O2 -Wall") +SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O2 -Wall -std=c++0x") ADD_SUBDIRECTORY(src) #pc file CONFIGURE_FILE(pc/${LIBNAME}.pc.in pc/${LIBNAME}.pc @ONLY) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/pc/${LIBNAME}.pc DESTINATION lib/pkgconfig) +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/pc/${LIBNAME}.pc DESTINATION ${LIBDIR}/pkgconfig) #edj file ADD_CUSTOM_TARGET(${LIBNAME}.edj diff --git a/packaging/ui-viewmgr.spec b/packaging/ui-viewmgr.spec index 9a515a6..016a1a1 100644 --- a/packaging/ui-viewmgr.spec +++ b/packaging/ui-viewmgr.spec @@ -41,12 +41,11 @@ UI VIEW MANAGER library providing View management functionality(devel) %build %if "%{?target_language}" == "c++" - cmake . -DTARGET_LANGUAGE="c++" + %cmake . -DTARGET_LANGUAGE="c++" %else - cmake . -DTARGET_LANGUAGE="c" + %cmake . -DTARGET_LANGUAGE="c" %endif -cmake . -DCMAKE_INSTALL_PREFIX=/usr make %{?jobs:-j%jobs} %install @@ -67,9 +66,9 @@ cp %{_builddir}/%{buildsubdir}/LICENSE %{buildroot}/usr/share/license/%{name} %defattr(-,root,root,-) %{_datadir}/packages/ui.viewmgr.demo.xml %manifest ui.viewmgr.demo.manifest -/opt/usr/apps/ui.viewmgr.demo/bin/* -/opt/usr/apps/ui.viewmgr.demo/data/images/* -/opt/usr/apps/ui.viewmgr.demo/shared/res/* +/usr/apps/ui.viewmgr.demo/bin/* +/usr/apps/ui.viewmgr.demo/data/images/* +/usr/apps/ui.viewmgr.demo/shared/res/* %files devel %defattr(-,root,root,-) diff --git a/src/examples/efl/c/CMakeLists.txt b/src/examples/efl/c/CMakeLists.txt index f4a31ae..8051a9a 100644 --- a/src/examples/efl/c/CMakeLists.txt +++ b/src/examples/efl/c/CMakeLists.txt @@ -29,9 +29,9 @@ FOREACH(flag ${BIN_PKGS_CFLAGS}) SET(PKG_CFLAGS "${PKG_CFLAGS} ${flag}") ENDFOREACH(flag) -SET_TARGET_PROPERTIES(${BINNAME} PROPERTIES COMPILE_FLAGS "${PKG_CFLAGS}" LINK_FLAGS -pie) TARGET_LINK_LIBRARIES(${BINNAME} ${BIN_PKGS_LDFLAGS} ${LIBNAME}) -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PKG_CFLAGS}") +SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PKG_CFLAGS} -Wall -fPIE") +SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -pie") INSTALL(TARGETS ${BINNAME} DESTINATION ${BINDIR}/bin) diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt index bd42cdf..8c9360d 100644 --- a/src/lib/CMakeLists.txt +++ b/src/lib/CMakeLists.txt @@ -57,4 +57,4 @@ TARGET_LINK_LIBRARIES(${LIBNAME} ${LIB_PKGS_LDFLAGS}) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PKG_CFLAGS}") -INSTALL(TARGETS ${LIBNAME} DESTINATION lib) +INSTALL(TARGETS ${LIBNAME} DESTINATION ${LIBDIR}) diff --git a/ui.viewmgr.demo.manifest b/ui.viewmgr.demo.manifest index b0f19c7..e0b06a0 100644 --- a/ui.viewmgr.demo.manifest +++ b/ui.viewmgr.demo.manifest @@ -1,13 +1,11 @@ - - - - - - - - + + + + + + diff --git a/ui.viewmgr.demo.xml.in b/ui.viewmgr.demo.xml.in index 0b41317..c19d55c 100644 --- a/ui.viewmgr.demo.xml.in +++ b/ui.viewmgr.demo.xml.in @@ -1,11 +1,7 @@ - - + + ui.viewmgr.demo.png - - http://tizen.org/privilege/appmanager.launch - http://tizen.org/privilege/appmanager.kill.bgapp - -- 2.7.4