From: Baptiste DURAND Date: Wed, 29 May 2013 14:05:15 +0000 (+0200) Subject: Remove harcoded library path , change some variable type X-Git-Tag: accepted/tizen/20130530.164848~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f5fda5cbdbbe6126b6434ba2927577a08cfd17c9;p=platform%2Fframework%2Fweb%2Fwrt-plugins-common.git Remove harcoded library path , change some variable type --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 3efbdaa..8d4b5c7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,6 +25,7 @@ STRING(REGEX MATCH "([^.]*)" CMAKE_PROJECT_API_VERSION "${CMAKE_PROJECT_VERSION} include(FindPkgConfig) pkg_search_module(dpl REQUIRED dpl-efl>=0.2.21) +pkg_search_module(wrt-commons-custom-handler-dao-ro REQUIRED wrt-commons-custom-handler-dao-ro) include_directories( ${dpl_INCLUDE_DIRS} @@ -64,7 +65,8 @@ ELSE(DPL_LOG AND NOT CMAKE_BUILD_TYPE MATCHES "profiling") ENDIF(DPL_LOG AND NOT CMAKE_BUILD_TYPE MATCHES "profiling") MESSAGE(STATUS "WITH_TESTS: " ${WITH_TESTS}) - +MESSAGE( "wrt-commons-custom-handler-dao-ro_CFLAGS_OTHER : ${wrt-commons-custom-handler-dao-ro_CFLAGS_OTHER}") +ADD_DEFINITIONS("${wrt-commons-custom-handler-dao-ro_CFLAGS_OTHER}") ADD_DEFINITIONS("-fPIC") ADD_DEFINITIONS("-fvisibility=default") # mark all exported symbols as visible ADD_DEFINITIONS("-fPIC") # If supported for the target machine, emit position-independent code, suitable for dynamic linking and avoiding @@ -91,7 +93,7 @@ ENDIF(DEVPKG) set(CONFIG_FILE_NAME "config.cmake") set(LIBS_COMMONS ${dpl_LDFLAGS} ) -set(DESTINATION_LIB_PREFIX lib) +set(DESTINATION_LIB_PREFIX ${LIB_INSTALL_DIR}) set(DESTINATION_HEADER_PREFIX include/${PROJECT_NAME}) set(DESTINATION_HEADERS_NON_JS ${DESTINATION_HEADER_PREFIX}/Commons) @@ -139,7 +141,7 @@ set(PKGCONFIG_DIR ${PROJECT_SOURCE_DIR}/pkgconfigs) macro(configure_and_install_pkg PKG_FILE) CONFIGURE_FILE(${PKGCONFIG_DIR}/${PKG_FILE}.in ${PKGCONFIG_DIR}/${PKG_FILE} @ONLY) - INSTALL(FILES ${PKGCONFIG_DIR}/${PKG_FILE} DESTINATION lib/pkgconfig) + INSTALL(FILES ${PKGCONFIG_DIR}/${PKG_FILE} DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) endmacro(configure_and_install_pkg) configure_and_install_pkg(wrt-plugins-commons-javascript.pc) diff --git a/packaging/wrt-plugins-common.spec b/packaging/wrt-plugins-common.spec index 1165055..08b1c2b 100644 --- a/packaging/wrt-plugins-common.spec +++ b/packaging/wrt-plugins-common.spec @@ -42,13 +42,12 @@ This package contains all needed header files for developing a WRT plugin %endif %build -export LDFLAGS+="-Wl,--rpath=/usr/lib -Wl,--as-needed -Wl,--hash-style=both" +export LDFLAGS+="-Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--hash-style=both" -cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \ - -DDPL_LOG="ON" \ +%cmake . -DDPL_LOG="ON" \ -DCMAKE_PROJECT_VERSION=%{version} \ -DCMAKE_BUILD_TYPE=%{?build_type:%build_type} \ - %{?WITH_TESTS:-DWITH_TESTS=%WITH_TESTS} + %{?WITH_TESTS:-DWITH_TESTS=%WITH_TESTS} make %{?jobs:-j%jobs} %install diff --git a/pkgconfigs/wrt-plugin-loading.pc.in b/pkgconfigs/wrt-plugin-loading.pc.in index 69b9f8f..37eaec2 100644 --- a/pkgconfigs/wrt-plugin-loading.pc.in +++ b/pkgconfigs/wrt-plugin-loading.pc.in @@ -1,6 +1,6 @@ prefix=/usr exec_prefix=${prefix} -libdir=${prefix}/lib +libdir=@LIB_INSTALL_DIR@ includedir=${prefix}/include Name: wrt-plugin-loading diff --git a/pkgconfigs/wrt-plugins-api-support.pc.in b/pkgconfigs/wrt-plugins-api-support.pc.in index 579a085..6a7c1ed 100644 --- a/pkgconfigs/wrt-plugins-api-support.pc.in +++ b/pkgconfigs/wrt-plugins-api-support.pc.in @@ -1,6 +1,6 @@ prefix=/usr exec_prefix=${prefix} -libdir=${prefix}/lib +libdir=@LIB_INSTALL_DIR@ includedir=${prefix}/include Name: wrt-plugins-api-support diff --git a/pkgconfigs/wrt-plugins-commons-javascript.pc.in b/pkgconfigs/wrt-plugins-commons-javascript.pc.in index b522b22..5052950 100644 --- a/pkgconfigs/wrt-plugins-commons-javascript.pc.in +++ b/pkgconfigs/wrt-plugins-commons-javascript.pc.in @@ -1,7 +1,7 @@ prefix=/usr project_name=@CMAKE_PROJECT_NAME@ exec_prefix=${prefix} -libdir=${prefix}/lib +libdir=@LIB_INSTALL_DIR@ includedir=${prefix}/include/${project_name} Name: WrtDeviceApis commons with JavaScrpt dependencies diff --git a/pkgconfigs/wrt-plugins-commons.pc.in b/pkgconfigs/wrt-plugins-commons.pc.in index e3c8c7a..bdce084 100644 --- a/pkgconfigs/wrt-plugins-commons.pc.in +++ b/pkgconfigs/wrt-plugins-commons.pc.in @@ -1,7 +1,7 @@ prefix=/usr project_name=@CMAKE_PROJECT_NAME@ exec_prefix=${prefix} -libdir=${prefix}/lib +libdir=@LIB_INSTALL_DIR@ includedir=${prefix}/include/${project_name} Name: WrtDeviceApis commons diff --git a/pkgconfigs/wrt-plugins-filesystem.pc.in b/pkgconfigs/wrt-plugins-filesystem.pc.in index 49563e1..3a9ef13 100644 --- a/pkgconfigs/wrt-plugins-filesystem.pc.in +++ b/pkgconfigs/wrt-plugins-filesystem.pc.in @@ -1,7 +1,7 @@ prefix=/usr project_name=@CMAKE_PROJECT_NAME@ exec_prefix=${prefix} -libdir=${prefix}/lib +libdir=@LIB_INSTALL_DIR@ includedir=${prefix}/include/${project_name} Name: WebRuntime DeviceApis Filesystem module diff --git a/pkgconfigs/wrt-plugins-ipc-message.pc.in b/pkgconfigs/wrt-plugins-ipc-message.pc.in index 8088720..162673e 100644 --- a/pkgconfigs/wrt-plugins-ipc-message.pc.in +++ b/pkgconfigs/wrt-plugins-ipc-message.pc.in @@ -1,7 +1,7 @@ prefix=/usr project_name=@CMAKE_PROJECT_NAME@ exec_prefix=${prefix} -libdir=${prefix}/lib +libdir=@LIB_INSTALL_DIR@ includedir=${prefix}/include/${project_name} Name: wrt ipc message support diff --git a/pkgconfigs/wrt-plugins-plugin-manager.pc.in b/pkgconfigs/wrt-plugins-plugin-manager.pc.in index c6a3faa..e43f2d7 100644 --- a/pkgconfigs/wrt-plugins-plugin-manager.pc.in +++ b/pkgconfigs/wrt-plugins-plugin-manager.pc.in @@ -1,7 +1,7 @@ prefix=/usr project_name=@CMAKE_PROJECT_NAME@ exec_prefix=${prefix} -libdir=${prefix}/lib +libdir=@LIB_INSTALL_DIR@ includedir=${prefix}/include/${project_name} Name: WebRuntime DeviceApis Plugin Manager module diff --git a/pkgconfigs/wrt-plugins-widget-interface-dao.pc.in b/pkgconfigs/wrt-plugins-widget-interface-dao.pc.in index b4ca655..5a3de60 100644 --- a/pkgconfigs/wrt-plugins-widget-interface-dao.pc.in +++ b/pkgconfigs/wrt-plugins-widget-interface-dao.pc.in @@ -1,7 +1,7 @@ prefix=/usr project_name=@CMAKE_PROJECT_NAME@ exec_prefix=${prefix} -libdir=${prefix}/lib +libdir=@LIB_INSTALL_DIR@ includedir=${prefix}/include/${project_name} Name: WebRuntime DeviceApis Widget Interface module diff --git a/pkgconfigs/wrt-plugins-widgetdb.pc.in b/pkgconfigs/wrt-plugins-widgetdb.pc.in index 788423a..29e9257 100644 --- a/pkgconfigs/wrt-plugins-widgetdb.pc.in +++ b/pkgconfigs/wrt-plugins-widgetdb.pc.in @@ -1,7 +1,7 @@ prefix=/usr project_name=@CMAKE_PROJECT_NAME@ exec_prefix=${prefix} -libdir=${prefix}/lib/ +libdir=@LIB_INSTALL_DIR@ includedir=${prefix}/include/${project_name} Name: WebRuntime DeviceApis WidgetDB module diff --git a/pkgconfigs/wrt-popup-ace-runner.pc.in b/pkgconfigs/wrt-popup-ace-runner.pc.in index ad9605e..8f52e83 100644 --- a/pkgconfigs/wrt-popup-ace-runner.pc.in +++ b/pkgconfigs/wrt-popup-ace-runner.pc.in @@ -1,7 +1,7 @@ prefix=/usr project_name=@CMAKE_PROJECT_NAME@ exec_prefix=${prefix} -libdir=${prefix}/lib +libdir=@LIB_INSTALL_DIR@ includedir=${prefix}/include/${project_name} Name: wrt-popup-runner diff --git a/pkgconfigs/wrt-popup-runner.pc.in b/pkgconfigs/wrt-popup-runner.pc.in index ad9605e..8f52e83 100644 --- a/pkgconfigs/wrt-popup-runner.pc.in +++ b/pkgconfigs/wrt-popup-runner.pc.in @@ -1,7 +1,7 @@ prefix=/usr project_name=@CMAKE_PROJECT_NAME@ exec_prefix=${prefix} -libdir=${prefix}/lib +libdir=@LIB_INSTALL_DIR@ includedir=${prefix}/include/${project_name} Name: wrt-popup-runner diff --git a/pkgconfigs/wrt-popup-wrt-runner.pc.in b/pkgconfigs/wrt-popup-wrt-runner.pc.in index a7b830f..2b2f6c7 100644 --- a/pkgconfigs/wrt-popup-wrt-runner.pc.in +++ b/pkgconfigs/wrt-popup-wrt-runner.pc.in @@ -1,7 +1,7 @@ prefix=/usr project_name=@CMAKE_PROJECT_NAME@ exec_prefix=${prefix} -libdir=${prefix}/lib +libdir=@LIB_INSTALL_DIR@ includedir=${prefix}/include/${project_name} Name: wrt-popup-runner diff --git a/src/CommonsJavaScript/Converter.cpp b/src/CommonsJavaScript/Converter.cpp index cdaed58..7e1dc9d 100644 --- a/src/CommonsJavaScript/Converter.cpp +++ b/src/CommonsJavaScript/Converter.cpp @@ -119,12 +119,12 @@ std::string Converter::toString(long arg) { return toString_(arg); } - +#ifndef __x86_64__ std::string Converter::toString(std::size_t arg) { return toString_(arg); } - +#endif std::string Converter::toString(const JSValueRef& arg) { return toString_(arg); diff --git a/src/CommonsJavaScript/Converter.h b/src/CommonsJavaScript/Converter.h index ff196b6..b37383a 100644 --- a/src/CommonsJavaScript/Converter.h +++ b/src/CommonsJavaScript/Converter.h @@ -141,8 +141,10 @@ class Converter : private DPL::Noncopyable std::string toString(unsigned long arg); std::string toString(long arg); +#ifndef __x86_64__ std::string toString(std::size_t arg); +#endif /** * Converts JSValueRef to STL string. diff --git a/src/plugin-loading/CMakeLists.txt b/src/plugin-loading/CMakeLists.txt index fbcf48a..7b54c25 100644 --- a/src/plugin-loading/CMakeLists.txt +++ b/src/plugin-loading/CMakeLists.txt @@ -68,7 +68,7 @@ target_link_libraries(${TARGET_PLUGIN_LOADING_LIB} ) INSTALL(TARGETS ${TARGET_PLUGIN_LOADING_LIB} - DESTINATION lib + DESTINATION ${LIB_INSTALL_DIR} PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE ) diff --git a/src/plugins-api-support/CMakeLists.txt b/src/plugins-api-support/CMakeLists.txt index 7a67b5e..77d5f45 100644 --- a/src/plugins-api-support/CMakeLists.txt +++ b/src/plugins-api-support/CMakeLists.txt @@ -52,7 +52,7 @@ target_link_libraries(${TARGET_PLUGINS_API_SUPPORT} ) INSTALL(TARGETS ${TARGET_PLUGINS_API_SUPPORT} - DESTINATION lib + DESTINATION ${LIB_INSTALL_DIR} PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE ) diff --git a/src/plugins-ipc-message/CMakeLists.txt b/src/plugins-ipc-message/CMakeLists.txt index d3da03e..00d7cce 100644 --- a/src/plugins-ipc-message/CMakeLists.txt +++ b/src/plugins-ipc-message/CMakeLists.txt @@ -50,7 +50,7 @@ target_link_libraries(${TARGET_PLUGINS_IPC_MESSAGE_LIB} ) INSTALL(TARGETS ${TARGET_PLUGINS_IPC_MESSAGE_LIB} - DESTINATION lib + DESTINATION ${LIB_INSTALL_DIR} PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE ) diff --git a/src/standards/W3C/Widget/CMakeLists.txt b/src/standards/W3C/Widget/CMakeLists.txt index 70ef116..ae3ae35 100644 --- a/src/standards/W3C/Widget/CMakeLists.txt +++ b/src/standards/W3C/Widget/CMakeLists.txt @@ -44,4 +44,4 @@ target_link_libraries(${TARGET_NAME} wrt-plugins-storageevent ) -INSTALL(TARGETS ${TARGET_NAME} LIBRARY DESTINATION /usr/lib/wrt-plugins/w3c-widget-interface) +INSTALL(TARGETS ${TARGET_NAME} LIBRARY DESTINATION ${LIB_INSTALL_DIR}/wrt-plugins/w3c-widget-interface) diff --git a/src/wrt-popup/ace/popup-runner/CMakeLists.txt b/src/wrt-popup/ace/popup-runner/CMakeLists.txt index 4e5053c..86f58cf 100644 --- a/src/wrt-popup/ace/popup-runner/CMakeLists.txt +++ b/src/wrt-popup/ace/popup-runner/CMakeLists.txt @@ -57,7 +57,7 @@ target_link_libraries(${TARGET_POPUP_ACE_RUNNER_LIB} ) INSTALL(TARGETS ${TARGET_POPUP_ACE_RUNNER_LIB} - DESTINATION lib + DESTINATION ${LIB_INSTALL_DIR} ) INSTALL(FILES ${WRT_POPUP_RUNNER_LIB_SRC_DIR}/popup-runner.h diff --git a/src/wrt-popup/wrt/popup-bin/renderer/popup.h b/src/wrt-popup/wrt/popup-bin/renderer/popup.h index 149b7eb..1099df7 100644 --- a/src/wrt-popup/wrt/popup-bin/renderer/popup.h +++ b/src/wrt-popup/wrt/popup-bin/renderer/popup.h @@ -35,7 +35,7 @@ namespace Popup { namespace Renderer { struct AnswerCallbackData { - int buttonAnswer; + intptr_t buttonAnswer; DPL::Optional password; bool chackState; }; diff --git a/src/wrt-popup/wrt/popup-bin/renderer/popup_renderer.cpp b/src/wrt-popup/wrt/popup-bin/renderer/popup_renderer.cpp index 2f3a872..ab1e13a 100644 --- a/src/wrt-popup/wrt/popup-bin/renderer/popup_renderer.cpp +++ b/src/wrt-popup/wrt/popup-bin/renderer/popup_renderer.cpp @@ -110,7 +110,7 @@ class PopupRenderer::Impl Assert(m_initialized); AnswerCallbackData answerData; - answerData.buttonAnswer = reinterpret_cast(data); + answerData.buttonAnswer = reinterpret_cast(data); answerData.chackState = m_checkState; answerData.password = m_password; m_current->ForwardAnswer(answerData); diff --git a/src/wrt-popup/wrt/popup-runner/CMakeLists.txt b/src/wrt-popup/wrt/popup-runner/CMakeLists.txt index 0a8f45e..3c1aad9 100644 --- a/src/wrt-popup/wrt/popup-runner/CMakeLists.txt +++ b/src/wrt-popup/wrt/popup-runner/CMakeLists.txt @@ -58,7 +58,7 @@ target_link_libraries(${TARGET_POPUP_WRT_RUNNER_LIB} ) INSTALL(TARGETS ${TARGET_POPUP_WRT_RUNNER_LIB} - DESTINATION lib + DESTINATION ${LIB_INSTALL_DIR} ) INSTALL(FILES ${WRT_POPUP_RUNNER_LIB_SRC_DIR}/PopupInvoker.h