[PATCH 0/5] Add esmini

  • Open
  • quality assurance status badge
Details
One participant
  • Liliana Marie Prikler
Owner
unassigned
Submitted by
Liliana Marie Prikler
Severity
normal
L
L
Liliana Marie Prikler wrote on 3 Dec 2022 10:09
(address . guix-patches@gnu.org)
034d0ae2b33c04dc7a5f8f75ab285e20937ce4ec.camel@gmail.com
Hi Guix,

here's some software that simulates blocks on a road. Something,
something, self-driving cars will become a reality in 2023.

Cheers

Liliana Marie Prikler (5):
gnu: openscenegraph: Use modern package style.
gnu: openscenegraph: Add output for plugins.
gnu: Add open-simulation-interface.
gnu: Add python-open-simulation-interface.
gnu: Add esmini.

gnu/local.mk | 2 +
gnu/packages/graphics.scm | 54 +-
.../patches/esmini-no-clutter-log.patch | 30 +
.../patches/esmini-use-pkgconfig.patch | 541 ++++++++++++++++++
gnu/packages/simulation.scm | 108 ++++
5 files changed, 726 insertions(+), 9 deletions(-)
create mode 100644 gnu/packages/patches/esmini-no-clutter-log.patch
create mode 100644 gnu/packages/patches/esmini-use-pkgconfig.patch


base-commit: 9e9204958d3e0ecfe8fd024d8f06068b84f52ba1
--
2.38.1
L
L
Liliana Marie Prikler wrote on 3 Dec 2022 09:12
[PATCH 1/5] gnu: openscenegraph: Use modern package style.
(address . 59800@debbugs.gnu.org)
7324733de60f8653c1b364c7825e69ec21cba00a.camel@gmail.com
* gnu/packages/graphics.scm (openscenegraph)[arguments]: Convert to list
of G-Expressions.
---
gnu/packages/graphics.scm | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)

Toggle diff (30 lines)
diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index 60c6a979c5..4193c2949b 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -1292,14 +1292,15 @@ (define-public openscenegraph
`((upstream-name . "OpenSceneGraph")))
(build-system cmake-build-system)
(arguments
- `(#:tests? #f ; no test target available
- ;; Without this flag, 'rd' will be added to the name of the
- ;; library binaries and break linking with other programs.
- #:build-type "Release"
- #:configure-flags
- (list (string-append "-DCMAKE_INSTALL_RPATH="
- (assoc-ref %outputs "out") "/lib:"
- (assoc-ref %outputs "out") "/lib64"))))
+ (list
+ #:tests? #f ; no test target available
+ ;; Without this flag, 'rd' will be added to the name of the
+ ;; library binaries and break linking with other programs.
+ #:build-type "Release"
+ #:configure-flags
+ #~(list (string-append "-DCMAKE_INSTALL_RPATH="
+ #$output "/lib:"
+ #$output "/lib64"))))
(native-inputs
(list pkg-config unzip))
(inputs
--
2.38.1
L
L
Liliana Marie Prikler wrote on 3 Dec 2022 09:13
[PATCH 2/5] gnu: openscenegraph: Add output for plugins.
(address . 59800@debbugs.gnu.org)
7be02d37bc51f8e11d1d5fe187692f9cb67d5d4a.camel@gmail.com
This makes it so that other packages can find plugins via pkg-config and
link to them in the usual manner.

* gnu/packages/graphics.scm (openscenegraph)[outputs]: Add “pluginlib”.
[properties]: Add output synopsis for “pluginlib”.
[arguments]<#:modules>: Use (ice-9 regex).
<#:phases>: Add ‘copy-plugins’.
---
gnu/packages/graphics.scm | 39 +++++++++++++++++++++++++++++++++++++--
1 file changed, 37 insertions(+), 2 deletions(-)

Toggle diff (60 lines)
diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index 4193c2949b..b892e44f72 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -1289,8 +1289,10 @@ (define-public openscenegraph
(base32 "00i14h82qg3xzcyd8p02wrarnmby3aiwmz0z43l50byc9f8i05n1"))
(file-name (git-file-name name version))))
(properties
- `((upstream-name . "OpenSceneGraph")))
+ `((upstream-name . "OpenSceneGraph")
+ (output-synopsis "pluginlib" "Plugins as shared libraries")))
(build-system cmake-build-system)
+ (outputs (list "out" "pluginlib"))
(arguments
(list
#:tests? #f ; no test target available
@@ -1300,7 +1302,40 @@ (define-public openscenegraph
#:configure-flags
#~(list (string-append "-DCMAKE_INSTALL_RPATH="
#$output "/lib:"
- #$output "/lib64"))))
+ #$output "/lib64"))
+ #:modules `((guix build cmake-build-system)
+ (guix build utils)
+ (ice-9 regex))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'install 'copy-plugins
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (pluginlib (assoc-ref outputs "pluginlib")))
+ (mkdir-p (string-append pluginlib "/lib/pkgconfig"))
+ (with-directory-excursion (string-append out "/lib/osgPlugins-"
+ #$version)
+ (for-each
+ (lambda (lib)
+ (let ((blib (basename lib))
+ (m (string-match "([^/]*)\\.so$" lib)))
+ (symlink (canonicalize-path lib)
+ (string-append pluginlib "/lib/lib" blib))
+ (call-with-output-file (string-append
+ pluginlib
+ "/lib/pkgconfig/"
+ (match:substring m 1) ".pc")
+ (lambda (port)
+ (format port "libdir=~a/lib~%" pluginlib)
+ (newline port)
+ (format port "Name: ~a~%" (match:substring m 1))
+ (format port "Version: ~a~%" #$version)
+ (display "Description: A plugin for openscenegraph\n"
+ port)
+ (display "Requires: openscenegraph\n" port)
+ (format port "Libs: -L${libdir} -l~a~%"
+ (match:substring m 1))))))
+ (find-files "." "\\.so")))))))))
(native-inputs
(list pkg-config unzip))
(inputs
--
2.38.1
L
L
Liliana Marie Prikler wrote on 3 Dec 2022 09:16
[PATCH 3/5] gnu: Add open-simulation-interface.
(address . 59800@debbugs.gnu.org)
87dc4cb77cf3d897e3abd7c85d4496e014a3e7f4.camel@gmail.com
* gnu/packages/simulation.scm (open-simulation-interface): New variable.
---
gnu/packages/simulation.scm | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)

Toggle diff (45 lines)
diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index 256e404970..1cbbc7c960 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -252,6 +252,38 @@ (define-public openfoam
(license license:gpl3+)
(home-page "https://openfoam.org")))
+(define-public open-simulation-interface
+ (package
+ (name "open-simulation-interface")
+ (version "3.5.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url (string-append "https://github.com/"
+ "OpenSimulationInterface/"
+ "open-simulation-interface"))
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "09vclrvsawx608kk0vnzywr71xn11qzwxzh2j508zjfn0kvhyx7q"))))
+ (build-system cmake-build-system)
+ (arguments (list #:tests? #f ; tests are for the python package
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-cmake
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("-targets\\.cmake") "_targets.cmake")))))))
+ (native-inputs (list protobuf))
+ (home-page
+ "https://github.com/OpenSimulationInterface/open-simulation-interface")
+ (synopsis "Generic interface for environmental perception")
+ (description "The Open Simulation Interface is a generic interface based on
+Google's protocol buffers for the environmental perception of automated driving
+functions in virtual scenarios.")
+ (license license:mpl2.0)))
+
(define-public python-fenics-dijitso
(package
(name "python-fenics-dijitso")
--
2.38.1
L
L
Liliana Marie Prikler wrote on 3 Dec 2022 09:16
[PATCH 4/5] gnu: Add python-open-simulation-interface.
(address . 59800@debbugs.gnu.org)
ad6bce09b2da5be12e3ea6c61210b9930f920f9c.camel@gmail.com
* gnu/packages/simulation.scm (python-open-simulation-interface): New variable.
---
gnu/packages/simulation.scm | 5 +++++
1 file changed, 5 insertions(+)

Toggle diff (18 lines)
diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index 1cbbc7c960..4fdf99d9d4 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -284,6 +284,11 @@ (define-public open-simulation-interface
functions in virtual scenarios.")
(license license:mpl2.0)))
+(define-public python-open-simulation-interface
+ (package/inherit open-simulation-interface
+ (build-system python-build-system)
+ (arguments '())))
+
(define-public python-fenics-dijitso
(package
(name "python-fenics-dijitso")
--
2.38.1
L
L
Liliana Marie Prikler wrote on 3 Dec 2022 10:04
[PATCH 5/5] gnu: Add esmini.
(address . 59800@debbugs.gnu.org)
8960045e7a304fbb449f814cda3ee4d09500211d.camel@gmail.com
* gnu/packages/patches/esmini-no-clutter-log.patch: New file.
* gnu/packages/patches/esmini-use-pkgconfig.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add them here.
* gnu/packages/simulation.scm (esmini): New variable.
---
gnu/local.mk | 2 +
.../patches/esmini-no-clutter-log.patch | 30 +
.../patches/esmini-use-pkgconfig.patch | 541 ++++++++++++++++++
gnu/packages/simulation.scm | 71 +++
4 files changed, 644 insertions(+)
create mode 100644 gnu/packages/patches/esmini-no-clutter-log.patch
create mode 100644 gnu/packages/patches/esmini-use-pkgconfig.patch

Toggle diff (477 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 1bfbe28bde..8069cedcb6 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1075,6 +1075,8 @@ dist_patch_DATA = \
%D%/packages/patches/enjarify-setup-py.patch \
%D%/packages/patches/enlightenment-fix-setuid-path.patch \
%D%/packages/patches/erlang-man-path.patch \
+ %D%/packages/patches/esmini-no-clutter-log.patch \
+ %D%/packages/patches/esmini-use-pkgconfig.patch \
%D%/packages/patches/esmtp-add-lesmtp.patch \
%D%/packages/patches/eudev-rules-directory.patch \
%D%/packages/patches/exercism-disable-self-update.patch \
diff --git a/gnu/packages/patches/esmini-no-clutter-log.patch b/gnu/packages/patches/esmini-no-clutter-log.patch
new file mode 100644
index 0000000000..0920244f78
--- /dev/null
+++ b/gnu/packages/patches/esmini-no-clutter-log.patch
@@ -0,0 +1,30 @@
+Don't clutter /tmp with logs.
+
+---
+ EnvironmentSimulator/Modules/CommonMini/CommonMini.cpp | 10 ++--------
+ 1 file changed, 2 insertions(+), 8 deletions(-)
+
+diff --git a/EnvironmentSimulator/Modules/CommonMini/CommonMini.cpp b/EnvironmentSimulator/Modules/CommonMini/CommonMini.cpp
+index 56c655dc..2750f5a6 100644
+--- a/EnvironmentSimulator/Modules/CommonMini/CommonMini.cpp
++++ b/EnvironmentSimulator/Modules/CommonMini/CommonMini.cpp
+@@ -1013,14 +1013,8 @@ void Logger::OpenLogfile(std::string filename)
+ file_.open(filename.c_str());
+ if (file_.fail())
+ {
+- const char* filename_tmp = std::tmpnam(NULL);
+- printf("Cannot open log file: %s in working directory. Trying system tmp-file: %s\n",
+- SE_Env::Inst().GetLogFilePath().c_str(), filename_tmp);
+- file_.open(filename_tmp);
+- if (file_.fail())
+- {
+- printf("Also failed to open log file: %s. Continue without logfile, still logging to console.\n", filename_tmp);
+- }
++ printf("Cannot open log file: %s in working directory. Continuing without logfile, still logging to console.\n",
++ filename.c_str());
+ }
+ }
+ #endif
+--
+2.38.1
+
diff --git a/gnu/packages/patches/esmini-use-pkgconfig.patch b/gnu/packages/patches/esmini-use-pkgconfig.patch
new file mode 100644
index 0000000000..73e1b50015
--- /dev/null
+++ b/gnu/packages/patches/esmini-use-pkgconfig.patch
@@ -0,0 +1,541 @@
+Find dependencies via pkg-config.
+
+---
+ CMakeLists.txt | 16 +-
+ .../Applications/esmini-dyn/CMakeLists.txt | 5 +-
+ .../Applications/esmini/CMakeLists.txt | 1 +
+ EnvironmentSimulator/CMakeLists.txt | 296 +-----------------
+ .../Modules/Controllers/ControllerSumo.cpp | 1 -
+ .../Modules/RoadManager/CMakeLists.txt | 8 +-
+ .../Modules/ScenarioEngine/CMakeLists.txt | 15 +-
+ 7 files changed, 23 insertions(+), 319 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 156d9448..10ec48f9 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -8,6 +8,7 @@ else()
+ cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR)
+ endif()
+
++include(FindPkgConfig)
+
+ project (EnvironmentSimulator)
+
+@@ -33,15 +34,10 @@ else ()
+ set (LINUX false)
+ endif ()
+
+-if (LINUX OR APPLE OR MINGW OR MSVC)
+- set(INSTALL_DIRECTORY "${CMAKE_HOME_DIRECTORY}/bin")
+-else ()
+- message(FATAL_ERROR "Unrecognized platform therefore there isn't an installation directory. Stopping the cmake process.")
+-endif ()
+-
+ set(INSTALL_DIRECTORY_CODE_EXAMPLES "${CMAKE_HOME_DIRECTORY}/code-examples-bin")
+
+-set(PUGIXML_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/externals/pugixml")
++find_package(pugixml)
++
+ set(EXPR_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/externals/expr")
+ if(MSVC)
+ set(DIRENT_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/externals/dirent/win")
+@@ -61,10 +57,14 @@ set(ENABLE_SANITIZERS False CACHE BOOL "Enable sanitizers (Only valid for Linux
+
+
+ if (USE_OSG)
++ pkg_check_modules(OSG REQUIRED openscenegraph osgdb_jpeg osgdb_osg
++ osgdb_serializers_osg
++ osgdb_serializers_osgsim)
+ add_definitions(-D_USE_OSG)
+ endif (USE_OSG)
+
+ if (USE_OSI)
++ find_package(open_simulation_interface REQUIRED)
+ add_definitions(-D_USE_OSI)
+ endif (USE_OSI)
+
+@@ -73,6 +73,7 @@ if (USE_SUMO)
+ endif (USE_SUMO)
+
+ if (USE_GTEST)
++ find_package(GTest REQUIRED)
+ add_definitions(-D_USE_GTEST)
+ endif (USE_GTEST)
+
+@@ -90,5 +91,4 @@ if( NOT EXISTS "test/OSC-ALKS-scenarios/.git" )
+ endif()
+
+ # Add variables to global scope, e.g. when esmini is used as submodule
+-set(PUGIXML_INCLUDE_DIR ${PUGIXML_INCLUDE_DIR} CACHE INTERNAL "")
+ set(EXPR_INCLUDE_DIR ${EXPR_INCLUDE_DIR} CACHE INTERNAL "")
+diff --git a/EnvironmentSimulator/Applications/esmini-dyn/CMakeLists.txt b/EnvironmentSimulator/Applications/esmini-dyn/CMakeLists.txt
+index 83d89420..e15062d3 100644
+--- a/EnvironmentSimulator/Applications/esmini-dyn/CMakeLists.txt
++++ b/EnvironmentSimulator/Applications/esmini-dyn/CMakeLists.txt
+@@ -1,7 +1,7 @@
+
+ include_directories (
+ ${SCENARIOENGINE_DLL_INCLUDE_DIR}
+- ${COMMON_MINI_INCLUDE_DIR}
++ ${COMMON_MINI_INCLUDE_DIR}
+ ${OSI_INCLUDE_DIR}
+ )
+
+@@ -19,11 +19,12 @@ link_directories( ${OSI_DIR}/lib )
+ add_executable ( ${TARGET} ${SOURCES} ${INCLUDES} )
+
+
+-target_link_libraries (
++target_link_libraries (
+ ${TARGET}
+ esminiLib
+ CommonMini
+ ${TIME_LIB}
++ pugixml::pugixml
+ project_options
+ )
+
+diff --git a/EnvironmentSimulator/Applications/esmini/CMakeLists.txt b/EnvironmentSimulator/Applications/esmini/CMakeLists.txt
+index 6890c26a..a088ebdc 100644
+--- a/EnvironmentSimulator/Applications/esmini/CMakeLists.txt
++++ b/EnvironmentSimulator/Applications/esmini/CMakeLists.txt
+@@ -44,6 +44,7 @@ target_link_libraries (
+ ${sumo_libs}
+ ${TIME_LIB}
+ ${SOCK_LIB}
++ pugixml::pugixml
+ project_options
+ )
+
+diff --git a/EnvironmentSimulator/CMakeLists.txt b/EnvironmentSimulator/CMakeLists.txt
+index 157e8fe0..e771231a 100644
+--- a/EnvironmentSimulator/CMakeLists.txt
++++ b/EnvironmentSimulator/CMakeLists.txt
+@@ -1,7 +1,3 @@
+-
+-set ( FILE_STORAGE "esmini" ) # "dropbox", "google", "esmini" (limited GB/Day)
+-set ( MODEL_STORAGE "esmini" ) # "dropbox", "google", "esmini" (limited GB/Day)
+-
+ set ( VIEWER_BASE_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Modules/ViewerBase" )
+ set ( PLAYER_BASE_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Modules/PlayerBase" )
+ set ( ROADMANAGER_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Modules/RoadManager" )
+@@ -17,88 +13,12 @@ set ( CONTROLLERS_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Modules/Controllers")
+
+ # OpenSceneGraph package adapted for this project
+ set ( OSG_VERSION "osg161" )
+-set ( OSG_BASE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../externals/OpenSceneGraph" )
+-set ( OSI_BASE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../externals/OSI" )
+-set ( SUMO_BASE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../externals/SUMO" )
+
+ # GoogleTest package
+ set ( GTEST_VERSION "1.10.1" )
+-set ( GTEST_BASE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../externals/googletest" )
+
+ set( CMAKE_VERBOSE_MAKEFILE true )
+
+-if ( ${FILE_STORAGE} STREQUAL "dropbox" )
+- if (APPLE)
+- set ( OSG_PACKAGE_URL https://www.dropbox.com/s/d0czj6b89p9jyvv/OpenSceneGraph_mac.7z?dl=1 )
+- set ( OSI_PACKAGE_URL https://www.dropbox.com/s/m62v19gp0m73dte/osi_mac.7z?dl=1 )
+- set ( SUMO_PACKAGE_URL https://www.dropbox.com/s/0x8kwztk7nmacs1/sumo_mac.7z?dl=1 )
+- elseif (LINUX)
+- set ( OSG_PACKAGE_URL https://www.dropbox.com/s/4ug0gmkgdavzyb4/osg_linux_glibc_2_31_gcc_7_5_0.7z?dl=1 )
+- set ( OSI_PACKAGE_URL https://dl.dropboxusercontent.com/s/kwtdg0c1c8pawa1/osi_linux.7z?dl=1 )
+- set ( SUMO_PACKAGE_URL https://dl.dropboxusercontent.com/s/gfwtqd3gf76f86a/sumo_linux.7z?dl=1 )
+- set ( GTEST_PACKAGE_URL https://dl.dropboxusercontent.com/s/si7jsjjsy5bpoym/googletest_linux.7z?dl=1 )
+- elseif (MSVC)
+- set ( OSG_PACKAGE_URL https://dl.dropboxusercontent.com/s/e95hnoo782p40uc/OpenSceneGraph_v10.7z?dl=1 )
+- set ( OSI_PACKAGE_URL https://dl.dropboxusercontent.com/s/an58ckp2qfx5069/osi_v10.7z?dl=1 )
+- set ( SUMO_PACKAGE_URL https://dl.dropboxusercontent.com/s/5jtpnnd61wonxuh/sumo_v10.7z?dl=1 )
+- set ( GTEST_PACKAGE_URL https://dl.dropboxusercontent.com/s/aaiehwzc6woqbc6/googletest_v10.7z?dl=1 )
+- elseif (MINGW)
+- message("MinGW, enforcing slimmed esmini")
+- else ()
+- message ("Unsupported configuration")
+- endif ()
+-elseif ( ${FILE_STORAGE} STREQUAL "google" )
+- if (APPLE)
+- set ( OSG_PACKAGE_URL https://drive.google.com/u/1/uc?id=1mfn_vrcXBoFBekR_t8RXTWB4sD59JD7p&export=download )
+- set ( OSI_PACKAGE_URL https://drive.google.com/u/1/uc?id=1UVzO8cPQaDU9KVn9v2v8Suj0uUw1dzYI&export=download )
+- set ( SUMO_PACKAGE_URL https://drive.google.com/u/1/uc?id=1FAve0-MlJPv6lUZy0HvriZI7xstLAzvX&export=download )
+- elseif (LINUX)
+- set ( OSG_PACKAGE_URL https://drive.google.com/u/1/uc?id=1Ya1bLp_0-qqlhs67WAwbGW7l37wqP3o2&export=download )
+- set ( OSI_PACKAGE_URL https://drive.google.com/u/1/uc?id=1Q8O9YciIC0BPEszIKtQ2UW9KcVRZS4iB&export=download )
+- set ( SUMO_PACKAGE_URL https://drive.google.com/u/1/uc?id=1m4znxNIXapP0D-l21oIm2l7L5ti-JbZH&export=download )
+- set ( GTEST_PACKAGE_URL https://drive.google.com/u/1/uc?id=1Hyr9eJX2GmgpYwZhx14xOoXlZ2j-FY_p&export=download )
+- elseif (MSVC)
+- set ( OSG_PACKAGE_URL https://drive.google.com/u/1/uc?id=1RTag0aUn_pJPK697j0-E72ABW10wZvOm&export=download )
+- set ( OSI_PACKAGE_URL https://drive.google.com/u/1/uc?id=1pcQcVHUESOk2Wmi-zUA7uzdxxE6iwRJx&export=download )
+- set ( SUMO_PACKAGE_URL https://drive.google.com/u/1/uc?id=18PhbSLyvs0IGWTAY3YBoYzpVnMFPbOuR&export=download )
+- set ( GTEST_PACKAGE_URL https://drive.google.com/u/1/uc?id=1So-3gtrmEdW9RhEvVQisj1QFksHM_otU&export=download )
+- elseif (MINGW)
+- message("MinGW, enforcing slimmed esmini")
+- else ()
+- message ("Unsupported configuration")
+- endif ()
+-elseif ( ${FILE_STORAGE} STREQUAL "esmini" )
+- if (APPLE)
+- set ( OSG_PACKAGE_URL https://esmini.asuscomm.com/AICLOUD766065121/libs/OpenSceneGraph_mac.7z )
+- set ( OSI_PACKAGE_URL https://esmini.asuscomm.com/AICLOUD766065121/libs/osi_mac.7z )
+- set ( SUMO_PACKAGE_URL https://esmini.asuscomm.com/AICLOUD766065121/libs/sumo_mac.7z )
+- elseif (LINUX)
+- set ( OSG_PACKAGE_URL https://esmini.asuscomm.com/AICLOUD766065121/libs/osg_linux_glibc_2_31_gcc_7_5_0.7z )
+- set ( OSI_PACKAGE_URL https://esmini.asuscomm.com/AICLOUD766065121/libs/osi_linux.7z )
+- set ( SUMO_PACKAGE_URL https://esmini.asuscomm.com/AICLOUD766065121/libs/sumo_linux.7z )
+- set ( GTEST_PACKAGE_URL https://esmini.asuscomm.com/AICLOUD766065121/libs/googletest_linux.7z )
+- elseif (MSVC)
+- set ( OSG_PACKAGE_URL https://esmini.asuscomm.com/AICLOUD766065121/libs/OpenSceneGraph_v10.7z )
+- set ( OSI_PACKAGE_URL https://esmini.asuscomm.com/AICLOUD766065121/libs/osi_v10.7z )
+- set ( SUMO_PACKAGE_URL https://esmini.asuscomm.com/AICLOUD766065121/libs/sumo_v10.7z )
+- set ( GTEST_PACKAGE_URL https://esmini.asuscomm.com/AICLOUD766065121/libs/googletest_v10.7z )
+- elseif (MINGW)
+- message("MinGW, enforcing slimmed esmini")
+- else ()
+- message ("Unsupported configuration")
+- endif ()
+-else ()
+- Message("Unknown storage type: " ${FILE_STORAGE})
+-endif()
+-
+-if ( ${MODEL_STORAGE} STREQUAL "dropbox" )
+- set ( MODELS_PACKAGE_URL https://dl.dropboxusercontent.com/s/5gk8bvgzqiaaoco/models.7z?dl=0 )
+-elseif ( ${MODEL_STORAGE} STREQUAL "google" )
+- set ( MODELS_PACKAGE_URL https://drive.google.com/u/1/uc?id=1c3cqRzwY41gWXbg0rmugQkL5I_5L6DH_&export=download )
+-elseif ( ${MODEL_STORAGE} STREQUAL "esmini" )
+- set ( MODELS_PACKAGE_URL https://esmini.asuscomm.com/AICLOUD779364751/models/models.7z )
+-endif()
+-
+ if (APPLE)
+ set ( EXT_DIR_NAME "mac" )
+ set ( TIME_LIB "" )
+@@ -127,21 +47,8 @@ set ( OSI_DIR "${OSI_BASE_DIR}/${EXT_DIR_NAME}" )
+ set ( SUMO_DIR "${SUMO_BASE_DIR}/${EXT_DIR_NAME}" )
+ set ( GTEST_DIR "${GTEST_BASE_DIR}/${EXT_DIR_NAME}" )
+
+-set ( OSG_INCLUDE_DIR
+- "${OSG_DIR}/build/include"
+- "${OSG_DIR}/include"
+-)
+-set ( OSG_LIBRARIES_PATH
+- "${OSG_DIR}/lib"
+- "${OSG_DIR}/lib/osgPlugins-3.6.5"
+-)
+-
+ set ( OSI_INCLUDE_DIR "${OSI_DIR}/include" )
+-if (DYN_PROTOBUF)
+- set ( OSI_LIBRARIES_PATH "${OSI_DIR}/lib-dyn" )
+-else ()
+- set ( OSI_LIBRARIES_PATH "${OSI_DIR}/lib" )
+-endif (DYN_PROTOBUF)
++set ( OSI_LIBRARIES_PATH "${OSI_DIR}/lib" )
+
+ set ( SUMO_INCLUDE_DIR "${SUMO_DIR}/include" )
+ set ( SUMO_LIBRARIES_PATH "${SUMO_DIR}/lib" )
+@@ -153,74 +60,6 @@ link_directories(${OSG_LIBRARIES_PATH} ${OSI_LIBRARIES_PATH} ${SUMO_LIBRARIES_PA
+
+ if(APPLE)
+ SET(CMAKE_CXX_FLAGS "${CXX_STD_FLAG} -std=c++14 -pthread -fPIC -flto -DGL_SILENCE_DEPRECATION -Wl,-dead_strip")
+-
+- set ( OSG_LIBRARIES
+- osg
+- osgViewer
+- osgDB
+- osgdb_serializers_osgsim
+- osgdb_serializers_osg
+- osgGA
+- osgText
+- osgSim
+- osgdb_osg
+- osgdb_jpeg
+- osgUtil
+- osgAnimation
+- osg
+- OpenThreads
+- jpeg
+- "-framework OpenGL"
+- "-framework Cocoa"
+- dl
+- z
+- )
+-
+- if (DYN_PROTOBUF)
+- set ( OSI_LIBRARIES
+- open_simulation_interface
+- protobuf
+- )
+- else ()
+- set ( OSI_LIBRARIES
+- open_simulation_interface_pic
+- protobuf
+- )
+- endif (DYN_PROTOBUF)
+-
+-
+- set ( SUMO_LIBRARIES
+- optimized libsumostatic debug libsumostaticd
+- optimized netload debug netloadd
+- optimized traciserver debug traciserverd
+- optimized libsumostatic debug libsumostaticd
+- optimized utils_vehicle debug utils_vehicled
+- optimized utils_distribution debug utils_distributiond
+- optimized utils_shapes debug utils_shapesd
+- optimized utils_options debug utils_optionsd
+- optimized utils_xml debug utils_xmld
+- optimized utils_geom debug utils_geomd
+- optimized utils_common debug utils_commond
+- optimized utils_iodevices debug utils_iodevicesd
+- optimized utils_traction_wire debug utils_traction_wired
+- optimized utils_emissions debug utils_emissionsd
+- optimized microsim_engine debug microsim_engined
+- optimized microsim_lcmodels debug microsim_lcmodelsd
+- optimized microsim_devices debug microsim_devicesd
+- optimized microsim_trigger debug microsim_triggerd
+- optimized microsim_output debug microsim_outputd
+- optimized microsim_transportables debug microsim_transportablesd
+- optimized microsim_actions debug microsim_actionsd
+- optimized microsim_traffic_lights debug microsim_traffic_lightsd
+- optimized microsim debug microsimd
+- optimized mesosim debug mesosimd
+- optimized foreign_phemlight debug foreign_phemlightd
+- optimized foreign_tcpip debug foreign_tcpipd
+- optimized microsim_cfmodels debug microsim_cfmodelsd
+- optimized zlibstatic debug zlibstaticd
+- optimized xerces-c_3 debug xerces-c_3D
+- "-framework CoreServices"
+- )
+
+ elseif(LINUX)
+
+@@ -251,82 +90,8 @@ elseif(LINUX)
+ SET(CMAKE_CXX_FLAGS "${CXX_STD_FLAG} -pthread -fPIC -Wl,-strip-all")
+ endif()
+
+- set ( OSG_LIBRARIES
+- optimized osg debug osgd
+- optimized osgViewer debug osgViewerd
+- optimized osgDB debug osgDBd
+- optimized osgdb_serializers_osgsim debug osgdb_serializers_osgsimd
+- optimized osgdb_serializers_osg debug osgdb_serializers_osgd
+- optimized osgGA debug osgGAd
+- optimized osgText debug osgTextd
+- optimized osgSim debug osgSimd
+- optimized osgdb_osg debug osgdb_osgd
+- optimized osgdb_jpeg debug osgdb_jpegd
+- optimized osgUtil debug osgUtild
+- optimized osgAnimation debug osgAnimationd
+- optimized osg debug osgd
+- optimized OpenThreads debug OpenThreadsd
+- optimized jpeg debug jpegd
+-
+- GL
+- X11
+- Xrandr
+- dl
+- z
+- Xinerama
+- fontconfig
+- )
+-
+- if (DYN_PROTOBUF)
+- set ( OSI_LIBRARIES
+- optimized open_simulation_interface debug open_simulation_interfaced
+- optimized protobuf debug protobufd
+- )
+- else ()
+- set ( OSI_LIBRARIES
+- optimized open_simulation_interface_pic debug open_simulation_interface_picd
+- optimized protobuf debug protobufd
+- )
+- endif (DYN_PROTOBUF)
+-
+- set ( SUMO_LIBRARIES
+- optimized libsumostatic debug libsumostaticd
+- optimized netload debug netloadd
+- optimized traciserver debug traciserverd
+- optimized libsumostatic debug libsumostaticd
+- optimized utils_vehicle debug utils_vehicled
+- optimized utils_distribution debug utils_distributiond
+- optimized utils_shapes debug utils_shapesd
+- optimized utils_options debug utils_optionsd
+- optimized utils_xml debug utils_xmld
+- optimized utils_geom debug utils_geomd
+- optimized utils_common debug utils_commond
+- optimized utils_iodevices debug utils_iodevicesd
+- optimized utils_traction_wire debug utils_traction_wired
+- optimized utils_emissions debug utils_emissionsd
+- optimized microsim_engine debug microsim_engined
+- optimized microsim_lcmodels debug microsim_lcmodelsd
+- optimized microsim_devices debug microsim_devicesd
+- optimized microsim_trigger debug microsim_triggerd
+- optimized microsim_output debug microsim_outputd
+- optimized microsim_transportables debug microsim_transportablesd
+- optimized microsim_actions debug microsim_actionsd
+- optimized microsim_traffic_lights debug microsim_traffic_lightsd
+- optimized microsim debug microsimd
+- optimized mesosim debug mesosimd
+- optimized foreign_phemlight debug foreign_phemlightd
+- optimized foreign_tcpip debug foreign_tcpipd
+- optimized microsim_cfmodels debug microsim_cfmodelsd
+- optimized zlibstatic debug zlibstaticd
+- optimized xerces-c_3 debug xerces-c_3D
+- )
+-
+- set (GTEST_LIBRARIES
+- optimized gmock debug gmockd
+- optimized gmock_main debug gmock_maind
+- optimized gtest debug gtestd
+- optimized gtest_main debug gtest_maind
+- )
++ set ( OSI_LIBRARIES open_simulation_interface::open_simulation_interface )
++ set ( SUMO_LIBRARIES sumocpp tracicpp )
+
+ elseif(MSVC)
+
+@@ -510,61 +275,6 @@ FOREACH(subdir ${SUBDIRS})
+ endif ()
+ ENDFOREACH()
+
+-
+-#
+-# Download library and content binary packets
+-#
+-
+-function (download_and_extract url target_folder target_filename)
+- message (STATUS "downloading ${target_filename} ...")
+- file (DOWNLOAD ${url} ${target_folder}/${target_filename} STATUS DOWNLOAD_STATUS)
+-
+- if(DOWNLOAD_STATUS AND NOT DOWNLOAD_STATUS EQUAL 0)
+- message(FATAL_ERROR "FAILED to download ${target_filename} (Status: ${DOWNLOAD_STATUS})")
+- endif()
+-
+- execute_process (COMMAND sleep 1) # allow for file to be completely flushed
+-
+- message (STATUS "extracting ${target_filename} ... ")
+- execute_process (COMMAND ${CMAKE_COMMAND} -E tar xfz ${target_filename} WORKING_DIRECTORY ${target_folder} RESULT_VARIABLE STATUS)
+-
+- if(STATUS AND NOT STATUS EQUAL 0)
+- message(FATAL_ERROR "FAILED to unpack ${target_filename}")
+- endif()
+-
+- file (REMOVE ${target_folder}/${target_filename})
+-endfuncti
This message was truncated. Download the full message here.
?