diff --git a/Compiler/Template/CodegenFMUCpp.tpl b/Compiler/Template/CodegenFMUCpp.tpl index c7830e33580..478fa865cba 100644 --- a/Compiler/Template/CodegenFMUCpp.tpl +++ b/Compiler/Template/CodegenFMUCpp.tpl @@ -759,16 +759,20 @@ case SIMCODE(modelInfo=MODELINFO(__), makefileParams=MAKEFILE_PARAMS(__), simula <%\t%>rm -rf binaries <%\t%><%mkdir%> -p "binaries/$(PLATFORM)" <%\t%>cp <%fileNamePrefix%>$(DLLEXT) "binaries/$(PLATFORM)/" - <%\t%>rm -f <%modelName%>.fmu - <%\t%>zip -r "<%modelName%>.fmu" modelDescription.xml binaries - <%\t%>rm -rf binaries ifeq ($(USE_FMU_KINSOL),ON) <%\t%>rm -rf documentation <%\t%><%mkdir%> -p "documentation" <%\t%>cp $(SUNDIALS_LIBRARIES_KINSOL) "binaries/$(PLATFORM)/" <%\t%>cp $(OMHOME)/share/omc/runtime/cpp/licenses/sundials.license "documentation/" + endif + <%\t%>rm -f <%modelName%>.fmu + ifeq ($(USE_FMU_KINSOL),ON) + <%\t%>zip -r "<%modelName%>.fmu" modelDescription.xml binaries documentation <%\t%>rm -rf documentation + else + <%\t%>zip -r "<%modelName%>.fmu" modelDescription.xml binaries endif + <%\t%>rm -rf binaries clean: <%\t%>rm $(SRC) <%fileNamePrefix%>$(DLLEXT)