Changeset 639c961b in OpenModelica
- Timestamp:
- 2022-05-17T13:54:53+02:00 (2 years ago)
- Parents:
- b7b3c97
- Location:
- OMCompiler/SimulationRuntime
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
OMCompiler/SimulationRuntime/ModelicaExternalC/MEC_standalone_2.8.cmake
ra71d04e r639c961b 14 14 link_directories(${CMAKE_INSTALL_LIBDIR} ${CMAKE_INSTALL_BINDIR}) 15 15 16 # Set the rpath to the same dir as the destination of the libs 17 # when installing. This should be enough since the dependencies 18 # (libOpenModelicaRuntimeC and libomcgc) should end up in the same 19 # dir as well (lib/<arch>/omc/ on linux or bin/ on Windows). 20 set(CMAKE_INSTALL_RPATH $ORIGIN) 16 # Set the rpath to the one dir up as the destination of the libs 17 # when installing is an 'ffi' directory in the lib directory. 18 # See the install commnad at the end of this file. If that is 19 # changed make sure to adjust this as well. 20 if(APPLE) 21 set(CMAKE_INSTALL_RPATH "@loader_path/../../${CMAKE_INSTALL_LIBDIR}") 22 else() 23 set(CMAKE_INSTALL_RPATH "$ORIGIN;$ORIGIN/../../${CMAKE_INSTALL_LIBDIR}") 24 endif() 21 25 22 26 ## ModelicaExternalC ######################################################################### … … 30 34 add_library(omc::simrt::Modelica::ExternalC ALIAS ModelicaExternalC) 31 35 32 target_link_libraries(ModelicaExternalC PUBLIC m) 36 if(UNIX) 37 target_link_libraries(ModelicaExternalC PUBLIC m) 38 endif() 39 33 40 target_link_libraries(ModelicaExternalC PUBLIC OpenModelicaRuntimeC) 34 41 target_link_libraries(ModelicaExternalC PUBLIC omcgc) … … 40 47 PROPERTIES OUTPUT_NAME ModelicaExternalC CLEAN_DIRECT_OUTPUT 1) 41 48 42 target_link_libraries(ModelicaExternalC_shared PUBLIC m) 49 if(UNIX) 50 target_link_libraries(ModelicaExternalC_shared PUBLIC m) 51 endif() 52 43 53 target_link_libraries(ModelicaExternalC_shared PUBLIC OpenModelicaRuntimeC) 44 54 target_link_libraries(ModelicaExternalC_shared PUBLIC omcgc) 45 55 46 if( WIN32)56 if(MINGW) 47 57 set_target_properties(ModelicaExternalC_shared PROPERTIES LINK_FLAGS "-Wl,--export-all-symbols") 58 elseif(MSVC) 59 set_target_properties(ModelicaExternalC_shared PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS true) 48 60 endif() 49 61 … … 71 83 target_link_libraries(ModelicaMatIO_shared PUBLIC OpenModelicaRuntimeC) 72 84 target_link_libraries(ModelicaMatIO_shared PUBLIC omcgc) 73 if(WIN32) 85 86 if(MINGW) 74 87 set_target_properties(ModelicaMatIO_shared PROPERTIES LINK_FLAGS "-Wl,--export-all-symbols") 88 elseif(MSVC) 89 set_target_properties(ModelicaMatIO_shared PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS true) 75 90 endif() 76 91 … … 91 106 92 107 target_link_libraries(ModelicaIO_shared PUBLIC ModelicaMatIO_shared) 93 if( WIN32)108 if(MINGW) 94 109 set_target_properties(ModelicaIO_shared PROPERTIES LINK_FLAGS "-Wl,--export-all-symbols") 110 elseif(MSVC) 111 set_target_properties(ModelicaIO_shared PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS true) 95 112 endif() 96 113 … … 108 125 109 126 target_link_libraries(ModelicaStandardTables PUBLIC ModelicaIO) 110 target_link_libraries(ModelicaStandardTables PUBLIC m) 127 if(UNIX) 128 target_link_libraries(ModelicaStandardTables PUBLIC m) 129 endif() 111 130 112 131 # Shared version … … 120 139 121 140 target_link_libraries(ModelicaStandardTables_shared PUBLIC ModelicaIO_shared) 122 target_link_libraries(ModelicaStandardTables_shared PUBLIC m) 123 if(WIN32) 141 if(UNIX) 142 target_link_libraries(ModelicaStandardTables_shared PUBLIC m) 143 endif() 144 145 if(MINGW) 124 146 set_target_properties(ModelicaStandardTables_shared PROPERTIES LINK_FLAGS "-Wl,--export-all-symbols") 147 elseif(MSVC) 148 set_target_properties(ModelicaStandardTables_shared PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS true) 125 149 endif() 126 150 -
OMCompiler/SimulationRuntime/cpp/Core/CMakeLists.txt
rd9b9ced9 r639c961b 8 8 set(Boost_LIBS_ ".") 9 9 set(LAPACK_LIBS_ ".") 10 set(LAPACK_LIBRARIES_ " -llapack -lblas")10 set(LAPACK_LIBRARIES_ "") 11 11 set(SYSTEM_CFLAGS ${SYSTEM_CFLAGS} "-DOMC_BUILD -fPIC -DUSE_THREAD") 12 12 -
OMCompiler/SimulationRuntime/cpp/cmake_3.14.cmake
rf6dfe83 r639c961b 6 6 # CPP libs should be installed to in lib/<arch>/omc/cpp/ for now. 7 7 set(CMAKE_INSTALL_LIBDIR ${CMAKE_INSTALL_LIBDIR}/cpp) 8 set(CMAKE_INSTALL_BINDIR ${CMAKE_INSTALL_LIBDIR}) 8 9 # CPP headers are installed in include/omc/cpp for now. 9 10 set(CMAKE_INSTALL_INCLUDEDIR ${CMAKE_INSTALL_INCLUDEDIR}/cpp)
Note: See TracChangeset
for help on using the changeset viewer.