From 717243df243bd7f59681a1581cb08dde58bb4df9 Mon Sep 17 00:00:00 2001 From: Adeel Asghar Date: Thu, 11 Feb 2021 14:55:11 +0100 Subject: [PATCH 1/2] Install OMSimulatorServer.py to build/share/OMSimulator/scripts --- CMakeLists.txt | 1 + src/OMSimulatorServer/CMakeLists.txt | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 src/OMSimulatorServer/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 03be3c83e..c1589f922 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -202,4 +202,5 @@ add_subdirectory(src/OMSimulator) add_subdirectory(src/OMSimulatorLib) add_subdirectory(src/OMSimulatorLua) add_subdirectory(src/OMSimulatorPython) +add_subdirectory(src/OMSimulatorServer) add_subdirectory(src/pip) diff --git a/src/OMSimulatorServer/CMakeLists.txt b/src/OMSimulatorServer/CMakeLists.txt new file mode 100644 index 000000000..4df049e31 --- /dev/null +++ b/src/OMSimulatorServer/CMakeLists.txt @@ -0,0 +1,3 @@ +project(OMSimulatorServer) + +install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/OMSimulatorServer.py" DESTINATION ${CMAKE_INSTALL_PREFIX}/share/OMSimulator/scripts) From 80112862ae0424364abb1df402c4d550527217ad Mon Sep 17 00:00:00 2001 From: Lennart Ochel Date: Fri, 12 Feb 2021 09:15:54 +0100 Subject: [PATCH 2/2] Install OMSimulatorServer only within OpenModelica super project --- src/OMSimulatorServer/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/OMSimulatorServer/CMakeLists.txt b/src/OMSimulatorServer/CMakeLists.txt index 4df049e31..d9a83cbd4 100644 --- a/src/OMSimulatorServer/CMakeLists.txt +++ b/src/OMSimulatorServer/CMakeLists.txt @@ -1,3 +1,6 @@ project(OMSimulatorServer) -install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/OMSimulatorServer.py" DESTINATION ${CMAKE_INSTALL_PREFIX}/share/OMSimulator/scripts) +# install only if build as part of the OpenModelica super project +if(DEFINED HOST_SHORT) + install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/OMSimulatorServer.py" DESTINATION ${CMAKE_INSTALL_PREFIX}/share/OMSimulator/scripts) +endif()