summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorasanoaozora <fifitaneki@hotmail.com>2017-02-09 16:05:16 +0100
committerasanoaozora <fifitaneki@hotmail.com>2017-02-09 16:05:16 +0100
commit57345f36fa6095ecb6d7f7998a06abafbcd90a87 (patch)
tree7d8004dafb727f312189007eae462fb487a81724
parent43c37bba55cd2ffdbd4aec5f1a5583446c12190a (diff)
downloadpositioning-57345f36fa6095ecb6d7f7998a06abafbcd90a87.tar.gz
refine CMakeLists.txt to allow DLT build, tests OK
-rw-r--r--enhanced-position-service/dbus/FindDLT.cmake30
-rw-r--r--enhanced-position-service/dbus/src/CMakeLists.txt3
-rw-r--r--enhanced-position-service/dbus/test/CMakeLists.txt3
-rw-r--r--enhanced-position-service/franca/FindDLT.cmake30
-rwxr-xr-xenhanced-position-service/franca/src/CMakeLists.txt8
-rw-r--r--gnss-service/FindDLT.cmake30
-rw-r--r--gnss-service/src/CMakeLists.txt3
-rwxr-xr-xgnss-service/test/CMakeLists.txt3
-rw-r--r--gnss-service/test/compliance-test/CMakeLists.txt3
-rw-r--r--log-replayer/FindDLT.cmake30
-rw-r--r--log-replayer/src/CMakeLists.txt3
-rw-r--r--log-replayer/src/log-replayer.c2
-rw-r--r--log-replayer/test/CMakeLists.txt2
-rw-r--r--logger/FindDLT.cmake30
-rw-r--r--logger/src/CMakeLists.txt3
-rw-r--r--logger/test/CMakeLists.txt4
-rwxr-xr-xposition-web-service/src/plugin/fbprojects/PositionWebService/FindDLT.cmake30
-rw-r--r--sensors-service/FindDLT.cmake30
-rw-r--r--sensors-service/src/CMakeLists.txt3
-rw-r--r--sensors-service/test/CMakeLists.txt3
20 files changed, 16 insertions, 237 deletions
diff --git a/enhanced-position-service/dbus/FindDLT.cmake b/enhanced-position-service/dbus/FindDLT.cmake
deleted file mode 100644
index 8fedea1..0000000
--- a/enhanced-position-service/dbus/FindDLT.cmake
+++ /dev/null
@@ -1,30 +0,0 @@
-###########################################################################
-# @licence app begin@
-# SPDX-License-Identifier: MPL-2.0
-#
-# Component Name: EnhancedPositionService
-#
-# Author: Marco Residori
-#
-# Copyright (C) 2014, XS Embedded GmbH
-#
-# License:
-# This Source Code Form is subject to the terms of the
-# Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
-# this file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-# @licence end@
-###########################################################################
-
-set(DLT_INCLUDE_DIRS /usr/local/include/dlt)
-set(DLT_LIBRARIES dlt)
-set(DLT_LIBRARY_DIRS /usr/local/lib)
-
-find_package(PkgConfig)
-pkg_check_modules(DLT REQUIRED automotive-dlt)
-
-if(${DLT_FOUND})
- #message(STATUS "found and use automotive-dlt: version ${DLT_VERSION}")
-else()
- message("missing DLT - check with 'pkg-config automotive-dlt --cflags-only-I'")
-endif()
diff --git a/enhanced-position-service/dbus/src/CMakeLists.txt b/enhanced-position-service/dbus/src/CMakeLists.txt
index 8776e6b..ef97c02 100644
--- a/enhanced-position-service/dbus/src/CMakeLists.txt
+++ b/enhanced-position-service/dbus/src/CMakeLists.txt
@@ -64,8 +64,7 @@ set(LIBRARIES
if(WITH_DLT)
add_definitions("-DDLT_ENABLED=1")
- set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/..")
- find_package(DLT REQUIRED)
+ pkg_check_modules(DLT REQUIRED automotive-dlt)
include_directories( ${DLT_INCLUDE_DIRS} )
set(LIBRARIES ${LIBRARIES} ${DLT_LIBRARIES})
endif()
diff --git a/enhanced-position-service/dbus/test/CMakeLists.txt b/enhanced-position-service/dbus/test/CMakeLists.txt
index a254276..0a234cf 100644
--- a/enhanced-position-service/dbus/test/CMakeLists.txt
+++ b/enhanced-position-service/dbus/test/CMakeLists.txt
@@ -47,8 +47,7 @@ set(LIBRARIES
if(WITH_DLT)
add_definitions("-DDLT_ENABLED=1")
- set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/..")
- find_package(DLT REQUIRED)
+ pkg_check_modules(DLT REQUIRED automotive-dlt)
include_directories( ${DLT_INCLUDE_DIRS} )
set(LIBRARIES ${LIBRARIES} ${DLT_LIBRARIES})
endif()
diff --git a/enhanced-position-service/franca/FindDLT.cmake b/enhanced-position-service/franca/FindDLT.cmake
deleted file mode 100644
index 354f1d5..0000000
--- a/enhanced-position-service/franca/FindDLT.cmake
+++ /dev/null
@@ -1,30 +0,0 @@
-###########################################################################
-# @licence app begin@
-# SPDX-License-Identifier: MPL-2.0
-#
-# Component Name: EnhancedPositionService
-#
-# Author: Marco Residori
-#
-# Copyright (C) 2014, XS Embedded GmbH
-#
-# License:
-# This Source Code Form is subject to the terms of the
-# Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
-# this file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-# @licence end@
-###########################################################################
-
-set(DLT_INCLUDE_DIRS /usr/include/dlt)
-set(DLT_LIBRARIES dlt)
-set(DLT_LIBRARY_DIRS /usr/lib)
-
-find_package(PkgConfig)
-pkg_check_modules(DLT REQUIRED automotive-dlt)
-
-if(${DLT_FOUND})
- #message(STATUS "found and use automotive-dlt: version ${DLT_VERSION}")
-else()
- message("missing DLT - check with 'pkg-config automotive-dlt --cflags-only-I'")
-endif()
diff --git a/enhanced-position-service/franca/src/CMakeLists.txt b/enhanced-position-service/franca/src/CMakeLists.txt
index d98fb35..6f8b844 100755
--- a/enhanced-position-service/franca/src/CMakeLists.txt
+++ b/enhanced-position-service/franca/src/CMakeLists.txt
@@ -100,9 +100,8 @@ if (WITH_FRANCA_DBUS_INTERFACE)
if(WITH_DLT)
add_definitions("-DDLT_ENABLED=1")
- set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/..")
- find_package(DLT REQUIRED)
- include_directories( ${DLT_INCLUDE_DIRS} )
+ pkg_check_modules(DLT REQUIRED automotive-dlt)
+ include_directories( ${DLT_INCLUDE_DIRS} )
set(LIBRARIES ${LIBRARIES} ${DLT_LIBRARIES})
endif()
@@ -185,8 +184,7 @@ if (WITH_FRANCA_SOMEIP_INTERFACE)
if(WITH_DLT)
add_definitions("-DDLT_ENABLED=1")
- set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/..")
- find_package(DLT REQUIRED)
+ pkg_check_modules(DLT REQUIRED automotive-dlt)
include_directories( ${DLT_INCLUDE_DIRS} )
set(LIBRARIES ${LIBRARIES} ${DLT_LIBRARIES})
endif()
diff --git a/gnss-service/FindDLT.cmake b/gnss-service/FindDLT.cmake
deleted file mode 100644
index 3743cd7..0000000
--- a/gnss-service/FindDLT.cmake
+++ /dev/null
@@ -1,30 +0,0 @@
-###########################################################################
-# @licence app begin@
-# SPDX-License-Identifier: MPL-2.0
-#
-# Component Name: GNSSService
-#
-# Author: Marco Residori
-#
-# Copyright (C) 2014, XS Embedded GmbH
-#
-# License:
-# This Source Code Form is subject to the terms of the
-# Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
-# this file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-# @licence end@
-###########################################################################
-
-set(DLT_INCLUDE_DIRS /usr/local/include/dlt)
-set(DLT_LIBRARIES dlt)
-set(DLT_LIBRARY_DIRS /usr/local/lib)
-
-find_package(PkgConfig)
-pkg_check_modules(DLT REQUIRED automotive-dlt)
-
-if(${DLT_FOUND})
- #message(STATUS "found and use automotive-dlt: version ${DLT_VERSION}")
-else()
- message("missing DLT - check with 'pkg-config automotive-dlt --cflags-only-I'")
-endif()
diff --git a/gnss-service/src/CMakeLists.txt b/gnss-service/src/CMakeLists.txt
index ccbe26f..3e58ace 100644
--- a/gnss-service/src/CMakeLists.txt
+++ b/gnss-service/src/CMakeLists.txt
@@ -35,8 +35,7 @@ set(LIBRARIES pthread m)
if(WITH_DLT)
add_definitions("-DDLT_ENABLED=1")
- set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}")
- find_package(DLT REQUIRED)
+ pkg_check_modules(DLT REQUIRED automotive-dlt)
include_directories( ${DLT_INCLUDE_DIRS} )
set(LIBRARIES ${LIBRARIES} ${DLT_LIBRARIES})
endif()
diff --git a/gnss-service/test/CMakeLists.txt b/gnss-service/test/CMakeLists.txt
index dff5617..8924a98 100755
--- a/gnss-service/test/CMakeLists.txt
+++ b/gnss-service/test/CMakeLists.txt
@@ -47,8 +47,7 @@ endif()
if(WITH_DLT)
add_definitions("-DDLT_ENABLED=1")
- set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}")
- find_package(DLT REQUIRED)
+ pkg_check_modules(DLT REQUIRED automotive-dlt)
include_directories( ${DLT_INCLUDE_DIRS} )
set(LIBRARIES ${LIBRARIES} ${DLT_LIBRARIES})
endif()
diff --git a/gnss-service/test/compliance-test/CMakeLists.txt b/gnss-service/test/compliance-test/CMakeLists.txt
index 3e30b7c..1a8699b 100644
--- a/gnss-service/test/compliance-test/CMakeLists.txt
+++ b/gnss-service/test/compliance-test/CMakeLists.txt
@@ -48,8 +48,7 @@ endif()
if(WITH_DLT)
add_definitions("-DDLT_ENABLED=1")
- set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}")
- find_package(DLT REQUIRED)
+ pkg_check_modules(DLT REQUIRED automotive-dlt)
include_directories( ${DLT_INCLUDE_DIRS} )
set(LIBRARIES ${LIBRARIES} ${DLT_LIBRARIES})
endif()
diff --git a/log-replayer/FindDLT.cmake b/log-replayer/FindDLT.cmake
deleted file mode 100644
index a52cdf6..0000000
--- a/log-replayer/FindDLT.cmake
+++ /dev/null
@@ -1,30 +0,0 @@
-###########################################################################
-# @licence app begin@
-# SPDX-License-Identifier: MPL-2.0
-#
-# Component Name: LogReplayer
-#
-# Author: Marco Residori
-#
-# Copyright (C) 2014, XS Embedded GmbH
-#
-# License:
-# This Source Code Form is subject to the terms of the
-# Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
-# this file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-# @licence end@
-###########################################################################
-
-set(DLT_INCLUDE_DIRS /usr/local/include/dlt)
-set(DLT_LIBRARIES dlt)
-set(DLT_LIBRARY_DIRS /usr/local/lib)
-
-find_package(PkgConfig)
-pkg_check_modules(DLT REQUIRED automotive-dlt)
-
-if(${DLT_FOUND})
- #message(STATUS "found and use automotive-dlt: version ${DLT_VERSION}")
-else()
- message("missing DLT - check with 'pkg-config automotive-dlt --cflags-only-I'")
-endif()
diff --git a/log-replayer/src/CMakeLists.txt b/log-replayer/src/CMakeLists.txt
index c930858..87b9cad 100644
--- a/log-replayer/src/CMakeLists.txt
+++ b/log-replayer/src/CMakeLists.txt
@@ -27,8 +27,7 @@ set(LIB_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/log-replayer.c)
set(LIBRARIES pthread)
if(WITH_DLT)
- set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}")
- find_package(DLT REQUIRED)
+ pkg_check_modules(DLT REQUIRED automotive-dlt)
add_definitions("-DDLT_ENABLED=1")
include_directories( ${DLT_INCLUDE_DIRS} )
set(LIBRARIES ${LIBRARIES} ${DLT_LIBRARIES})
diff --git a/log-replayer/src/log-replayer.c b/log-replayer/src/log-replayer.c
index 9628f76..ca3484d 100644
--- a/log-replayer/src/log-replayer.c
+++ b/log-replayer/src/log-replayer.c
@@ -114,7 +114,7 @@ bool getStrToSend(FILE* file, char* line, int dim)
if(usleep(delta*1000) != 0) // TODO time drift issues
{
- LOG_WARNING(gContext,"uslee failed");
+ LOG_WARNING(gContext,"uslee failed %d",0);
return true;
}
diff --git a/log-replayer/test/CMakeLists.txt b/log-replayer/test/CMakeLists.txt
index 2097d40..0327503 100644
--- a/log-replayer/test/CMakeLists.txt
+++ b/log-replayer/test/CMakeLists.txt
@@ -33,7 +33,7 @@ set(LIBRARIES pthread)
if(WITH_DLT)
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}")
- find_package(DLT REQUIRED)
+ pkg_check_modules(DLT REQUIRED automotive-dlt)
add_definitions("-DDLT_ENABLED=1")
include_directories( ${DLT_INCLUDE_DIRS} )
set(LIBRARIES ${LIBRARIES} ${DLT_LIBRARIES})
diff --git a/logger/FindDLT.cmake b/logger/FindDLT.cmake
deleted file mode 100644
index c92aba9..0000000
--- a/logger/FindDLT.cmake
+++ /dev/null
@@ -1,30 +0,0 @@
-###########################################################################
-# @licence app begin@
-# SPDX-License-Identifier: MPL-2.0
-#
-# Component Name: LogReplayer
-#
-# Author: Marco Residori
-#
-# Copyright (C) 2014, XS Embedded GmbH
-#
-# License:
-# This Source Code Form is subject to the terms of the
-# Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
-# this file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-# @licence end@
-###########################################################################
-
-set(DLT_INCLUDE_DIRS /usr/include/dlt)
-set(DLT_LIBRARIES dlt)
-set(DLT_LIBRARY_DIRS /usr/lib)
-
-find_package(PkgConfig)
-pkg_check_modules(DLT REQUIRED automotive-dlt)
-
-if(${DLT_FOUND})
- #message(STATUS "found and use automotive-dlt: version ${DLT_VERSION}")
-else()
- message("missing DLT - check with 'pkg-config automotive-dlt --cflags-only-I'")
-endif()
diff --git a/logger/src/CMakeLists.txt b/logger/src/CMakeLists.txt
index 969f012..7b8f207 100644
--- a/logger/src/CMakeLists.txt
+++ b/logger/src/CMakeLists.txt
@@ -30,8 +30,7 @@ set(LIB_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/poslog.cpp)
set(LIBRARIES pthread)
if(WITH_DLT)
- set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}")
- find_package(DLT REQUIRED)
+ pkg_check_modules(DLT REQUIRED automotive-dlt)
add_definitions("-DDLT_ENABLED=1")
include_directories( ${DLT_INCLUDE_DIRS} )
set(LIBRARIES ${LIBRARIES} ${DLT_LIBRARIES})
diff --git a/logger/test/CMakeLists.txt b/logger/test/CMakeLists.txt
index eea7f5a..280b0aa 100644
--- a/logger/test/CMakeLists.txt
+++ b/logger/test/CMakeLists.txt
@@ -38,7 +38,7 @@ set(LIBRARIES pthread poslog)
if(WITH_DLT)
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}")
- find_package(DLT REQUIRED)
+ pkg_check_modules(DLT REQUIRED automotive-dlt)
add_definitions("-DDLT_ENABLED=1")
include_directories( ${DLT_INCLUDE_DIRS} )
set(LIBRARIES ${LIBRARIES} ${DLT_LIBRARIES})
@@ -99,7 +99,7 @@ include_directories(
if(WITH_DLT)
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}")
- find_package(DLT REQUIRED)
+ pkg_check_modules(DLT REQUIRED automotive-dlt)
add_definitions("-DDLT_ENABLED=1")
include_directories( ${DLT_INCLUDE_DIRS} )
set(LIBRARIES ${LIBRARIES} ${DLT_LIBRARIES})
diff --git a/position-web-service/src/plugin/fbprojects/PositionWebService/FindDLT.cmake b/position-web-service/src/plugin/fbprojects/PositionWebService/FindDLT.cmake
deleted file mode 100755
index ef9d903..0000000
--- a/position-web-service/src/plugin/fbprojects/PositionWebService/FindDLT.cmake
+++ /dev/null
@@ -1,30 +0,0 @@
-###########################################################################
-# @licence app begin@
-# SPDX-License-Identifier: MPL-2.0
-#
-# Component Name: PositionWebService
-#
-# Author: Marco Residori
-#
-# Copyright (C) 2014, XS Embedded GmbH
-#
-# License:
-# This Source Code Form is subject to the terms of the
-# Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
-# this file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-# @licence end@
-###########################################################################
-
-set(DLT_INCLUDE_DIRS /usr/include/dlt)
-set(DLT_LIBRARIES dlt)
-set(DLT_LIBRARY_DIRS /usr/lib)
-
-find_package(PkgConfig)
-pkg_check_modules(DLT REQUIRED automotive-dlt)
-
-if(${DLT_FOUND})
- #message(STATUS "found and use automotive-dlt: version ${DLT_VERSION}")
-else()
- message("missing DLT - check with 'pkg-config automotive-dlt --cflags-only-I'")
-endif()
diff --git a/sensors-service/FindDLT.cmake b/sensors-service/FindDLT.cmake
deleted file mode 100644
index cb3e93a..0000000
--- a/sensors-service/FindDLT.cmake
+++ /dev/null
@@ -1,30 +0,0 @@
-###########################################################################
-# @licence app begin@
-# SPDX-License-Identifier: MPL-2.0
-#
-# Component Name: SensorsService
-#
-# Author: Marco Residori
-#
-# Copyright (C) 2014, XS Embedded GmbH
-#
-# License:
-# This Source Code Form is subject to the terms of the
-# Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
-# this file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-# @licence end@
-###########################################################################
-
-set(DLT_INCLUDE_DIRS /usr/local/include/dlt)
-set(DLT_LIBRARIES dlt)
-set(DLT_LIBRARY_DIRS /usr/local/lib)
-
-find_package(PkgConfig)
-pkg_check_modules(DLT REQUIRED automotive-dlt)
-
-if(${DLT_FOUND})
- #message(STATUS "found and use automotive-dlt: version ${DLT_VERSION}")
-else()
- message("missing DLT - check with 'pkg-config automotive-dlt --cflags-only-I'")
-endif()
diff --git a/sensors-service/src/CMakeLists.txt b/sensors-service/src/CMakeLists.txt
index f817eab..81ef164 100644
--- a/sensors-service/src/CMakeLists.txt
+++ b/sensors-service/src/CMakeLists.txt
@@ -35,8 +35,7 @@ set(LIBRARIES pthread)
if(WITH_DLT)
add_definitions("-DDLT_ENABLED=1")
- set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}")
- find_package(DLT REQUIRED)
+ pkg_check_modules(DLT REQUIRED automotive-dlt)
include_directories( ${DLT_INCLUDE_DIRS} )
set(LIBRARIES ${LIBRARIES} ${DLT_LIBRARIES})
endif()
diff --git a/sensors-service/test/CMakeLists.txt b/sensors-service/test/CMakeLists.txt
index 9114925..2298f75 100644
--- a/sensors-service/test/CMakeLists.txt
+++ b/sensors-service/test/CMakeLists.txt
@@ -45,8 +45,7 @@ endif()
if(WITH_DLT)
add_definitions("-DDLT_ENABLED=1")
- set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}")
- find_package(DLT REQUIRED)
+ pkg_check_modules(DLT REQUIRED automotive-dlt)
include_directories( ${DLT_INCLUDE_DIRS} )
link_directories ( ${DLT_LIBRARY_DIRS} )
set(LIBRARIES ${LIBRARIES} ${DLT_LIBRARIES})