aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/esmini-use-pkgconfig.patch
blob: 73e1b50015df083c6aa1e6bad4bf36768f8929e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
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})
-endfunction (download_and_extract)
-
-# download OpenSceneGraph
-set ( OSG_PACKAGE_FILENAME "osg.7z" )
-if (DEFINED OSG_DIR AND (FORCE_DOWNLOAD_BINARIES OR NOT EXISTS ${OSG_DIR} ))
-    download_and_extract( ${OSG_PACKAGE_URL} ${OSG_BASE_DIR} ${OSG_PACKAGE_FILENAME} )
-endif()
-
-# download OSI
-set ( OSI_PACKAGE_FILENAME "osi.7z" )
-if (DEFINED OSI_DIR AND (FORCE_DOWNLOAD_BINARIES OR NOT EXISTS ${OSI_DIR} ))
-    download_and_extract( ${OSI_PACKAGE_URL} ${OSI_BASE_DIR} ${OSI_PACKAGE_FILENAME} )
-endif()
-
-# download SUMO
-set ( SUMO_PACKAGE_FILENAME "sumo.7z" )
-if (DEFINED SUMO_DIR AND (FORCE_DOWNLOAD_BINARIES OR NOT EXISTS ${SUMO_DIR} ))
-  download_and_extract( ${SUMO_PACKAGE_URL} ${SUMO_BASE_DIR} ${SUMO_PACKAGE_FILENAME} )
-endif()
-
-# download googletest
-if(NOT (APPLE OR MINGW))  # not available for Mac yet
-  set ( GTEST_PACKAGE_FILENAME "googletest.7z" )
-  if (DEFINED GTEST_DIR AND (FORCE_DOWNLOAD_BINARIES OR NOT EXISTS ${GTEST_DIR} ))
-      download_and_extract( ${GTEST_PACKAGE_URL} ${GTEST_BASE_DIR} ${GTEST_PACKAGE_FILENAME} )
-  endif()
-endif()
-
-if (DEFINED MODELS_DIR AND (FORCE_DOWNLOAD_BINARIES OR NOT EXISTS ${MODELS_DIR} ))
-    download_and_extract(${MODELS_PACKAGE_URL} ${MODELS_BASE_DIR} ${MODELS_PACKAGE_FILENAME})
-endif()
-
 add_subdirectory(Applications/odrplot)
 add_subdirectory(Applications/replayer)
 
diff --git a/EnvironmentSimulator/Modules/Controllers/ControllerSumo.cpp b/EnvironmentSimulator/Modules/Controllers/ControllerSumo.cpp
index 4c701d94..cb5de5bb 100644
--- a/EnvironmentSimulator/Modules/Controllers/ControllerSumo.cpp
+++ b/EnvironmentSimulator/Modules/Controllers/ControllerSumo.cpp
@@ -16,7 +16,6 @@
 #include "ScenarioGateway.hpp"
 #include "pugixml.hpp"
 
-#include <utils/geom/PositionVector.h>
 #include <libsumo/Simulation.h>
 #include <libsumo/Vehicle.h>
 #include <libsumo/TraCIDefs.h>
diff --git a/EnvironmentSimulator/Modules/RoadManager/CMakeLists.txt b/EnvironmentSimulator/Modules/RoadManager/CMakeLists.txt
index e4fad5f1..32d7a79c 100644
--- a/EnvironmentSimulator/Modules/RoadManager/CMakeLists.txt
+++ b/EnvironmentSimulator/Modules/RoadManager/CMakeLists.txt
@@ -2,7 +2,7 @@
 include_directories (
   ${PUGIXML_INCLUDE_DIR}
   ${COMMON_MINI_INCLUDE_DIR}
-  ${ROADMANAGER_INCLUDE_DIR}  
+  ${ROADMANAGER_INCLUDE_DIR}
 )
 
 set ( SOURCES
@@ -11,8 +11,6 @@ set ( SOURCES
   LaneIndependentRouter.cpp
 )
 
-set ( SRC_ADDITIONAL ../../../externals/pugixml/pugixml.cpp)
-
 SOURCE_GROUP("External Libraries" FILES ${SRC_ADDITIONAL})
 
 set ( INCLUDES
@@ -25,6 +23,6 @@ if(MSVC)
 	add_definitions("/wd4482")
 endif()
 
-add_library ( RoadManager STATIC ${SOURCES} ${SRC_ADDITIONAL} ${INCLUDES} )
+add_library ( RoadManager STATIC ${SOURCES} ${INCLUDES} )
 
-target_link_libraries ( RoadManager CommonMini project_options)
\ No newline at end of file
+target_link_libraries ( RoadManager CommonMini pugixml::pugixml project_options)
diff --git a/EnvironmentSimulator/Modules/ScenarioEngine/CMakeLists.txt b/EnvironmentSimulator/Modules/ScenarioEngine/CMakeLists.txt
index aec86ad6..86da77c1 100644
--- a/EnvironmentSimulator/Modules/ScenarioEngine/CMakeLists.txt
+++ b/EnvironmentSimulator/Modules/ScenarioEngine/CMakeLists.txt
@@ -5,7 +5,7 @@ include_directories (
   ${ROADMANAGER_INCLUDE_DIR}
   ${COMMON_MINI_INCLUDE_DIR}
   ${CONTROLLERS_INCLUDE_DIR}
-  ${REPLAY_INCLUDE_DIR}  
+  ${REPLAY_INCLUDE_DIR}
   ${RDB_INCLUDE_DIR}
   ${OSI_INCLUDE_DIR}
   ${SUMO_INCLUDE_DIR}
@@ -20,20 +20,15 @@ if (NOT USE_OSI)
     list(REMOVE_ITEM SRC_SOURCEFILES "${CMAKE_CURRENT_LIST_DIR}/SourceFiles/OSIReporter.cpp")
 endif (NOT USE_OSI)
 
-set ( SRC_ADDITIONAL ../../../externals/pugixml/pugixml.cpp )
-
 SOURCE_GROUP(OSCTypeDefs FILES ${SRC_OSCTYPEDEFS})
 SOURCE_GROUP("Source Files" FILES ${SRC_SOURCEFILES})
 SOURCE_GROUP("External Libraries" FILES ${SRC_ADDITIONAL})
 
-add_library ( ScenarioEngine STATIC 
-  ${SRC_OSCTYPEDEFS} 
-  ${SRC_SOURCEFILES} 
-  ${SRC_ADDITIONAL} 
+add_library ( ScenarioEngine STATIC
+  ${SRC_OSCTYPEDEFS}
+  ${SRC_SOURCEFILES}
 )
 
 add_definitions(-D_CRT_SECURE_NO_WARNINGS)
 
-target_link_libraries(ScenarioEngine PRIVATE project_options)
-
-	
+target_link_libraries(ScenarioEngine PRIVATE pugixml::pugixml project_options)
-- 
2.38.1