From d5bc3f0631da7fd2d5f121c9e9ecee2732052229 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Thu, 7 Dec 2023 15:29:44 +0100 Subject: [PATCH] Fix FMU install dir Signed-off-by: ClemensLinnhoff --- CMakeLists.txt | 2 ++ src/CMakeLists.txt | 2 +- src/modelDescription.in.xml | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fe1d2a0..695947e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,5 +43,7 @@ get_directory_property(OSI_VERSION_MINOR DIRECTORY lib/open-simulation-interface get_directory_property(OSI_VERSION_PATCH DIRECTORY lib/open-simulation-interface DEFINITION VERSION_PATCH) set(OSIVERSION "${OSI_VERSION_MAJOR}.${OSI_VERSION_MINOR}.${OSI_VERSION_PATCH}") +set(FMU_INSTALL_DIR "${CMAKE_BINARY_DIR}" CACHE PATH "Target directory for generated FMU") + include_directories( lib/fmi2/headers ) add_subdirectory( src ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d4d6541..9d41f0c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -44,4 +44,4 @@ add_custom_command(TARGET OSMPTraceFilePlayer 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" "../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 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}") diff --git a/src/modelDescription.in.xml b/src/modelDescription.in.xml index 6c687c5..9c5fc4d 100644 --- a/src/modelDescription.in.xml +++ b/src/modelDescription.in.xml @@ -1,9 +1,9 @@