Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-add local ModelicaExternalC to Cpp runtime, ticket:5227
They had been removed in commit 9062175, but are needed to avoid unclear dependencies from MSL to HDF5 (and ZLIB). Belonging to [master]: - OpenModelica/OMCompiler#2804
- Loading branch information
1 parent
7f7fb53
commit 210af85
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
SimulationRuntime/cpp/Core/ModelicaExternalC/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Build default ModelicaExternalC libs (without extra flags like HAVE_HDF5). | ||
# Note: zlib is only here because it is referred to from MSL Tables and | ||
# thus passed to the linker. It is not used by default ModelicaMatIO though. | ||
|
||
cmake_minimum_required(VERSION 2.8.9) | ||
project(${ModelicaExternalName}) | ||
|
||
include_directories(${MODELICAEXTERNALCDIR}) | ||
add_definitions(-DDUMMY_FUNCTION_USERTAB) # yet an extra flag | ||
|
||
add_library(${ModelicaExternalName} STATIC ${MODELICAEXTERNALCDIR}/ModelicaFFT.c ${MODELICAEXTERNALCDIR}/ModelicaInternal.c ${MODELICAEXTERNALCDIR}/ModelicaRandom.c ${MODELICAEXTERNALCDIR}/ModelicaStrings.c) | ||
add_library(${ModelicaTablesName} STATIC ${MODELICAEXTERNALCDIR}/ModelicaStandardTables.c) | ||
add_library(${ModelicaIOName} STATIC ${MODELICAEXTERNALCDIR}/ModelicaIO.c) | ||
add_library(${ModelicaMatIOName} STATIC ${MODELICAEXTERNALCDIR}/ModelicaMatIO.c) | ||
add_library(${LibZName} STATIC ${MODELICAEXTERNALCDIR}/zlib/adler32.c ${MODELICAEXTERNALCDIR}/zlib/compress.c ${MODELICAEXTERNALCDIR}/zlib/crc32.c ${MODELICAEXTERNALCDIR}/zlib/deflate.c ${MODELICAEXTERNALCDIR}/zlib/gzclose.c ${MODELICAEXTERNALCDIR}/zlib/gzlib.c ${MODELICAEXTERNALCDIR}/zlib/gzread.c ${MODELICAEXTERNALCDIR}/zlib/gzwrite.c ${MODELICAEXTERNALCDIR}/zlib/infback.c ${MODELICAEXTERNALCDIR}/zlib/inffast.c ${MODELICAEXTERNALCDIR}/zlib/inflate.c ${MODELICAEXTERNALCDIR}/zlib/inftrees.c ${MODELICAEXTERNALCDIR}/zlib/trees.c ${MODELICAEXTERNALCDIR}/zlib/uncompr.c ${MODELICAEXTERNALCDIR}/zlib/zutil.c) | ||
|
||
install(TARGETS ${ModelicaExternalName} DESTINATION ${LIBINSTALLEXT}) | ||
install(TARGETS ${ModelicaTablesName} DESTINATION ${LIBINSTALLEXT}) | ||
install(TARGETS ${ModelicaIOName} DESTINATION ${LIBINSTALLEXT}) | ||
install(TARGETS ${ModelicaMatIOName} DESTINATION ${LIBINSTALLEXT}) | ||
install(TARGETS ${LibZName} DESTINATION ${LIBINSTALLEXT}) |