-
Notifications
You must be signed in to change notification settings - Fork 136
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
Allow static and shared builds #78
Comments
If we're not going to do this, then I recommend we either add |
Allowing an easy way to compile dynamic or static library versions is a good idea. I don't program on Windows (and only occasionally work with cmake), so if you can provide a pull request (best) or demo code here, that functionality should be added. The library is so small I have not bothered using it as a dynamic library so for. |
Done!
Indeed… since commenting, I decided it would be better not to dynamically link it into my own project, after all. 😄 Thanks for this library! |
Will a shared library also be supported?
If you remove the
STATIC
argument fromadd_library()
inCMakeLists.txt
then the user can decide to build either a static or shared library bu supplyingcmake
parameter-DBUILD_SHARED_LIBS:BOOL=OFF
or-DBUILD_SHARED_LIBS:BOOL=ON
respectively.Note that to support building a shared library (DLL) on Windows you will need to add the necessary
__declspec(dllexport)
and__declspec(dllimport)
stuff for exported classes.The text was updated successfully, but these errors were encountered: