mirror of
https://github.com/jmcnamara/libxlsxwriter.git
synced 2026-05-15 14:15:54 -06:00
[GH-ISSUE #242] CMAKE doesn't find ZLIB_ROOT issue, maybe related to missing zlib.h in 3rd party lib #193
Labels
No labels
awaiting user feedback
bug
cmake
cmake
docs
feature request
in progress
long term
medium term
medium term
pull-request
question
question
ready to close
short term
under investigation
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/libxlsxwriter#193
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @GordonEldest on GitHub (Aug 29, 2019).
Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/242
Originally assigned to: @jmcnamara on GitHub.
Good lib but Not easy to use the Visual GUI of CMAKE (VS2017 x64 CMAKE 3.10.2)
Major CMAKE issues related to ZLIB
A non fatal ZLIB_ROOT Env not defined (Not everybody define Zlib as an env path) but non blocking
I was eventually able to make it running but by patching in hard de CmakeFile.txt wit ZLIB
WARNING theses path are specific to my config
Not enough knowledege of CMAKE arcan to cross check minimal modif to make it running
Latest issue is missing zlib.h in 3rd party minizip,
(minizip is not ought to contain this header but zip.c call it)
=> Checking "USE_SYSTEM_MINIZIP" seems missleading as ZLIB is mandatory
Suggestion:
Remove reference to USE_SYSTEM_MINIZIP (and explain that a zlib.lib is needed)
or include zlib.h in thirdparty
or see if zlib.h is really needed in zip,c (seems so as stream struct is not defined anywhere else)
Without any patch------------>
With patch but WITH USE_SYSTEM_MINIZIP checked--------------->
@John-Colvin commented on GitHub (Aug 30, 2019):
What was the full cmake command you used?
@jmcnamara commented on GitHub (Aug 31, 2019):
@Alexhuszagh or @evanmiller could you take a look at this Libxlsxwriter CMake/Zlib issue and maybe also #243. Thanks.
@Alexhuszagh commented on GitHub (Sep 3, 2019):
Taking a look, it might take me a few days to fully get to this project, but I'll try now.
@Alexhuszagh commented on GitHub (Sep 3, 2019):
@GordonEldest You shouldn't need to set it as an environment variable, and you should never use relative paths in CMake since they're not guaranteed to be invoked from the same directory.
Say you you have the following package structure:
We can invoke CMake from any folder, and relative paths are treated as relative to the working directory from which CMake is run. Therefore,
../libzlibrun fromparent folder/project/buildwill point toparent folder/project/libzlib, and notparent folder/libzlib, as you may have intended. To fix this, check the following code sample:Let me know if that doesn't solve your issues, I'll try to get a working example up shortly. We're currently suffering a CMake backwards compatibility (for CMake versions >= 3.12.0) issue as well, so that might be an additional issue as well.
@jmcnamara commented on GitHub (Sep 5, 2019):
@GordonEldest Can you test the proposed fix.
@jmcnamara commented on GitHub (Sep 8, 2019):
@GordonEldest I'm closing this issue. You can test against the current master to see if your issue is fixed. If it isn't then open a new issue, with details on how to reproduce, or post a follow-up here.