Commit 6b85986e authored by Reinhard Biegel's avatar Reinhard Biegel
Browse files

Merge branch 'develop' into 102-port-tests-from-qmake-to-cmake

parents 6eb636f9 7c858132
Pipeline #4866 canceled with stage
in 0 seconds
...@@ -6,7 +6,6 @@ Thumbs.db ...@@ -6,7 +6,6 @@ Thumbs.db
*.orig *.orig
*.rej *.rej
*.user *.user
.qmake*
.directory .directory
.vscode .vscode
DoxyGen/Function/doxy_build/* DoxyGen/Function/doxy_build/*
...@@ -23,3 +22,6 @@ doc/source/api.rst ...@@ -23,3 +22,6 @@ doc/source/api.rst
# third party references # third party references
deps/* deps/*
# clangd cache
.cache
...@@ -77,4 +77,6 @@ if(INSTALL_SYSTEM_RUNTIME_DEPS OR INSTALL_EXTRA_RUNTIME_DEPS) ...@@ -77,4 +77,6 @@ if(INSTALL_SYSTEM_RUNTIME_DEPS OR INSTALL_EXTRA_RUNTIME_DEPS)
include(install_deps) include(install_deps)
endif() endif()
include(install_xmlSchemas)
include(CPack) include(CPack)
...@@ -25,7 +25,7 @@ A list of frequently asked questions: ...@@ -25,7 +25,7 @@ A list of frequently asked questions:
2. __Which traffic signs does openPASS support?__ 2. __Which traffic signs does openPASS support?__
[Here](https://gitlab.eclipse.org/eclipse/simopenpass/simopenpass/-/blob/servant/sim/doc/DoxyGen/Function/Markdown/Simulation/Development/FrameworkModules.md#L310) is an overview over the supported traffic signs. [Here](https://gitlab.eclipse.org/eclipse/simopenpass/simopenpass/-/blob/servant/doc/source/advanced_topics/simulator/world_osi.rst#L157) is an overview over the supported traffic signs.
3. __Can openPASS simulate multiple simulation runs in parallel?__ 3. __Can openPASS simulate multiple simulation runs in parallel?__
......
################################################################################ ################################################################################
# Copyright (c) 2021 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # Copyright (c) 2021 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
# #
# This program and the accompanying materials are made available under the # This program and the accompanying materials are made
# terms of the Eclipse Public License 2.0 which is available at # available under the terms of the Eclipse Public License 2.0
# http://www.eclipse.org/legal/epl-2.0. # which is available at https://www.eclipse.org/legal/epl-2.0/
# #
# SPDX-License-Identifier: EPL-2.0 # SPDX-License-Identifier: EPL-2.0
################################################################################ ################################################################################
# #
# - Find OSI # Find Package Adapter for OSI (Open Simulation Interface)
# Find the OSI includes and library
# #
# OSI_INCLUDE_DIR - Where to find OSI includes # Creates the follwoing imported targets (if available):
# OSI_LIBRARIES - List of libraries when using OSI # - osi::shared
# OSI_FOUND - True if OSI was found # - osi::static
# - osi::pic
IF(OSI_INCLUDE_DIR) set(OSI_SHARED_NAMES
SET(OSI_FIND_QUIETLY TRUE) open_simulation_interface.lib
ENDIF(OSI_INCLUDE_DIR) libopen_simulation_interface.dll.a
libopen_simulation_interface.so
FIND_PATH(OSI_INCLUDE_DIR "osi3/osi_version.pb.h"
PATHS
${PREFIX_PATH}
$ENV{OSI_HOME}/include
$ENV{EXTERNLIBS}/OSI/include
/usr/local/include
/usr/include
DOC "OSI - Headers"
) )
SET(OSI_NAMES set(OSI_STATIC_NAMES
osi3/open_simulation_interface.lib open_simulation_interface_static.lib
osi3/libopen_simulation_interface.dll.a libopen_simulation_interface_static.a
osi3/libopen_simulation_interface_pic.lib
osi3/libopen_simulation_interface.so
) )
SET(OSI_DBG_NAMES set(OSI_PIC_NAMES
osi3/open_simulation_interfaced.lib open_simulation_interface_pic.lib
osi3/libopen_simulation_interfaced.dll.a libopen_simulation_interface_pic.a
osi3/libopen_simulation_interface_picd.lib
) )
FIND_LIBRARY(OSI_LIBRARY NAMES ${OSI_NAMES} find_library(OSI_SHARED_LIBRARY NAMES ${OSI_SHARED_NAMES}
PATHS PATHS
${PREFIX_PATH} ${PREFIX_PATH}
$ENV{OSI_HOME} /usr/local
$ENV{EXTERNLIBS}/OSI /usr
/usr/local PATH_SUFFIXES
/usr lib/osi3
PATH_SUFFIXES lib lib64 lib
DOC "OSI - Library" lib64
) )
INCLUDE(FindPackageHandleStandardArgs) find_library(OSI_STATIC_LIBRARY NAMES ${OSI_STATIC_NAMES}
PATHS
${PREFIX_PATH}
/usr/local
/usr
PATH_SUFFIXES
lib/osi3
lib
lib64
)
IF(MSVC) find_library(OSI_PIC_LIBRARY NAMES ${OSI_PIC_NAMES}
# VisualStudio needs a debug version PATHS
FIND_LIBRARY(OSI_LIBRARY_DEBUG NAMES ${OSI_DBG_NAMES}
PATHS
${PREFIX_PATH} ${PREFIX_PATH}
$ENV{OSI_HOME}/lib /usr/local
$ENV{EXTERNLIBS}/OSI/lib /usr
DOC "OSI - Library (Debug)" PATH_SUFFIXES
) lib/osi3
lib
lib64
)
if(OSI_SHARED_LIBRARY)
message(STATUS "Found OSI (shared): ${OSI_SHARED_LIBRARY}")
IF(OSI_LIBRARY_DEBUG AND OSI_LIBRARY) get_filename_component(OSI_SHARED_LIBRARY_DIR "${OSI_SHARED_LIBRARY}" DIRECTORY)
SET(OSI_LIBRARIES optimized ${OSI_LIBRARY} debug ${OSI_LIBRARY_DEBUG})
ENDIF(OSI_LIBRARY_DEBUG AND OSI_LIBRARY)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OSI DEFAULT_MSG OSI_LIBRARY OSI_LIBRARY_DEBUG OSI_INCLUDE_DIR) add_library(osi::shared IMPORTED SHARED)
set_target_properties(osi::shared
PROPERTIES
IMPORTED_LOCATION ${OSI_SHARED_LIBRARY}
IMPORTED_IMPLIB ${OSI_SHARED_LIBRARY}
INTERFACE_INCLUDE_DIRECTORIES ${OSI_SHARED_LIBRARY_DIR}/../../include
INTERFACE_LINK_LIBRARIES protobuf::libprotobuf)
else()
message(STATUS "Didn't find OSI (shared)")
endif()
MARK_AS_ADVANCED(OSI_LIBRARY OSI_LIBRARY_DEBUG OSI_INCLUDE_DIR) if(OSI_STATIC_LIBRARY)
message(STATUS "Found OSI (static): ${OSI_STATIC_LIBRARY}")
ELSE(MSVC) get_filename_component(OSI_STATIC_LIBRARY_DIR "${OSI_STATIC_LIBRARY}" DIRECTORY)
# rest of the world add_library(osi::static IMPORTED STATIC)
SET(OSI_LIBRARIES ${OSI_LIBRARY}) set_target_properties(osi::static
PROPERTIES
IMPORTED_LOCATION ${OSI_STATIC_LIBRARY}
INTERFACE_INCLUDE_DIRECTORIES ${OSI_STATIC_LIBRARY_DIR}/../../include
INTERFACE_LINK_LIBRARIES protobuf::libprotobuf_static)
else()
message(STATUS "Didn't find OSI (static)")
endif()
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OSI DEFAULT_MSG OSI_LIBRARY OSI_INCLUDE_DIR) if(OSI_PIC_LIBRARY)
message(STATUS "Found OSI (pic): ${OSI_PIC_LIBRARY}")
MARK_AS_ADVANCED(OSI_LIBRARY OSI_INCLUDE_DIR) get_filename_component(OSI_PIC_LIBRARY_DIR "${OSI_PIC_LIBRARY}" DIRECTORY)
add_library(osi::pic IMPORTED STATIC)
ENDIF(MSVC) set_target_properties(osi::pic
PROPERTIES
IMPORTED_LOCATION ${OSI_PIC_LIBRARY}
INTERFACE_INCLUDE_DIRECTORIES ${OSI_PIC_LIBRARY_DIR}/../../include
INTERFACE_LINK_LIBRARIES protobuf::libprotobuf_static)
else()
message(STATUS "Didn't find OSI (pic)")
endif()
unset(OSI_SHARED_LIBRARY)
unset(OSI_STATIC_LIBRARY)
unset(OSI_PIC_LIBRARY)
################################################################################
# Copyright (c) 2021 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
#
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
################################################################################
#
# find_package adapter for protobuf
#
# Original protpbuf CMake Config file doesn't provide static targets.
#
# Creates the follwoing imported targets (if available):
# - protobuf::libprotobuf
# - protobuf::libprotobuf_static
set(PROTOBUF_SHARED_NAMES
protobuf.lib
libprotobuf.dll.a
libprotobuf.so
)
set(PROTOBUF_STATIC_NAMES
protobuf_static.lib
libprotobuf.a
)
find_library(PROTOBUF_SHARED_LIBRARY NAMES ${PROTOBUF_SHARED_NAMES}
PATHS
${PREFIX_PATH}
/usr/local
/usr
PATH_SUFFIXES
lib
lib64
)
find_library(PROTOBUF_STATIC_LIBRARY NAMES ${PROTOBUF_STATIC_NAMES}
PATHS
${PREFIX_PATH}
/usr/local
/usr
PATH_SUFFIXES
lib
lib64
)
if(PROTOBUF_SHARED_LIBRARY)
message(STATUS "Found protobuf (shared): ${PROTOBUF_SHARED_LIBRARY}")
get_filename_component(PROTOBUF_SHARED_LIBRARY_DIR "${PROTOBUF_SHARED_LIBRARY}" DIRECTORY)
add_library(protobuf::libprotobuf IMPORTED SHARED)
set_target_properties(protobuf::libprotobuf
PROPERTIES
IMPORTED_LOCATION ${PROTOBUF_SHARED_LIBRARY}
IMPORTED_IMPLIB ${PROTOBUF_SHARED_LIBRARY}
INTERFACE_COMPILE_DEFINITIONS PROTOBUF_USE_DLLS
INTERFACE_INCLUDE_DIRECTORIES ${PROTOBUF_SHARED_LIBRARY_DIR}/../include
INTERFACE_LINK_LIBRARIES pthread)
else()
message(STATUS "Didn't find protobuf (shared)")
endif()
if(PROTOBUF_STATIC_LIBRARY)
message(STATUS "Found protobuf (static): ${PROTOBUF_STATIC_LIBRARY}")
get_filename_component(PROTOBUF_STATIC_LIBRARY_DIR "${PROTOBUF_STATIC_LIBRARY}" DIRECTORY)
add_library(protobuf::libprotobuf_static IMPORTED STATIC)
set_target_properties(protobuf::libprotobuf_static
PROPERTIES
IMPORTED_LOCATION ${PROTOBUF_STATIC_LIBRARY}
INTERFACE_INCLUDE_DIRECTORIES ${PROTOBUF_STATIC_LIBRARY_DIR}/../include
INTERFACE_LINK_LIBRARIES pthread)
else()
message(STATUS "Didn't find protobuf (static)")
endif()
unset(PROTOBUF_SHARED_LIBRARY)
unset(PROTOBUF_STATIC_LIBRARY)
...@@ -81,7 +81,7 @@ endif() ...@@ -81,7 +81,7 @@ endif()
# [INCDIRS <include-directories>] # [INCDIRS <include-directories>]
# [LIBRARIES <libraries>] # [LIBRARIES <libraries>]
# [UIS <qt_uis>] # [UIS <qt_uis>]
# [LINKOSI]) # [LINKOSI [shared|static]]
# [LINKGUI] # [LINKGUI]
# [FOLDER <category>] # [FOLDER <category>]
# [COMPONENT <gui|sim|core|bin|module>]) # [COMPONENT <gui|sim|core|bin|module>])
...@@ -94,7 +94,7 @@ endif() ...@@ -94,7 +94,7 @@ endif()
# [INCDIRS <include-directories>] # [INCDIRS <include-directories>]
# [LIBRARIES <libraries>] # [LIBRARIES <libraries>]
# [UIS <qt_uis>] # [UIS <qt_uis>]
# [LINKOSI] # [LINKOSI [shared|static]]
# [LINKGUI] # [LINKGUI]
# [FOLDER <category>] # [FOLDER <category>]
# [COMPONENT <gui|sim|core|bin|module>]) # [COMPONENT <gui|sim|core|bin|module>])
...@@ -106,7 +106,7 @@ endif() ...@@ -106,7 +106,7 @@ endif()
# [INCDIRS <include-directories>] # [INCDIRS <include-directories>]
# [LIBRARIES <libraries>] # [LIBRARIES <libraries>]
# [UIS <qt_uis>] # [UIS <qt_uis>]
# [LINKOSI] # [LINKOSI [shared|static]]
# [LINKGUI] # [LINKGUI]
# [DEFAULT_MAIN] # [DEFAULT_MAIN]
# [SIMCORE_DEPS <dependencies>] # [SIMCORE_DEPS <dependencies>]
...@@ -122,7 +122,7 @@ endif() ...@@ -122,7 +122,7 @@ endif()
# UIS Qt UI files # UIS Qt UI files
# INCDIRS Additional include directories # INCDIRS Additional include directories
# LIBRARIES Additional libraries to link # LIBRARIES Additional libraries to link
# LINKOSI Shortcut for adding OSI include directories and libraries (incl. protobuf) # LINKOSI Shortcut for adding OSI include directories and libraries (incl. protobuf) as 'static' or 'shared' (default).
# LINKGUI Shortcut for adding GUI Libraries # LINKGUI Shortcut for adding GUI Libraries
# DEFAULT_MAIN Links a simple main() implementation for running GTest # DEFAULT_MAIN Links a simple main() implementation for running GTest
# SIMCORE_DEPS Adds dependencies on simulation core targets to a test # SIMCORE_DEPS Adds dependencies on simulation core targets to a test
...@@ -137,12 +137,13 @@ endif() ...@@ -137,12 +137,13 @@ endif()
# - gtest/gmock/pthread libraries are linked # - gtest/gmock/pthread libraries are linked
# - Tests are excluded form the 'all' target # - Tests are excluded form the 'all' target
# - If DEFAULT_MAIN argument is provided, adds '--default-xml' to test executable command line arguments # - If DEFAULT_MAIN argument is provided, adds '--default-xml' to test executable command line arguments
# - PATH and LD_LIBRARY_PATH are set under Windows and Linux, respectively, so that test executables can resolve run-time dependencies.
# - General: # - General:
# - Target properties PROJECT_LABEL and OUTPUT_NAME are set to the target's name # - Target properties PROJECT_LABEL and OUTPUT_NAME are set to the target's name
# - Target property DEBUG_POSTFIX is set to CMAKE_DEBUG_POSTFIX # - Target property DEBUG_POSTFIX is set to CMAKE_DEBUG_POSTFIX
## ##
function(add_openpass_target) function(add_openpass_target)
cmake_parse_arguments(PARSED_ARG "LINKGUI;LINKOSI;DEFAULT_MAIN" "NAME;TYPE;LINKAGE" "HEADERS;SOURCES;INCDIRS;LIBRARIES;UIS;SIMCORE_DEPS;RESOURCES;FOLDER;COMPONENT" ${ARGN}) cmake_parse_arguments(PARSED_ARG "LINKGUI;DEFAULT_MAIN" "NAME;TYPE;LINKAGE;LINKOSI" "HEADERS;SOURCES;INCDIRS;LIBRARIES;UIS;SIMCORE_DEPS;RESOURCES;FOLDER;COMPONENT" ${ARGN})
if(TARGET ${PARSED_ARG_NAME}) if(TARGET ${PARSED_ARG_NAME})
message(STATUS "Target '${PARSED_ARG_NAME}' already defined. Skipping.") message(STATUS "Target '${PARSED_ARG_NAME}' already defined. Skipping.")
...@@ -183,10 +184,9 @@ function(add_openpass_target) ...@@ -183,10 +184,9 @@ function(add_openpass_target)
else() else()
install(TARGETS ${PARSED_ARG_NAME} LIBRARY DESTINATION "${DESTDIR}") install(TARGETS ${PARSED_ARG_NAME} LIBRARY DESTINATION "${DESTDIR}")
endif() endif()
add_to_global_target_list(lib_target_list ${PARSED_ARG_NAME})
endif() endif()
add_to_global_target_list(lib_target_list ${PARSED_ARG_NAME})
if(OPENPASS_ADJUST_OUTPUT) if(OPENPASS_ADJUST_OUTPUT)
openpass_adjust_output_dir(${PARSED_ARG_NAME} ${DESTDIR}) openpass_adjust_output_dir(${PARSED_ARG_NAME} ${DESTDIR})
endif() endif()
...@@ -275,16 +275,26 @@ function(add_openpass_target) ...@@ -275,16 +275,26 @@ function(add_openpass_target)
Boost::headers Boost::headers
) )
if(${PARSED_ARG_LINKOSI}) # LINKOSI handling
target_include_directories(${PARSED_ARG_NAME} PRIVATE
${OSI_INCLUDE_DIR}
protobuf::libprotobuf
)
target_link_libraries(${PARSED_ARG_NAME} # fallback to default if value is omitted
${OSI_LIBRARIES} if("LINKOSI" IN_LIST PARSED_ARG_KEYWORDS_MISSING_VALUES)
protobuf::libprotobuf set(PARSED_ARG_LINKOSI "shared")
) endif()
if(DEFINED PARSED_ARG_LINKOSI)
# validate value
set(VALID_LINKOSI_VALUES "" "shared" "static")
if(NOT "${PARSED_ARG_LINKOSI}" IN_LIST VALID_LINKOSI_VALUES)
message(FATAL_ERROR "Invalid value for LINKOSI. Supported settings are '', 'shared' and 'static'")
endif()
# replace static with pic for library targets
if("${PARSED_ARG_TYPE}" STREQUAL "library" AND "${PARSED_ARG_LINKOSI}" STREQUAL "static")
set(PARSED_ARG_LINKOSI "pic")
endif()
target_link_libraries(${PARSED_ARG_NAME} osi::${PARSED_ARG_LINKOSI})
endif() endif()
target_compile_options(${PARSED_ARG_NAME} PRIVATE target_compile_options(${PARSED_ARG_NAME} PRIVATE
...@@ -306,12 +316,13 @@ function(add_openpass_target) ...@@ -306,12 +316,13 @@ function(add_openpass_target)
if(DEFINED PARSED_ARG_LIBRARIES) if(DEFINED PARSED_ARG_LIBRARIES)
list(APPEND DEPS ${PARSED_ARG_LIBRARIES}) list(APPEND DEPS ${PARSED_ARG_LIBRARIES})
endif() endif()
if(${PARSED_ARG_LINKOSI}) if(DEFINED PARSED_ARG_LINKOSI)
list(APPEND DEPS "${OSI_LIBRARIES}" protobuf::libprotobuf) list(APPEND DEPS osi::${PARSED_ARG_LINKOSI} protobuf::libprotobuf)
endif() endif()
message(DEBUG "Locating shared library test dependencies...") message(DEBUG "Locating shared library test dependencies for ${PARSED_ARG_NAME}")
foreach(DEP IN LISTS DEPS) foreach(DEP IN LISTS DEPS)
message(DEBUG "Locating ${DEP}...")
if(TARGET ${DEP}) if(TARGET ${DEP})
set(DEP_PATH "") set(DEP_PATH "")
message(DEBUG "Target dependency: ${DEP}") message(DEBUG "Target dependency: ${DEP}")
...@@ -387,7 +398,15 @@ function(add_openpass_target) ...@@ -387,7 +398,15 @@ function(add_openpass_target)
list(APPEND DEP_PATHS "${DEP_PATH}") list(APPEND DEP_PATHS "${DEP_PATH}")
endforeach() endforeach()
list(REMOVE_DUPLICATES DEP_PATHS)
if(WIN32) if(WIN32)
# try to move MSYS system folder to the end of the list
set(DEP_PATHS_NO_MSYS ${DEP_PATHS})
list(FILTER DEP_PATHS EXCLUDE REGEX "msys")
list(FILTER DEP_PATHS_MSYS INCLUDE REGEX "msys")
list(APPEND DEP_PATHS ${DEP_PATHS_MSYS})
list(JOIN DEP_PATHS "\\;" ADDITIONAL_PATHS) list(JOIN DEP_PATHS "\\;" ADDITIONAL_PATHS)
set(CURRENT_PATH "$ENV{PATH}") set(CURRENT_PATH "$ENV{PATH}")
string(REGEX REPLACE "\;" "\\\;" CURRENT_PATH "${CURRENT_PATH}") string(REGEX REPLACE "\;" "\\\;" CURRENT_PATH "${CURRENT_PATH}")
......
...@@ -79,7 +79,6 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON) ...@@ -79,7 +79,6 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
if(WITH_SIMCORE OR WITH_TESTS) if(WITH_SIMCORE OR WITH_TESTS)
find_package(Protobuf REQUIRED) find_package(Protobuf REQUIRED)
add_compile_definitions(PROTOBUF_USE_DLLS)
find_package(OSI REQUIRED) find_package(OSI REQUIRED)
......
################################################################################ ################################################################################
# Copyright (c) 2020-2021 in-tech GmbH # Copyright (c) 2020-2021 in-tech GmbH
# 2022 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
# #
# This program and the accompanying materials are made available under the # This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at # terms of the Eclipse Public License 2.0 which is available at
...@@ -32,26 +33,26 @@ foreach(SEARCH_DIR IN LISTS SEARCH_DIRS) ...@@ -32,26 +33,26 @@ foreach(SEARCH_DIR IN LISTS SEARCH_DIRS)
message(STATUS "processing ${SEARCH_DIR}") message(STATUS "processing ${SEARCH_DIR}")
if(WIN32 AND NOT MSVC) # CMake uses OS API calls to spawn processes using `execute_process()`.
# CMake uses OS API calls to spawn processes using `execute_process()`. # Even if MSYS is the first entry in PATH, a potentially available `bash` from a WSL installation will be found first.
# Even if MSYS is the first entry in PATH, a potentially available `bash` from a WSL installation will be found first. # Thus, the environment variable SHELL is read here, which will have an absolute path if it is set.
# Thus, the environment variable SHELL is read here, which will have an absolute path if it is set. # Otherwiswe, the fallback to hardcoded `sh` will at least work on systems without WSL setup (and Linux).
# Otherwiswe, the fallback to hardcoded `bash` will at least work on systems without WSL setup. if(DEFINED ENV{SHELL})
if(DEFINED ENV{SHELL}) set(SHELL $ENV{SHELL})
set(SHELL $ENV{SHELL}) else()
else() set(SHELL sh)
set(SHELL bash) endif()
endif()
if(WIN32 AND NOT MSVC)
execute_process ( execute_process (
WORKING_DIRECTORY ${SEARCH_DIR} WORKING_DIRECTORY ${SEARCH_DIR}
COMMAND ${SHELL} -c "for f in \$(find -iname \'*.dll\'); do cygpath -a -m \$(dirname \$f); done | sort -u" COMMAND "${SHELL}" "-c" "for f in \$(find -iname \'*.dll\'); do cygpath -a -m \$(dirname \$f); done | sort -u"
OUTPUT_VARIABLE DETECTED_LIBRARY_DIRS OUTPUT_VARIABLE DETECTED_LIBRARY_DIRS
) )
else() else()
execute_process ( execute_process (
WORKING_DIRECTORY ${SEARCH_DIR} WORKING_DIRECTORY ${SEARCH_DIR}
COMMAND $ENV{SHELL} -lc "for f in \$(find -iname \'*.so\'); do realpath \$(dirname \$f); done | sort -u" COMMAND "${SHELL}" "-c" "for f in \$(find -iname \'*.so\'); do realpath \$(dirname \$f); done | sort -u"
OUTPUT_VARIABLE DETECTED_LIBRARY_DIRS OUTPUT_VARIABLE DETECTED_LIBRARY_DIRS
) )
endif() endif()
...@@ -104,10 +105,3 @@ install(CODE ...@@ -104,10 +105,3 @@ install(CODE
" "
) )
# install schema files into install directory
file(TO_NATIVE_PATH ${CMAKE_SOURCE_DIR}/schemas/ SCHEMA_SRC)
file(TO_NATIVE_PATH ${CMAKE_INSTALL_PREFIX}/schemas/ SCHEMA_DEST)
install(DIRECTORY ${SCHEMA_SRC}
DESTINATION ${SCHEMA_DEST})
message("schemas installed from ${SCHEMA_SRC} to ${SCHEMA_DEST}")
################################################################################ ################################################################################
# This program and the accompanying materials are made available under the # Copyright (c) 2021 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
# terms of the Eclipse Public License 2.0 which is available at
# http://www.eclipse.org/legal/epl-2.0.
#
# SPDX-License-Identifier: EPL-2.0
################################################################################
#-----------------------------------------------------------------------------
# \file openPASS.pri
# \brief This file includes the paths to all the interfaces needed
# for the Project Interface
#
#
# Copyright (c) 2017 Volkswagen Group of America.
# #
# This program and the accompanying materials are made # This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0 # available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/ # which is available at https://www.eclipse.org/legal/epl-2.0/
# #
# SPDX-License-Identifier: EPL-2.0 # SPDX-License-Identifier: EPL-2.0
#-----------------------------------------------------------------------------/ ################################################################################
include(../../../application/Interfaces/openPASS/openPASS.pri) # sets install command to copy xml Schema files from repository to installation directory
include(../../project/Interfaces/openPASS-Project/openPASS-Project.pri) install(DIRECTORY ${CMAKE_SOURCE_DIR}/schemas DESTINATION .)
include(../../window/Interfaces/openPASS-Window/openPASS-Window.pri) message("-- xml schema file will be installed in the schema folder of the installation directory")
\ No newline at end of file
...@@ -22,11 +22,13 @@ if(WITH_DOC) ...@@ -22,11 +22,13 @@ if(WITH_DOC)
-M html # generate HTML -M html # generate HTML
${CMAKE_BINARY_DIR}/doc/source # source path ${CMAKE_BINARY_DIR}/doc/source # source path
${CMAKE_BINARY_DIR}/doc # destination path ${CMAKE_BINARY_DIR}/doc # destination path
-DWITH_API_DOC=${WITH_API_DOC} # turn exhale ON/OFF -D api_doc_build=${WITH_API_DOC} # turn exhale ON/OFF
-W --keep-going # treat warnings as errors but keep-going
-n # https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-nitpicky
COMMENT "Build Sphinx documentation" COMMENT "Build Sphinx documentation"
COMMAND ${CMAKE_COMMAND} COMMAND ${CMAKE_COMMAND}
-E cmake_echo_color --green -E cmake_echo_color --green
"The HTML pages are in ${CMAKE_BINARY_DIR}/doc/html.") "The HTML pages are in ${CMAKE_BINARY_DIR}/doc/html/index.html")