Fix ico-vic-amb-plugin build
authorRonan Le Martret <ronan@fridu.net>
Thu, 13 Nov 2014 12:43:32 +0000 (13:43 +0100)
committerRonan Le Martret <ronan@fridu.net>
Thu, 13 Nov 2014 12:43:32 +0000 (13:43 +0100)
Change-Id: I25e2523750636af3b1d9f306cdea30b4bbd082c9

meta-tizen-ivi/recipes-ico/ico-vic-amb-plugin/files/FixCXXFlag.patch [new file with mode: 0644]
meta-tizen-ivi/recipes-ico/ico-vic-amb-plugin/files/fixHardedPath.patch [new file with mode: 0644]
meta-tizen-ivi/recipes-ico/ico-vic-amb-plugin/files/fix_remove_test_and_tools_build.patch [deleted file]
meta-tizen-ivi/recipes-ico/ico-vic-amb-plugin/ico-vic-amb-plugin-extraconf.inc

diff --git a/meta-tizen-ivi/recipes-ico/ico-vic-amb-plugin/files/FixCXXFlag.patch b/meta-tizen-ivi/recipes-ico/ico-vic-amb-plugin/files/FixCXXFlag.patch
new file mode 100644 (file)
index 0000000..9921c45
--- /dev/null
@@ -0,0 +1,25 @@
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index c1a1f81..40a043b 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -1,7 +1,8 @@
+ include(CheckIncludeFiles)
+ include_directories(${CMAKE_SOURCE_DIR}/lib ${include_dirs} ${gio_INCLUDE_DIRS} ${gio-unix_INCLUDE_DIRS} /usr/include/amb /usr/include/dbus-1.0)
+-set(CMAKE_CXX_FLAGS "-g -Wall -std=c++11 -O3")
++
++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -std=c++11 -O3")
+ set(vehicleplugin_headers common.h abstractconfig.h ambconfig.h convert.h standardmessage.h datamessage.h eventmessage.h messageformat.h controlwebsocket.h mwinterface.h viccommunicator.h ambinterface.h)
+ set(vehicleplugin_sources abstractconfig.cc ambconfig.cc convert.cc standardmessage.cc eventmessage.cc datamessage.cc mwinterface.cc controlwebsocket.cc viccommunicator.cc ambinterface.cc)
+ add_library(vehicleplugin MODULE ${vehicleplugin_sources})
+diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
+index 46933cc..415a1c5 100644
+--- a/tests/CMakeLists.txt
++++ b/tests/CMakeLists.txt
+@@ -1,5 +1,5 @@
+ include(CheckIncludeFiles)
+-set(CMAKE_CXX_FLAGS "-g -Wall -std=c++11")
++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -std=c++11")
+ include_directories(${CMAKE_SOURCE_DIR}/lib ${include_dirs} ${gio_INCLUDE_DIRS} ${gio-unix_INCLUDE_DIRS} ${ambd_INCLUDE_DIRS} ${appcore-efl_INCLUDE_DIRS}  ${elementary_INCLUDE_DIRS} /usr/include/ico-util ../src/)
+ set(VICCommon_sources ../src/standardmessage.cc ../src/datamessage.cc ../src/eventmessage.cc controlwebsocketclient.cc)
diff --git a/meta-tizen-ivi/recipes-ico/ico-vic-amb-plugin/files/fixHardedPath.patch b/meta-tizen-ivi/recipes-ico/ico-vic-amb-plugin/files/fixHardedPath.patch
new file mode 100644 (file)
index 0000000..59210be
--- /dev/null
@@ -0,0 +1,51 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index fec703f..0fd3ed4 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -15,6 +15,9 @@ add_definitions(-DPROJECT_VERSION="${PROJECT_VERSION}")
+ add_definitions(-DPROJECT_NAME="${PROJECT_NAME}")
+ add_definitions(-DLATER1024)
++FIND_FILE(ICO_UTIL_DIR ico-util )
++FIND_FILE(DBUS_DIR dbus-1.0)
++
+ include (CMakeForceCompiler)
+ option(ENABLE_ICECC "Enable icecc checking, for distributed compilation" OFF)
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 40a043b..39fd603 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -1,6 +1,6 @@
+ include(CheckIncludeFiles)
+-include_directories(${CMAKE_SOURCE_DIR}/lib ${include_dirs} ${gio_INCLUDE_DIRS} ${gio-unix_INCLUDE_DIRS} /usr/include/amb /usr/include/dbus-1.0)
++include_directories(${CMAKE_SOURCE_DIR}/lib ${include_dirs} ${gio_INCLUDE_DIRS} ${gio-unix_INCLUDE_DIRS} ${ambd_INCLUDE_DIRS} ${DBUS_DIR})
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -std=c++11 -O3")
+ set(vehicleplugin_headers common.h abstractconfig.h ambconfig.h convert.h standardmessage.h datamessage.h eventmessage.h messageformat.h controlwebsocket.h mwinterface.h viccommunicator.h ambinterface.h)
+diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
+index 415a1c5..2491c39 100644
+--- a/tests/CMakeLists.txt
++++ b/tests/CMakeLists.txt
+@@ -1,6 +1,6 @@
+ include(CheckIncludeFiles)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -std=c++11")
+-include_directories(${CMAKE_SOURCE_DIR}/lib ${include_dirs} ${gio_INCLUDE_DIRS} ${gio-unix_INCLUDE_DIRS} ${ambd_INCLUDE_DIRS} ${appcore-efl_INCLUDE_DIRS}  ${elementary_INCLUDE_DIRS} /usr/include/ico-util ../src/)
++include_directories(${CMAKE_SOURCE_DIR}/lib ${include_dirs} ${gio_INCLUDE_DIRS} ${gio-unix_INCLUDE_DIRS} ${ambd_INCLUDE_DIRS} ${appcore-efl_INCLUDE_DIRS}  ${elementary_INCLUDE_DIRS} ${ICO_UTIL_DIR} ../src/)
+ set(VICCommon_sources ../src/standardmessage.cc ../src/datamessage.cc ../src/eventmessage.cc controlwebsocketclient.cc)
+ set(Common_sources ../src/abstractconfig.cc ../src/ambconfig.cc logresult.cc)
+diff --git a/tool/CMakeLists.txt b/tool/CMakeLists.txt
+index 5669512..9bb46a3 100644
+--- a/tool/CMakeLists.txt
++++ b/tool/CMakeLists.txt
+@@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 2.8)
+ include(CheckIncludeFiles)
+ set(ico_set_vehicleinfo_sources ico_set_vehicleinfo.c)
+-include_directories(${CMAKE_SOURCE_DIR}/lib ${include_dirs} /usr/include/ico-util)
++
++include_directories(${CMAKE_SOURCE_DIR}/lib ${include_dirs} ${ICO_UTIL_DIR})
+ add_executable(ico_set_vehicleinfo ${ico_set_vehicleinfo_sources})
+ target_link_libraries(ico_set_vehicleinfo websockets -L${CMAKE_CURRENT_BINARY_DIR}/lib ${link_libraries} -lico-util)
diff --git a/meta-tizen-ivi/recipes-ico/ico-vic-amb-plugin/files/fix_remove_test_and_tools_build.patch b/meta-tizen-ivi/recipes-ico/ico-vic-amb-plugin/files/fix_remove_test_and_tools_build.patch
deleted file mode 100644 (file)
index e577a3f..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 8f5666f..623db0b 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -51,5 +51,4 @@ set(ico-vic-amb-plugin_docs README)
- install (FILES ${ico-vic-amb-plugin_docs} DESTINATION ${DOC_INSTALL_DIR})
- add_subdirectory(src)
--add_subdirectory(tests)
- add_subdirectory(tool)
index 0ffe0b1..51f3340 100644 (file)
@@ -1,3 +1,4 @@
-SRC_URI += " file://fix_remove_test_and_tools_build.patch"
+SRC_URI += " file://FixCXXFlag.patch"
+SRC_URI += " file://fixHardedPath.patch"
 
 FILES_${PN}-dbg += "/usr/lib/automotive-message-broker/.debug"