Remove harcoded library path , change some variable type 44/3744/1
authorBaptiste DURAND <baptiste.durand@eurogiciel.fr>
Wed, 29 May 2013 14:05:15 +0000 (16:05 +0200)
committerBaptiste DURAND <baptiste.durand@eurogiciel.fr>
Wed, 29 May 2013 14:05:15 +0000 (16:05 +0200)
24 files changed:
CMakeLists.txt
packaging/wrt-plugins-common.spec
pkgconfigs/wrt-plugin-loading.pc.in
pkgconfigs/wrt-plugins-api-support.pc.in
pkgconfigs/wrt-plugins-commons-javascript.pc.in
pkgconfigs/wrt-plugins-commons.pc.in
pkgconfigs/wrt-plugins-filesystem.pc.in
pkgconfigs/wrt-plugins-ipc-message.pc.in
pkgconfigs/wrt-plugins-plugin-manager.pc.in
pkgconfigs/wrt-plugins-widget-interface-dao.pc.in
pkgconfigs/wrt-plugins-widgetdb.pc.in
pkgconfigs/wrt-popup-ace-runner.pc.in
pkgconfigs/wrt-popup-runner.pc.in
pkgconfigs/wrt-popup-wrt-runner.pc.in
src/CommonsJavaScript/Converter.cpp
src/CommonsJavaScript/Converter.h
src/plugin-loading/CMakeLists.txt
src/plugins-api-support/CMakeLists.txt
src/plugins-ipc-message/CMakeLists.txt
src/standards/W3C/Widget/CMakeLists.txt
src/wrt-popup/ace/popup-runner/CMakeLists.txt
src/wrt-popup/wrt/popup-bin/renderer/popup.h
src/wrt-popup/wrt/popup-bin/renderer/popup_renderer.cpp
src/wrt-popup/wrt/popup-runner/CMakeLists.txt

index 3efbdaa..8d4b5c7 100644 (file)
@@ -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)
index 1165055..08b1c2b 100644 (file)
@@ -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
index 69b9f8f..37eaec2 100644 (file)
@@ -1,6 +1,6 @@
 prefix=/usr
 exec_prefix=${prefix}
-libdir=${prefix}/lib
+libdir=@LIB_INSTALL_DIR@
 includedir=${prefix}/include
 
 Name: wrt-plugin-loading
index 579a085..6a7c1ed 100644 (file)
@@ -1,6 +1,6 @@
 prefix=/usr
 exec_prefix=${prefix}
-libdir=${prefix}/lib
+libdir=@LIB_INSTALL_DIR@
 includedir=${prefix}/include
 
 Name: wrt-plugins-api-support
index b522b22..5052950 100644 (file)
@@ -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
index e3c8c7a..bdce084 100644 (file)
@@ -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
index 49563e1..3a9ef13 100644 (file)
@@ -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
index 8088720..162673e 100644 (file)
@@ -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
index c6a3faa..e43f2d7 100644 (file)
@@ -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
index b4ca655..5a3de60 100644 (file)
@@ -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
index 788423a..29e9257 100644 (file)
@@ -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
index ad9605e..8f52e83 100644 (file)
@@ -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
index ad9605e..8f52e83 100644 (file)
@@ -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
index a7b830f..2b2f6c7 100644 (file)
@@ -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
index cdaed58..7e1dc9d 100644 (file)
@@ -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);
index ff196b6..b37383a 100644 (file)
@@ -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.
index fbcf48a..7b54c25 100644 (file)
@@ -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
 )
index 7a67b5e..77d5f45 100644 (file)
@@ -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
 )
index d3da03e..00d7cce 100644 (file)
@@ -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
 )
index 70ef116..ae3ae35 100644 (file)
@@ -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)
index 4e5053c..86f58cf 100644 (file)
@@ -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
index 149b7eb..1099df7 100644 (file)
@@ -35,7 +35,7 @@ namespace Popup {
 namespace Renderer {
 struct AnswerCallbackData
 {
-    int buttonAnswer;
+    intptr_t buttonAnswer;
     DPL::Optional<std::string> password;
     bool chackState;
 };
index 2f3a872..ab1e13a 100644 (file)
@@ -110,7 +110,7 @@ class PopupRenderer::Impl
         Assert(m_initialized);
         AnswerCallbackData answerData;
 
-        answerData.buttonAnswer = reinterpret_cast<int>(data);
+        answerData.buttonAnswer = reinterpret_cast<intptr_t>(data);
         answerData.chackState = m_checkState;
         answerData.password = m_password;
         m_current->ForwardAnswer(answerData);
index 0a8f45e..3c1aad9 100644 (file)
@@ -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