Skip to content

Allow building zlib and libsbml at the same time.#474

Open
luciansmith wants to merge 1 commit intodevelopmentfrom
allow-build-with-co-zlib
Open

Allow building zlib and libsbml at the same time.#474
luciansmith wants to merge 1 commit intodevelopmentfrom
allow-build-with-co-zlib

Conversation

@luciansmith
Copy link
Member

The check_library_exists function breaks my build when building both zlib and libsbml at once. I get the error:

CMake Error at C:/Users/Lucian/Desktop/libroadrunner-deps-backup/build-debug/CMakeFiles/CMakeScratch/TryCompile-m25yy5/CMakeLists.txt:28 (target_link_libraries):
Error evaluating generator expression:

$<TARGET_LINKER_FILE:zlibstatic>

No target "zlibstatic"

If I then hit compile again, it works! But the first time, it fails, and it needs to work the first time for my github action.

This problem was obfuscated by it previously trying to assign the result to LIBZ_CMAKE_PATH, which already existed, so it... broke the check? Maybe? Anyway.

I don't think we need to check that the library exists anyway. We don't do it for any of the XML libraries, and only do it for BZip. Which would probably also break my build, but I'm not including bzip in my build at all.

The check_library_exists function breaks my build when building both zlib and libsbml at once.  I get the error:

CMake Error at C:/Users/Lucian/Desktop/libroadrunner-deps-backup/build-debug/CMakeFiles/CMakeScratch/TryCompile-m25yy5/CMakeLists.txt:28 (target_link_libraries):
  Error evaluating generator expression:

    $<TARGET_LINKER_FILE:zlibstatic>

  No target "zlibstatic"

If I then hit compile again, it works!  But the first time, it fails, and it needs to work the first time for my github action.

This problem was obfuscated by it previously trying to assign the result to LIBZ_CMAKE_PATH, which already existed, so it... broke the check?  Maybe?  Anyway.

I don't think we need to check that the library exists anyway.  We don't do it for any of the XML libraries, and only do it for BZip.  Which would probably also break my build, but I'm not including bzip in my build at all.
@luciansmith luciansmith requested a review from fbergmann March 9, 2026 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant