From 020001f8b295745eb03082824f127391c574a6fe Mon Sep 17 00:00:00 2001 From: Clemens Linnhoff Date: Mon, 12 Aug 2024 14:12:51 +0200 Subject: [PATCH] Fix FMU name (#10) Signed-off-by: ClemensLinnhoff --- CMakeLists.txt | 6 +++--- src/CMakeLists.txt | 16 ++++++++-------- src/modelDescription.in.xml | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 695947e..39211aa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.5) -project(OSMPTraceFilePlayer) +project(sl-5-5-osi-trace-file-player) set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) @@ -11,9 +11,9 @@ set(DEBUG_BREAKS_TRACE_FILE_PLAYER OFF CACHE BOOL "Enable debugger traps for deb if(PRIVATE_LOGGING_TRACE_FILE_PLAYER) if(WIN32) - set(PRIVATE_LOG_PATH_TRACE_FILE_PLAYER "C:/TEMP/OSMPTraceFilePlayerLog.log" CACHE FILEPATH "Path to write private log file to") + set(PRIVATE_LOG_PATH_TRACE_FILE_PLAYER "C:/TEMP/sl-5-5-osi-trace-file-player.log" CACHE FILEPATH "Path to write private log file to") else() - set(PRIVATE_LOG_PATH_TRACE_FILE_PLAYER "/tmp/OSMPTraceFilePlayerLog.log" CACHE FILEPATH "Path to write private log file to") + set(PRIVATE_LOG_PATH_TRACE_FILE_PLAYER "/tmp/sl-5-5-osi-trace-file-player.log" CACHE FILEPATH "Path to write private log file to") endif() file(TO_NATIVE_PATH ${PRIVATE_LOG_PATH_TRACE_FILE_PLAYER} PRIVATE_LOG_PATH_TRACE_FILE_PLAYER_NATIVE) string(REPLACE "\\" "\\\\" PRIVATE_LOG_PATH_TRACE_FILE_PLAYER ${PRIVATE_LOG_PATH_TRACE_FILE_PLAYER_NATIVE}) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9d41f0c..d54d0e0 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -4,13 +4,13 @@ configure_file(modelDescription.in.xml modelDescription.xml @ONLY) configure_file(OSMPTraceFilePlayerConfig.in.h OSMPTraceFilePlayerConfig.h) find_package(Protobuf 2.6.1 REQUIRED) -add_library(OSMPTraceFilePlayer SHARED OSMPTraceFilePlayer.cpp) -set_target_properties(OSMPTraceFilePlayer PROPERTIES PREFIX "") -target_compile_definitions(OSMPTraceFilePlayer PRIVATE "FMU_SHARED_OBJECT") +add_library(sl-5-5-osi-trace-file-player SHARED OSMPTraceFilePlayer.cpp) +set_target_properties(sl-5-5-osi-trace-file-player PROPERTIES PREFIX "") +target_compile_definitions(sl-5-5-osi-trace-file-player PRIVATE "FMU_SHARED_OBJECT") if(LINK_WITH_SHARED_OSI) - target_link_libraries(OSMPTraceFilePlayer open_simulation_interface stdc++fs) + target_link_libraries(sl-5-5-osi-trace-file-player open_simulation_interface stdc++fs) else() - target_link_libraries(OSMPTraceFilePlayer open_simulation_interface_pic stdc++fs) + target_link_libraries(sl-5-5-osi-trace-file-player open_simulation_interface_pic stdc++fs) endif() include_directories(${CMAKE_CURRENT_BINARY_DIR}) @@ -34,7 +34,7 @@ elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") endif() endif() -add_custom_command(TARGET OSMPTraceFilePlayer +add_custom_command(TARGET sl-5-5-osi-trace-file-player POST_BUILD COMMAND ${CMAKE_COMMAND} -E remove_directory "${CMAKE_CURRENT_BINARY_DIR}/buildfmu" COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/buildfmu/sources" @@ -43,5 +43,5 @@ add_custom_command(TARGET OSMPTraceFilePlayer COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/OSMPTraceFilePlayer.cpp" "${CMAKE_CURRENT_BINARY_DIR}/buildfmu/sources/" COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/OSMPTraceFilePlayer.h" "${CMAKE_CURRENT_BINARY_DIR}/buildfmu/sources/" COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_BINARY_DIR}/OSMPTraceFilePlayerConfig.h" "${CMAKE_CURRENT_BINARY_DIR}/buildfmu/sources/OSMPTraceFilePlayerConfig.h" - COMMAND ${CMAKE_COMMAND} -E copy $ $<$:$<$:$>> "${CMAKE_CURRENT_BINARY_DIR}/buildfmu/binaries/${FMI_BINARIES_PLATFORM}" - COMMAND ${CMAKE_COMMAND} -E chdir "${CMAKE_CURRENT_BINARY_DIR}/buildfmu" ${CMAKE_COMMAND} -E tar "cfv" "${FMU_INSTALL_DIR}/OSMPTraceFilePlayer.fmu" --format=zip "modelDescription.xml" "${CMAKE_CURRENT_BINARY_DIR}/buildfmu/sources" "${CMAKE_CURRENT_BINARY_DIR}/buildfmu/binaries/${FMI_BINARIES_PLATFORM}") + COMMAND ${CMAKE_COMMAND} -E copy $ $<$:$<$:$>> "${CMAKE_CURRENT_BINARY_DIR}/buildfmu/binaries/${FMI_BINARIES_PLATFORM}" + COMMAND ${CMAKE_COMMAND} -E chdir "${CMAKE_CURRENT_BINARY_DIR}/buildfmu" ${CMAKE_COMMAND} -E tar "cfv" "${FMU_INSTALL_DIR}/sl-5-5-osi-trace-file-player.fmu" --format=zip "modelDescription.xml" "${CMAKE_CURRENT_BINARY_DIR}/buildfmu/sources" "${CMAKE_CURRENT_BINARY_DIR}/buildfmu/binaries/${FMI_BINARIES_PLATFORM}") diff --git a/src/modelDescription.in.xml b/src/modelDescription.in.xml index 0ae5c80..9fddaba 100644 --- a/src/modelDescription.in.xml +++ b/src/modelDescription.in.xml @@ -1,7 +1,7 @@