summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2019-10-19 13:45:11 -0700
committerMatt Ranostay <matt.ranostay@konsulko.com>2019-10-31 01:59:13 -0700
commit3e94024998c1615bd30306aab7537db22161a9ce (patch)
tree6bea3ac4de640d98c8c27ffd0c02f9eb86ca0773 /CMakeLists.txt
parent9539611e896e61e27154bbb5917188753a983871 (diff)
binding: navigation: rewrite of navigation binding
To remove dependency on DBus the binding needed to be rewritten to output pure JSON output to subscribed consumers. Bug-AGL: SPEC-2880 Change-Id: Ie85dfccd42ca36119116a0fbfb16bf4e96efc184 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt85
1 files changed, 21 insertions, 64 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9bd545b..b485097 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,64 +1,21 @@
-cmake_minimum_required(VERSION 2.8.11)
-
-INCLUDE(FindPkgConfig)
-
-set(PROJECT_NAME "agl-service-navigation")
-set(PROJECT_PRETTY_NAME "AFM binding for navigation service")
-set(PROJECT_DESCRIPTION "Binding for AGL Navigation API")
-set(PROJECT_INCLUDEDIR ${CMAKE_INSTALL_PREFIX}/include)
-set(PROJECT_LIBDIR ${CMAKE_INSTALL_PREFIX}/lib)
-set(PROJECT_API_VERSION 0.1.0)
-set(PROJECT_URL "https://wiki.automotivelinux.org/eg-navi")
-
-# Set a default build type if none was specified
-if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
- message(STATUS "Setting build type to 'Release' as none was specified.")
- set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
-endif()
-
-project(navi_binder)
-
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fPIC ")
-
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
-pkg_check_modules(DBUSCXX REQUIRED dbus-c++-1)
-pkg_check_modules(JSON REQUIRED json-c)
-pkg_check_modules(AFBWSC REQUIRED libafbwsc)
-
-include_directories( ${PROJECT_SOURCE_DIR}/libnavi/include ${PROJECT_SOURCE_DIR}/include ${DBUSCXX_INCLUDE_DIRS} ${JSON_INCLUDE_DIRS} ${AFBWSC_INCLUDE_DIRS} )
-
-add_library( naviapi-agl SHARED libnavi/src/navicore.cpp libnavi/src/navicorelistener.cpp libnavi/src/BinderClient.cpp libnavi/src/JsonRequestGenerator.cpp libnavi/src/JsonResponseAnalyzer.cpp libnavi/src/RequestManage.cpp )
-target_link_libraries( naviapi-agl ${JSON_LIBRARIES} ${AFBWSC_LIBRARIES} )
-set_target_properties(naviapi-agl PROPERTIES VERSION 0.1.0 SOVERSION 0)
-
-install(TARGETS naviapi-agl LIBRARY DESTINATION ${PROJECT_LIBDIR})
-install(FILES ${PROJECT_SOURCE_DIR}/libnavi/include/libnavicore.hpp DESTINATION ${PROJECT_INCLUDEDIR})
-
-add_library( NaviAPIService SHARED src/api.cpp src/analyze_request.cpp src/binder_reply.cpp src/genivi_request.cpp )
-
-target_link_libraries( NaviAPIService ${DBUSCXX_LIBRARIES} ${JSON_LIBRARIES} ${AFBWSC_LIBRARIES} )
-
-##########################################################################
-# AGL binding
-configure_file(config.xml.in config.xml)
-set(BINARY_NAME "naviapi.wgt")
-
-add_custom_command(
- OUTPUT ${BINARY_NAME}
- DEPENDS NaviAPIService
- COMMAND rm -rf package
- COMMAND mkdir -p package/root
- COMMAND mkdir -p package/root/lib
- COMMAND mv config.xml package/root/
- COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/navigation.png package/root/icon.png
- COMMAND mv libNaviAPIService.so package/root/lib
- COMMAND wgtpkg-pack -f -o package/${BINARY_NAME} package/root
-)
-add_custom_target(widget ALL DEPENDS ${BINARY_NAME})
-
-#generate configure file
-configure_file(libnaviapi-agl.pc.in libnaviapi-agl.pc @ONLY)
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libnaviapi-agl.pc
- DESTINATION
- ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig)
+###########################################################################
+# Copyright 2015, 2016, 2017 IoT.bzh
+#
+# author: Romain Forlot <romain.forlot@iot.bzh>
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+###########################################################################
+
+CMAKE_MINIMUM_REQUIRED(VERSION 3.3)
+
+include(${CMAKE_CURRENT_SOURCE_DIR}/conf.d/cmake/config.cmake)