Skip to content
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

lib prefix on Windows #942

Open
diorcety opened this issue Jul 12, 2017 · 4 comments
Open

lib prefix on Windows #942

diorcety opened this issue Jul 12, 2017 · 4 comments

Comments

@diorcety
Copy link

Is there any convention related to lib prefix for zproject on Windows.

Because by default in cmake for a library target called mlm on Windows the output file is mlm.dll and on linux it's libmlm.so

The issue is that project.libname is always prefixed by lib

project.libname is defined here

project.libname ?= "lib" + project.linkname

project.libname is used in python binding for finding the library

Shouldn't we use something like that?

set_target_properties(mlm PROPERTIES
    OUTPUT_NAME "mlm"
    PREFIX "lib")
@bluca
Copy link
Member

bluca commented Jul 12, 2017

I think one issue is backward compatibility - if the filename changes, there's a good chance all existing projects that use it will break

@jimklimov
Copy link
Member

Well, the breakage mode needs that a project is regenerated. And users should review (git diff) or PR (and web-review) the changes. Also GSL can echo a warning about such change - though it does warn about many things that might bite you (they really can, so notice is not worthless).

Another breakage may be that projects which use your component (say mlm.dll as deliverable) can get broken by your upgrade and might have to rebuild. Or... as a legacy fallback you might add a rule (simple cp or ln equivalent, maybe optional) so you build and deliver both mlm.dll and libmlm.dll. For an ecosystem like our FTY project we can just rebuild all components and no longer deliver legacy filenames. Lower-level projects like mlm might have to serve both in make install and packaging on affected platforms.

Sent from my Xiaomi Redmi Note 4 using FastHub

@bluca
Copy link
Member

bluca commented Jul 12, 2017

Yeah the problem is external reverse dependencies, that do not use zproject. Having a backward compatibility link could work as a solution

@diorcety
Copy link
Author

About prefix I'm not sure but it seems that CMake don't put the prefix with MSVC not with MSYS or MINGW. It seems that nobody try the mlm/czmq python binding with MSVC toolchain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants