-
Notifications
You must be signed in to change notification settings - Fork 630
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
Bug in CMake for building under Windows #739
Comments
Bugfix:
|
Thanks for the analysis, there's a few things to unpack here, so please bear with me :)
|
Yeah, that's what the patch does. OPENEXR_DLL is now only applied to the distributed libraries. Currently OPENEXR_DLL is applied to all projects. It is even listed as a bug in the CMakeFile:
See PR #743
I don't think this kind of configuration with BUILD_SHARED_LIBS, OPENEXR_BUILD_BOTH_STATIC_SHARED and ILMBASE_BUILD_BOTH_STATIC_SHARED is very smart either. It would be better to either always build static and shared libraries or use BUILD_SHARED_LIBS to build static or shared libraries. It's no problem to run CMake twice if needed, once with BUILD_SHARED_LIBS=ON and once with BUILD_SHARED_LIBS=OFF. BUILD_SHARED_LIBS has no effect at all if OPENEXR_BUILD_BOTH_STATIC_SHARED and ILMBASE_BUILD_BOTH_STATIC_SHARED are set, which I noticed later. Therefore I did not have to set BUILD_SHARED_LIBS. It was my first attempt to disable the global problem with OPENEXR_DLL. |
Thanks for breaking it up into two pieces, it makes it a lot easier for me (at least ;) ) to reason about the changes. |
All projects of the static libraries are created with the switch
-DOPENEXR_DLL
However, this switch is only intended for the shared libraries and therefore generates build errors under Windows. Example:Also, creating symbolic links during installation does not work on Windows. Example:
It is useless anyway, because when distributing the DLLs to other systems the links do not work anymore. The links have to be recreated on each system. This must then be integrated into the installation program.
The text was updated successfully, but these errors were encountered: