Skip to content

Commit

Permalink
Fixed error with install_name_tool for OMSI
Browse files Browse the repository at this point in the history
Belonging to [master]:
  - OpenModelica/OMCompiler#3041
  • Loading branch information
AnHeuermann authored and OpenModelica-Hudson committed Apr 5, 2019
1 parent 45edd24 commit 0a7961e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
10 changes: 4 additions & 6 deletions Makefile.omsi.common
Expand Up @@ -76,12 +76,10 @@ OMSIBaseMSVC: getMSVCversion
OMSIBaseInstall: OMSIBase
cd SimulationRuntime/OMSI; \
$(foreach PLATFORM, $(PLATFORMS), \
(cd Build_$(PLATFORM); $(MAKE) install; \
test ! `uname` = Darwin || install_name_tool -id @rpath/OMSI/Build_dynamic/base/libOMSIBase.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsi/libOMSIBase.dylib; \
test ! `uname` = Darwin || install_name_tool -id @rpath/OMSI/Build_dynamic/solver/libOMSISolver.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsi/libOMSISolver.dylib; \
test ! `uname` = Darwin || install_name_tool -change libsundials_nvecserial.0.dylib @rpath/OMSI/Build_dynamic/solver/libOMSISolver.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsi/libOMSISolver.dylib; \
test ! `uname` = Darwin || install_name_tool -change libsundials_kinsol.1.dylib @rpath/OMSI/Build_dynamic/solver/libOMSISolver.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsi/libOMSISolver.dylib); \
)
(cd Build_$(PLATFORM); $(MAKE) install);) \

test ! `uname` = Darwin || install_name_tool -id @rpath/omsi/libOMSIBase.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsi/libOMSIBase.dylib
test ! `uname` = Darwin || install_name_tool -id @rpath/omsi/libOMSISolver.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsi/libOMSISolver.dylib

OMSIBaseClean:
cd SimulationRuntime/OMSI; \
Expand Down
3 changes: 3 additions & 0 deletions SimulationRuntime/OMSI/base/CMakeLists.txt
Expand Up @@ -35,6 +35,9 @@ ELSE(WIN32)
target_link_libraries(${OSUBaseName} ${OMSISolverName} ${CMAKE_DL_LIBS} ${expat_lib})
ENDIF(WIN32)

set(CMAKE_MACOSX_RPATH 1)
set(CMAKE_INSTALL_RPATH "${LIBINSTALLEXT}")

install(TARGETS ${OSUBaseName} DESTINATION ${LIBINSTALLEXT})

install(FILES
Expand Down

0 comments on commit 0a7961e

Please sign in to comment.