set(utils_common_STAT_SRCS
   Command.h
   FileBucket.cpp
   FileBucket.h
   FileHelpers.cpp
   FileHelpers.h
   IDSupplier.cpp
   IDSupplier.h
   LinearApproxHelpers.cpp
   LinearApproxHelpers.h
   MapMatcher.h
   MsgHandler.cpp
   MsgHandler.h
   MsgRetrievingFunction.h
   Named.h
   NamedObjectCont.h
   NamedRTree.h
   Parameterised.cpp
   Parameterised.h
   PolySolver.cpp
   PolySolver.h
   RandHelper.cpp
   RandHelper.h
   RGBColor.cpp
   RGBColor.h
   ScopedLocker.h
   SequentialStringBijection.h
   StaticCommand.h
   StdDefs.cpp
   StdDefs.h
   StringBijection.h
   StringTokenizer.cpp
   StringTokenizer.h
   StringUtils.cpp
   StringUtils.h
   SUMOTime.cpp
   SUMOTime.h
   SUMOVehicleClass.cpp
   SUMOVehicleClass.h
   SysUtils.cpp
   SysUtils.h
   ToString.h
   UtilExceptions.cpp
   UtilExceptions.h
   ValueRetriever.h
   ValueSource.h
   ValueTimeLine.h
   VectorHelper.h
   WrappingCommand.h
   iodevices/CSVFormatter.cpp
   iodevices/CSVFormatter.h
   iodevices/OutputDevice.cpp
   iodevices/OutputDevice.h
   iodevices/OutputDevice_CERR.cpp
   iodevices/OutputDevice_CERR.h
   iodevices/OutputDevice_COUT.cpp
   iodevices/OutputDevice_COUT.h
   iodevices/OutputDevice_File.cpp
   iodevices/OutputDevice_File.h
   iodevices/OutputDevice_Network.cpp
   iodevices/OutputDevice_Network.h
   iodevices/OutputDevice_String.cpp
   iodevices/OutputDevice_String.h
   iodevices/OutputFormatter.h
   iodevices/PlainXMLFormatter.cpp
   iodevices/PlainXMLFormatter.h
)
if (HAVE_PARQUET)
   set(utils_common_STAT_SRCS
      ${utils_common_STAT_SRCS}
      iodevices/ParquetFormatter.cpp
      iodevices/ParquetFormatter.h
   )
endif()

add_library(utils_common STATIC ${utils_common_STAT_SRCS})
add_dependencies(utils_common generate-version-h)
set_property(TARGET utils_common PROPERTY PROJECT_LABEL "z_utils_common")
target_link_libraries(utils_common PUBLIC utils_xml foreign_tcpip ${ZLIB_LIBRARIES}
                      ${Intl_LIBRARIES} ${FMT_LIBRARY} ${FOX_LIBRARY} ${BOOST_LIBRARIES} ${CMAKE_DL_LIBS})
# PRIVATE keeps the link dependency but does not spread the C++20 requirement of Parquet to dependent libs
target_link_libraries(utils_common PRIVATE ${PARQUET_LIBRARY})
if (PPROF)
    target_link_libraries(utils_common PUBLIC profiler)
endif ()
