-
Notifications
You must be signed in to change notification settings - Fork 765
Open
Description
I tried to update the libpng packages for CYGWIN and the MinGW-w64 cross compilers and I noticed something wrong.
Into the /lib directory, it is created a symlink to the libpng16.dll.a import library, but the extension is not correct:
As you can see, there is a libpng.dll instead of libpng.dll.a.
The error into CMakeLists.txt is located here:
Lines 817 to 821 in 0f07f70
| if(NOT WIN32 OR CYGWIN OR MINGW) | |
| create_symlink(libpng${CMAKE_SHARED_LIBRARY_SUFFIX} TARGET png_shared) | |
| install(FILES "$<TARGET_LINKER_FILE_DIR:png_shared>/libpng${CMAKE_SHARED_LIBRARY_SUFFIX}" | |
| DESTINATION "${CMAKE_INSTALL_LIBDIR}") | |
| endif() |
Actually,
CMAKE_SHARED_LIBRARY_SUFFIX is equal to .dll and not to .dll.a.This is the reason because the wrong name is assigned to the symlink.
The right variable to use here should be
CMAKE_IMPORT_LIBRARY_SUFFIX.Technically, it should be a very easy fix, at least in theory.
However, since there is this
if() statement:Line 817 in 0f07f70
| if(NOT WIN32 OR CYGWIN OR MINGW) |
it is possible that this code is also executed for something different that
CYGWIN and MINGW because the NOT WIN32 condition.So, I'm not sure how to fix it because I don't understand what you wanted to do exactly.
If you could give me some advices, I will test it and I can contribute a PR with the fix if you want.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels