Set LIBDIR for remaining cmake-built libraries.#538
Conversation
|
@radarhere it seems you are both testing this with Pillow but getting different experiences. I am not a CMake specialist, I will go with "whatever works". Maybe if one platform needs the flag and another doesn't, we can hide it behind a |
|
Oh, I've tested this PR with Pillow, and from what I've seen, if this makes sense to others then I raise no objections. |
|
I'm not sure we're getting different results - I'm Pillow's built config currently has a hack copying openjpeg binaries from lib64 to lib, which is exactly what this change prevents. AFACT, with this change, the hacks can be removed, because the /lib folder is used consistently in both the library name and the location where the library is output. |
Yep, I agree with this. |
|
Thanks all for the discussion and the work. In it goes. |
#531 removed the
CMAKE_INSTALL_LIBDIRconfiguration from libjpeg-turbo on the basis that it appeared to be redundant.#537 restored that flag, after it became clear that it isn't redundant - on any platform that uses the
lib64convention,CMAKE_INSTALL_LIBDIRis neededIn the discussion on #537, I speculated that it might be advisable to add the same flag to the other cmake libraries. It turns out I was right - if you set
CMAKE_INSTALL_LIB_NAMEand don't setCMAKE_INSTALL_LIBDIR, you end up installing the library intolib64, requiring a manual extra step to move the library to the location that matches the lib name; plus additional complications when the linked library references other libraries in lib64. This became apparent during testing on python-pillow/pillow#8497, because openjpeg libraries weren't lining up without additional post-build steps.This adds the
CMAKE_INSTALL_LIBDIRconfiguration to openjpeg and blosc.