-
Notifications
You must be signed in to change notification settings - Fork 379
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
Build the functional part as a shared library #3
Conversation
In this way it's possible to develop independent clients, sharing the same "functional" part.
I like the idea of using a shared library. It will be useful for the unit test also. But I don't want to call the main executable "grive_cli". I want to keep it as "grive". Can the library and the executable use the same name? |
Hi, as far as I know it's not possible to define two targets with the same name in CMake :( If you want, we can use a different name for the library (libfgrive? Functional Grive..) and then use "grive" for the binary.. it's up to you :) |
OK. That's good. I just merged another change on the cmakefile with a number of improvement. Would you please merge that first? Many thanks!! |
Salut, the last commit should do the trick.. I've renamed the library into "fgrive" and left the binary to "grive". The headers are installed in $(CMAKE_PREFIX_DIR)/include/grive/{drive,protocol,utils}
|
Whops, I've forgot to remove this, probably because of the merge.
Build the functional part as a shared library
I prefer the name grivelib. Is this OK with you? |
It's just a matter of taste, grivelib then becomes libgrivelib (which is quite redundant if you ask me :-P) but since this is your project, just do whatever you think it's better :P |
This is our project. I am keeping libfgrive then. |
Yep, it's probably better.. anyway the name isn't that important, we can change it in the future.. just keep this one until we don't come up with a better idea ;-) |
FWIW, i rather like the name grive/libgrive. |
Me too. Can you get it work in cmake? |
I'm working on it actually.. I've probably found a workaround.. |
Thanks massix! Look forward to your pull request. |
Hello, I'd like to develop a GUI using your code as a solid base. Indeed, the base is so solid that I'd like to use it as a shared library.
As you might see by this pull request, I've converted your CMakeLists file to build the shared library using the three main components (drive, transport and utils) and build the "grive" binary (renamed grive_cli) linking it against the library.
It works like a charm and I thought this might be interesting for you. Feel free to ignore this PR if you're not interested in developing a shared library.