Skip to content

Commit

Permalink
Update libsbml to latest.
Browse files Browse the repository at this point in the history
(and change how we find zlib for it.)
  • Loading branch information
luciansmith committed Aug 19, 2024
1 parent 5fb8f55 commit beaf826
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions third_party/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ set(EXTRA_INCLUDE_DIRS "${EXTRA_INCLUDE_DIRS}" "$<TARGET_PROPERTY:zlib,INCLUDE_D
#message(STATUS "LIBZ_INCLUDE_DIR: ${LIBZ_INCLUDE_DIR}")
message(STATUS "Extra include directories: ${EXTRA_INCLUDE_DIRS}")
set(LIBZ_LIBRARY zlibstatic)
add_library(ZLIB:ZLIB ALIAS zlibstatic)
set(ZLIB_LIBRARY "$<TARGET_LINKER_FILE:zlibstatic>" CACHE FILEPATH "zlib static library" FORCE)

# nleq1
message(STATUS "Adding nleq1 as subdirectory")
Expand Down Expand Up @@ -71,20 +73,17 @@ if (WIN32)
set(LIBSBML_TARGET_ID "libsbml-static")
set(LIBSBML_INCLUDE_DIR "$<TARGET_PROPERTY:libsbml-static,INCLUDE_DIRECTORIES>")
set(LIBSBML_INCLUDE_DIRS "$<TARGET_PROPERTY:libsbml-static,INCLUDE_DIRECTORIES>")
set(LIBSBML_LIBRARY "$<TARGET_LINKER_FILE:libsbml-static>" CACHE FILEPATH "libsbml library" FORCE)
set(LIBSBML_LIBRARY "$<TARGET_LINKER_FILE:libsbml-static>" CACHE FILEPATH "libsbml static library" FORCE)
else (WIN32)
set(LIBSBML_TARGET_ID "sbml-static")
set(LIBSBML_INCLUDE_DIR "$<TARGET_PROPERTY:sbml-static,INCLUDE_DIRECTORIES>")
set(LIBSBML_INCLUDE_DIRS "$<TARGET_PROPERTY:sbml-static,INCLUDE_DIRECTORIES>")
set(LIBSBML_LIBRARY "$<TARGET_LINKER_FILE:sbml-static>" CACHE FILEPATH "libsbml library" FORCE)
set(LIBSBML_LIBRARY "$<TARGET_LINKER_FILE:sbml-static>" CACHE FILEPATH "libsbml static library" FORCE)
endif (WIN32)

add_dependencies("${LIBSBML_TARGET_ID}" expat zlibstatic)
set(FIND_LIBSBML OFF CACHE BOOL "Find libsbml." FORCE)

# Revert LIBZ_INCLUDE_DIR because it'll make things fail otherwise.
set(LIBZ_INCLUDE_DIR "$<TARGET_PROPERTY:zlib,INCLUDE_DIRECTORIES>")

## rr-libstruct
message(STATUS "Adding rr-libstruct as subdirectory")
add_subdirectory(rr-libstruct)
Expand Down
2 changes: 1 addition & 1 deletion third_party/libsbml
Submodule libsbml updated 299 files

0 comments on commit beaf826

Please sign in to comment.