Skip to content

Commit

Permalink
Merge remote-tracking branch 'lsts/master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
viktor-av committed Dec 8, 2023
2 parents 6b360dd + e5623c2 commit 310630b
Show file tree
Hide file tree
Showing 1,408 changed files with 207,125 additions and 102,486 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: linux

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Prepare
run: cmake -B ${{github.workspace}}/build -DDEBUG=1 -DTESTS=1

- name: Build & Test
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --target Experimental
11 changes: 9 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
/.project
*.pyc
*/__pycache__
private/
private*/
*~
\#*
.\#*
*.mo
CMakeLists.txt.user
user/
user*/
build/
.cproject
.settings/
/.vscode
/.idea
cmake-build-debug/

49 changes: 37 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# Copyright 2007-2017 Universidade do Porto - Faculdade de Engenharia #
# Copyright 2007-2023 Universidade do Porto - Faculdade de Engenharia #
# Laboratório de Sistemas e Tecnologia Subaquática (LSTS) #
############################################################################
# This file is part of DUNE: Unified Navigation Environment. #
Expand Down Expand Up @@ -28,12 +28,17 @@
############################################################################

# Validate CMake version.
cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR)
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)

if(COMMAND CMAKE_POLICY)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND CMAKE_POLICY)

# Required C++ Standard.
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

include(cmake/Toolchain.cmake)

##########################################################################
Expand All @@ -43,10 +48,10 @@ project("DUNE")
set(PROJECT_NAME "DUNE: Unified Navigation Environment")
set(PROJECT_SHORT_NAME "DUNE")
set(PROJECT_VENDOR "Universidade do Porto - LSTS")
set(PROJECT_COPYRIGHT "Copyright (C) 2007-2017 - ${PROJECT_VENDOR}")
set(PROJECT_COPYRIGHT "Copyright (C) 2007-2023 - ${PROJECT_VENDOR}")
set(PROJECT_CONTACT "DUNE <[email protected]>")
set(PROJECT_VERSION_YEAR "2017")
set(PROJECT_VERSION_MONTH "01")
set(PROJECT_VERSION_YEAR "2022")
set(PROJECT_VERSION_MONTH "04")
set(PROJECT_VERSION_PATCH "0")
set(PROJECT_VERSION_RCN "0")

Expand Down Expand Up @@ -88,8 +93,12 @@ dune_option(JS "Enable support for SpiderMonkey javascript engine")
dune_option(XENETH "Enable support for the Xeneth SDK")
dune_option(BLUEVIEW "Enable support for the BlueView SDK")
dune_option(OPENCV "Enable support for OpenCV")
dune_option(POINTGREY "Enable support for POINTGREY")
dune_option(EXIV2 "Enable support for Exiv2")
dune_option(NO_RTTI "Disable support for RTTI")
dune_option(UEYE "Enable support for IDS uEye cameras")
dune_option(H5CPP "Enable support for hdf5 format i/o using the h5cpp library")
dune_option(ELLIPSOIDAL "Enable ellipsoidal coordinates in (WGS84) displace")

# Internationalization.
include(${PROJECT_SOURCE_DIR}/cmake/I18N.cmake)
Expand Down Expand Up @@ -159,6 +168,10 @@ file(GLOB_RECURSE DUNE_CORE_HEADERS "${PROJECT_SOURCE_DIR}/src/DUNE/*.hpp"
file(GLOB_RECURSE DUNE_CORE_DEFS "${PROJECT_SOURCE_DIR}/src/DUNE/*.def")
string(REPLACE ";" " " DUNE_CORE_HEADERS_STRING "${DUNE_CORE_HEADERS}")

file(GLOB_RECURSE USER_CORE_SOURCES "${PROJECT_SOURCE_DIR}/user*/src/USER/*.cpp")
file(GLOB_RECURSE USER_CORE_HEADERS "${PROJECT_SOURCE_DIR}/user*/src/USER/*.hpp")
string(REPLACE ";" " " USER_CORE_HEADERS_STRING "${USER_CORE_HEADERS}")

configure_file(${PROJECT_SOURCE_DIR}/src/DUNE/Config.hpp.in
${DUNE_GENERATED}/src/DUNE/Config.hpp)

Expand All @@ -167,7 +180,7 @@ install(FILES ${DUNE_GENERATED}/src/DUNE/Config.hpp

include(${PROJECT_SOURCE_DIR}/cmake/Version.cmake)

set_source_files_properties(${DUNE_CORE_SOURCES}
set_source_files_properties(${DUNE_CORE_SOURCES} ${USER_CORE_SOURCES}
PROPERTIES COMPILE_FLAGS "${DUNE_CXX_FLAGS} ${DUNE_CXX_FLAGS_STRICT}")

if(DUNE_OS_WINDOWS)
Expand All @@ -178,7 +191,7 @@ if(DUNE_OS_WINDOWS)
${DUNE_GENERATED}/src/DUNE/Version.rc)
endif(DUNE_OS_WINDOWS)

foreach(header ${DUNE_CORE_HEADERS})
foreach(header ${DUNE_CORE_HEADERS} ${USER_CORE_HEADERS})
string(REGEX REPLACE "${PROJECT_SOURCE_DIR}/" "" header ${header})
string(REGEX REPLACE "src" "include" destination ${header})
get_filename_component(destination ${destination} PATH)
Expand All @@ -192,29 +205,31 @@ foreach(extlib ${extlibs})
endforeach(extlib ${extlibs})

# Private Libraries.
file(GLOB extlibs ${PROJECT_SOURCE_DIR}/private/vendor/libraries/*/Library.cmake)
file(GLOB extlibs ${PROJECT_SOURCE_DIR}/private*/vendor/libraries/*/Library.cmake)
foreach(extlib ${extlibs})
include(${extlib})
endforeach(extlib ${extlibs})

# User Libraries.
file(GLOB extlibs ${PROJECT_SOURCE_DIR}/user/vendor/libraries/*/Library.cmake)
file(GLOB extlibs ${PROJECT_SOURCE_DIR}/user*/vendor/libraries/*/Library.cmake)
foreach(extlib ${extlibs})
include(${extlib})
endforeach(extlib ${extlibs})

include_directories(${DUNE_GENERATED}/src ${PROJECT_SOURCE_DIR}/src ${DUNE_VENDOR_INCS_DIR})
file(GLOB DUNE_SOURCE_USER ${PROJECT_SOURCE_DIR}/user*/src)
include_directories(${DUNE_GENERATED}/src ${PROJECT_SOURCE_DIR}/src ${DUNE_SOURCE_USER} ${DUNE_VENDOR_INCS_DIR})
link_directories(${DUNE_VENDOR_LIBS_DIR})
set(DUNE_CORE_FILES ${DUNE_CORE_SOURCES} ${DUNE_VENDOR_FILES})
set(USER_CORE_FILES ${USER_CORE_SOURCES} ${USER_VENDOR_FILES})

if(DUNE_SHARED)
message(STATUS "Building shared library")
add_library(dune-core SHARED ${DUNE_CORE_FILES})
add_library(dune-core SHARED ${DUNE_CORE_FILES} ${USER_CORE_FILES} )
set_target_properties(dune-core PROPERTIES DEFINE_SYMBOL DUNE_DLL_EXPORT)
target_link_libraries(dune-core ${DUNE_SYS_LIBS})
else(DUNE_SHARED)
message(STATUS "Building static library")
add_library(dune-core STATIC ${DUNE_CORE_FILES})
add_library(dune-core STATIC ${DUNE_CORE_FILES} ${USER_CORE_FILES} )
if(DUNE_CXX_MICROSOFT AND DUNE_CPU_X86)
if(DUNE_CPU_32B)
set_target_properties(dune-core PROPERTIES STATIC_LIBRARY_FLAGS "/machine:x86")
Expand All @@ -226,6 +241,11 @@ endif(DUNE_SHARED)

add_dependencies(dune-core dune-version)

# WGS84 Coordinate Type
if(ELLIPSOIDAL)
add_definitions(-DDUNE_ELLIPSOIDAL_DISPLACE)
endif(ELLIPSOIDAL)

##########################################################################
# Tasks #
##########################################################################
Expand Down Expand Up @@ -325,6 +345,11 @@ install(DIRECTORY www DESTINATION .)
# Install configuration files.
install(DIRECTORY etc DESTINATION .)

if(EXISTS "${PROJECT_SOURCE_DIR}/private/etc/")
# Install private configuration files.
install(DIRECTORY private/etc DESTINATION ./private/)
endif(EXISTS "${PROJECT_SOURCE_DIR}/private/etc/")

if(EXISTS "${PROJECT_SOURCE_DIR}/user/etc/")
# Install user configuration files.
install(DIRECTORY user/etc DESTINATION ./user/)
Expand Down
2 changes: 1 addition & 1 deletion CTestConfig.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# Copyright 2007-2017 Universidade do Porto - Faculdade de Engenharia #
# Copyright 2007-2023 Universidade do Porto - Faculdade de Engenharia #
# Laboratório de Sistemas e Tecnologia Subaquática (LSTS) #
############################################################################
# This file is part of DUNE: Unified Navigation Environment. #
Expand Down
2 changes: 1 addition & 1 deletion LICENCE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
DUNE: Unified Navigation Environment
====================================

DUNE © Universidade do Porto - Faculdade de Engenharia 2007-2017.
DUNE Copyright © 2007-2023 Universidade do Porto - Faculdade de Engenharia.

Commercial Licence Usage
------------------------
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ DUNE: Unified Navigation Environment
======================================

DUNE: Unified Navigation Environment is a runtime environment for unmanned systems on-board software. It is used to write generic embedded software at the heart of the system, e.g. code or control, navigation, communication, sensor and actuator access, etc. It provides an operating-system and architecture independent platform abstraction layer, written in C++, enhancing portability among different CPU architectures and operating systems.

[![Build Status](https://travis-ci.org/LSTS/dune.svg?branch=master)](https://travis-ci.org/LSTS/dune)
[![Build status](https://ci.appveyor.com/api/projects/status/tdcdgyf408u4y0ng?svg=true)](https://ci.appveyor.com/project/zepinto/dune)
2 changes: 1 addition & 1 deletion cmake/Architecture.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# Copyright 2007-2017 Universidade do Porto - Faculdade de Engenharia #
# Copyright 2007-2023 Universidade do Porto - Faculdade de Engenharia #
# Laboratório de Sistemas e Tecnologia Subaquática (LSTS) #
############################################################################
# This file is part of DUNE: Unified Navigation Environment. #
Expand Down
2 changes: 1 addition & 1 deletion cmake/CXXLibrary.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# Copyright 2007-2017 Universidade do Porto - Faculdade de Engenharia #
# Copyright 2007-2023 Universidade do Porto - Faculdade de Engenharia #
# Laboratório de Sistemas e Tecnologia Subaquática (LSTS) #
############################################################################
# This file is part of DUNE: Unified Navigation Environment. #
Expand Down
4 changes: 2 additions & 2 deletions cmake/Compiler.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# Copyright 2007-2017 Universidade do Porto - Faculdade de Engenharia #
# Copyright 2007-2023 Universidade do Porto - Faculdade de Engenharia #
# Laboratório de Sistemas e Tecnologia Subaquática (LSTS) #
############################################################################
# This file is part of DUNE: Unified Navigation Environment. #
Expand Down Expand Up @@ -72,7 +72,7 @@ macro(dune_probe_cxx)
if(NOT DUNE_CXX_NAME)
check_symbol_exists(__GNUC__ stdio.h DUNE_CXX_GNU)
if(DUNE_CXX_GNU)
exec_program(${CMAKE_CXX_COMPILER} ARGS -dumpversion OUTPUT_VARIABLE verinfo)
exec_program(${CMAKE_CXX_COMPILER} ARGS -dumpfullversion -dumpversion OUTPUT_VARIABLE verinfo)
string(REPLACE "." ";" gxxver ${verinfo})
list(GET gxxver 0 gxxmaj)
list(GET gxxver 1 gxxmin)
Expand Down
2 changes: 1 addition & 1 deletion cmake/Functions.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# Copyright 2007-2017 Universidade do Porto - Faculdade de Engenharia #
# Copyright 2007-2023 Universidade do Porto - Faculdade de Engenharia #
# Laboratório de Sistemas e Tecnologia Subaquática (LSTS) #
############################################################################
# This file is part of DUNE: Unified Navigation Environment. #
Expand Down
4 changes: 3 additions & 1 deletion cmake/Headers.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# Copyright 2007-2017 Universidade do Porto - Faculdade de Engenharia #
# Copyright 2007-2023 Universidade do Porto - Faculdade de Engenharia #
# Laboratório de Sistemas e Tecnologia Subaquática (LSTS) #
############################################################################
# This file is part of DUNE: Unified Navigation Environment. #
Expand Down Expand Up @@ -130,6 +130,7 @@ macro(dune_probe_headers)
dune_test_header(sys/vfs.h)
dune_test_header(sys/statvfs.h)
dune_test_header(sys/syscall.h)
dune_test_header(sys/reboot.h)
dune_test_header(termios.h)
dune_test_header(unistd.h)
dune_test_header(windows.h)
Expand All @@ -148,6 +149,7 @@ macro(dune_probe_headers)
dune_test_header(libintl.h)
dune_test_header(syslog.h)
dune_test_header(float.h)
dune_test_header(linux/pps.h)

# A few systems/libraries have non self contained headers (notably
# OpenBSD and RTEMS), to overcome this we perform the following
Expand Down
10 changes: 5 additions & 5 deletions cmake/I18N.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# Copyright 2007-2017 Universidade do Porto - Faculdade de Engenharia #
# Copyright 2007-2023 Universidade do Porto - Faculdade de Engenharia #
# Laboratório de Sistemas e Tecnologia Subaquática (LSTS) #
############################################################################
# This file is part of DUNE: Unified Navigation Environment. #
Expand Down Expand Up @@ -53,10 +53,10 @@ endif(DUNE_PROGRAM_PYTHON)
if(DUNE_PROGRAM_XGETTEXT)
file(GLOB_RECURSE headers "${PROJECT_SOURCE_DIR}/src/*.hpp")
file(GLOB_RECURSE sources "${PROJECT_SOURCE_DIR}/src/*.cpp")
file(GLOB_RECURSE private_headers "${PROJECT_SOURCE_DIR}/private/src/*.hpp")
file(GLOB_RECURSE private_sources "${PROJECT_SOURCE_DIR}/private/src/*.cpp")
file(GLOB_RECURSE user_headers "${PROJECT_SOURCE_DIR}/user/src/*.hpp")
file(GLOB_RECURSE user_sources "${PROJECT_SOURCE_DIR}/user/src/*.cpp")
file(GLOB_RECURSE private_headers "${PROJECT_SOURCE_DIR}/private*/src/*.hpp")
file(GLOB_RECURSE private_sources "${PROJECT_SOURCE_DIR}/private*/src/*.cpp")
file(GLOB_RECURSE user_headers "${PROJECT_SOURCE_DIR}/user*/src/*.hpp")
file(GLOB_RECURSE user_sources "${PROJECT_SOURCE_DIR}/user*/src/*.cpp")
file(GLOB_RECURSE texts "${PROJECT_SOURCE_DIR}/i18n/*.txt")

add_custom_target(i18n_extract
Expand Down
2 changes: 1 addition & 1 deletion cmake/IMC.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# Copyright 2007-2017 Universidade do Porto - Faculdade de Engenharia #
# Copyright 2007-2023 Universidade do Porto - Faculdade de Engenharia #
# Laboratório de Sistemas e Tecnologia Subaquática (LSTS) #
############################################################################
# This file is part of DUNE: Unified Navigation Environment. #
Expand Down
2 changes: 1 addition & 1 deletion cmake/Libraries/BVTSDK.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# Copyright 2007-2017 Universidade do Porto - Faculdade de Engenharia #
# Copyright 2007-2023 Universidade do Porto - Faculdade de Engenharia #
# Laboratório de Sistemas e Tecnologia Subaquática (LSTS) #
############################################################################
# This file is part of DUNE: Unified Navigation Environment. #
Expand Down
2 changes: 1 addition & 1 deletion cmake/Libraries/DC1394.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# Copyright 2007-2017 Universidade do Porto - Faculdade de Engenharia #
# Copyright 2007-2023 Universidade do Porto - Faculdade de Engenharia #
# Laboratório de Sistemas e Tecnologia Subaquática (LSTS) #
############################################################################
# This file is part of DUNE: Unified Navigation Environment. #
Expand Down
50 changes: 50 additions & 0 deletions cmake/Libraries/Exiv2.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
############################################################################
# Copyright 2007-2023 Universidade do Porto - Faculdade de Engenharia #
# Laboratório de Sistemas e Tecnologia Subaquática (LSTS) #
############################################################################
# This file is part of DUNE: Unified Navigation Environment. #
# #
# Commercial Licence Usage #
# Licencees holding valid commercial DUNE licences may use this file in #
# accordance with the commercial licence agreement provided with the #
# Software or, alternatively, in accordance with the terms contained in a #
# written agreement between you and Universidade do Porto. For licensing #
# terms, conditions, and further information contact [email protected]. #
# #
# European Union Public Licence - EUPL v.1.1 Usage #
# Alternatively, this file may be used under the terms of the EUPL, #
# Version 1.1 only (the "Licence"), appearing in the file LICENCE.md #
# included in the packaging of this file. You may not use this work #
# except in compliance with the Licence. Unless required by applicable #
# law or agreed to in writing, software distributed under the Licence is #
# distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF #
# ANY KIND, either express or implied. See the Licence for the specific #
# language governing permissions and limitations at #
# http://ec.europa.eu/idabc/eupl.html. #
############################################################################
# Author: Pedro Gonçalves #
############################################################################

if(EXIV2)
find_library(EXIV2_LIBRARY NAMES exiv2 PATHS /usr/lib)

if(${EXIV2_LIBRARY} STRLESS "libexiv2.so")
# Exiv2 Present
set(DUNE_SYS_HAS_EXIV2 1 CACHE INTERNAL "Exiv2 library")
set(DUNE_USING_EXIV2 1 CACHE INTERNAL "Exiv2 library")

# FIND_PACKAGE(Exiv2 REQUIRED)
dune_add_lib(exiv2)

# Check Header
dune_test_header(exiv2/exiv2.hpp)

else()
# Exiv2 not found on the system.
message(SEND_ERROR "Exiv2 was not found on the system.")
set(DUNE_SYS_HAS_EXIV2 0 CACHE INTERNAL "Exiv2 library")
set(DUNE_USING_EXIV2 0 CACHE INTERNAL "Exiv2 library")

endif()

endif(EXIV2)
2 changes: 1 addition & 1 deletion cmake/Libraries/FTD2XX.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# Copyright 2007-2017 OceanScan - Marine Systems & Technology, Lda. #
# Copyright 2007-2021 OceanScan - Marine Systems & Technology, Lda. #
############################################################################
# This file is part of DUNE: Unified Navigation Environment. #
# #
Expand Down
2 changes: 1 addition & 1 deletion cmake/Libraries/JPEG.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# Copyright 2007-2017 Universidade do Porto - Faculdade de Engenharia #
# Copyright 2007-2023 Universidade do Porto - Faculdade de Engenharia #
# Laboratório de Sistemas e Tecnologia Subaquática (LSTS) #
############################################################################
# This file is part of DUNE: Unified Navigation Environment. #
Expand Down
2 changes: 1 addition & 1 deletion cmake/Libraries/MCCUSB.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# Copyright 2007-2017 OceanScan - Marine Systems & Technology, Lda. #
# Copyright 2007-2021 OceanScan - Marine Systems & Technology, Lda. #
############################################################################
# This file is part of DUNE: Unified Navigation Environment. #
# #
Expand Down
2 changes: 1 addition & 1 deletion cmake/Libraries/OpenCV.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# Copyright 2007-2017 Universidade do Porto - Faculdade de Engenharia #
# Copyright 2007-2023 Universidade do Porto - Faculdade de Engenharia #
# Laboratório de Sistemas e Tecnologia Subaquática (LSTS) #
############################################################################
# This file is part of DUNE: Unified Navigation Environment. #
Expand Down
2 changes: 1 addition & 1 deletion cmake/Libraries/Phidget.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# Copyright 2007-2017 Universidade do Porto - Faculdade de Engenharia #
# Copyright 2007-2023 Universidade do Porto - Faculdade de Engenharia #
# Laboratório de Sistemas e Tecnologia Subaquática (LSTS) #
############################################################################
# This file is part of DUNE: Unified Navigation Environment. #
Expand Down
Loading

0 comments on commit 310630b

Please sign in to comment.