-
-
Notifications
You must be signed in to change notification settings - Fork 308
Fix library name on Cygwin, MSYS and MinGW when using cmake #972
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #972 +/- ##
===========================================
- Coverage 77.46% 75.81% -1.66%
===========================================
Files 74 74
Lines 8313 8082 -231
Branches 1374 1345 -29
===========================================
- Hits 6440 6127 -313
- Misses 1339 1425 +86
+ Partials 534 530 -4
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
|
Doesn't this line in madler/zlib mean that it is expecting zlib1.dll for all WIN32? |
|
@nmoinvaz I'm assuming |
|
@nmoinvaz I changed the code, not sure if we want filename zlibstatic-ng.lib on Windows when compiling with Visual C++... Open for suggestions as long as it doesn't cause import library of dll to have same name as static library. |
…atic" * On CygWin, MSYS and MinGW, the static library name should be "z" like on other Unix-like systems
| set_target_properties(zlib PROPERTIES OUTPUT_NAME zlib${SUFFIX}) | ||
| endif() | ||
| # Static library | ||
| if(NOT DEFINED BUILD_SHARED_LIBS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you combine these four set_target_properties calls using ${ZLIB_INSTALL_LIBRARIES} as the target?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so... ${ZLIB_INSTALL_LIBRARIES} can also contain the shared library.
I tried combining matching ones using zlibstatic as target name but it did throw error that aliases can't be used with set_target_properties.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about using: z$<$<C_COMPILER_ID:MSVC>:libstatic>${SUFFIX}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's pretty much unreadable to average developer...
|
I'm not quite convinced that we need this because madler/zlib doesn't use this right? What am I missing? |
|
@nmoinvaz Stock zlib predates Cygwin, MSYS and MinGW, so its |
- Minor code cleanup #983 #984 - Fix mpicc compilation #959 - Fix build on NetBSD #964 - Fix build on OpenBSD #970 - Fix build on Cygwin #972 #974 - Fix linter warnings in configure #975 - Spelling fixes #961 - Improve unistd.h handling #960 - Remove stdarg.h detection #976 - CI/Test improvements #977 #981 #985 - Cmake improvements #980
- Minor code cleanup #983 #984 - Fix mpicc compilation #959 - Fix build on NetBSD #964 - Fix build on OpenBSD #970 - Fix build on Cygwin #972 #974 - Fix linter warnings in configure #975 - Spelling fixes #961 - Improve unistd.h handling #960 - Remove stdarg.h detection #976 - CI/Test improvements #977 #981 #985 - Cmake improvements #980 #989
- Fix inflate corruption #982 - Minor code cleanup #983 #984 - Fix mpicc compilation #959 - Fix build on NetBSD #964 - Fix build on OpenBSD #970 - Fix build on Cygwin #972 #974 - Fix linter warnings in configure #975 - Spelling fixes #961 - Improve unistd.h handling #960 - Remove stdarg.h detection #976 - CI/Test improvements #977 #981 #985 - Cmake improvements #980 #989
- Fix inflate corruption #982 - Minor code cleanup #983 #984 - Fix mpicc compilation #959 - Fix build on NetBSD #964 - Fix build on OpenBSD #970 - Fix build on Cygwin #972 #974 - Fix linter warnings in configure #975 - Spelling fixes #961 - Improve unistd.h handling #960 - Remove stdarg.h detection #976 - CI/Test improvements #977 #981 #985 - Cmake improvements #980 #989
See #971.