Skip to content
Snippets Groups Projects

Resolve "Various improvements and fixes to simulation core"

Files
278
+ 13
19
################################################################################
################################################################################
# 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}")
Loading