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

Build the functional part as a shared library #3

Merged
merged 4 commits into from
May 1, 2012

Conversation

massix
Copy link

@massix massix commented Apr 29, 2012

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.

In this way it's possible to develop independent clients, sharing
the same "functional" part.
@match065
Copy link
Member

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?

@massix
Copy link
Author

massix commented Apr 29, 2012

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 :)

@match065
Copy link
Member

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!!

@massix
Copy link
Author

massix commented May 1, 2012

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}

pearl :: Developer/grive/build » make install [ 66%] Built target fgrive [ 73%] Built target grive [100%] Built target unittest Install the project... -- Install configuration: "" -- Installing: /usr/local/lib/libfgrive.0.0.1.dylib -- Up-to-date: /usr/local/lib/libfgrive.0.dylib -- Up-to-date: /usr/local/lib/libfgrive.dylib -- Installing: /usr/local/bin/grive -- Up-to-date: /usr/local/include/grive/drive/Collection.hh -- Up-to-date: /usr/local/include/grive/drive/Drive.hh -- Up-to-date: /usr/local/include/grive/protocol/Download.hh -- Up-to-date: /usr/local/include/grive/protocol/HTTP.hh -- Up-to-date: /usr/local/include/grive/protocol/Json.hh -- Up-to-date: /usr/local/include/grive/protocol/OAuth2.hh -- Up-to-date: /usr/local/include/grive/util/Crypt.hh -- Up-to-date: /usr/local/include/grive/util/DateTime.hh -- Up-to-date: /usr/local/include/grive/util/Function.hh -- Up-to-date: /usr/local/include/grive/util/OS.hh

Whops, I've forgot to remove this, probably because of the merge.
match065 added a commit that referenced this pull request May 1, 2012
Build the functional part as a shared library
@match065 match065 merged commit 3252134 into Grive:master May 1, 2012
@match065
Copy link
Member

match065 commented May 1, 2012

I prefer the name grivelib. Is this OK with you?

@massix
Copy link
Author

massix commented May 1, 2012

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

@match065
Copy link
Member

match065 commented May 1, 2012

This is our project. I am keeping libfgrive then.

@massix
Copy link
Author

massix commented May 1, 2012

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 ;-)

@sgbeal
Copy link

sgbeal commented May 1, 2012

FWIW, i rather like the name grive/libgrive.

@match065
Copy link
Member

match065 commented May 1, 2012

Me too. Can you get it work in cmake?

@massix
Copy link
Author

massix commented May 1, 2012

I'm working on it actually.. I've probably found a workaround..

@match065
Copy link
Member

match065 commented May 1, 2012

Thanks massix! Look forward to your pull request.

@indian4646 indian4646 mentioned this pull request Aug 22, 2012
@ramsiw ramsiw mentioned this pull request May 16, 2013
@oportsac oportsac mentioned this pull request Oct 17, 2013
@elbaulp elbaulp mentioned this pull request Oct 21, 2013
@farleylai farleylai mentioned this pull request Dec 12, 2013
@splineGear splineGear mentioned this pull request May 14, 2014
@ghost ghost mentioned this pull request Dec 2, 2014
@cabanero cabanero mentioned this pull request Jul 29, 2015
@yumin9822 yumin9822 mentioned this pull request Sep 17, 2015
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

Successfully merging this pull request may close these issues.

None yet

3 participants