add a `make install` target #285

Closed
infinity0 opened this Issue Aug 13, 2013 · 8 comments

Comments

Projects
None yet
4 participants
@infinity0

This is a standard feature of Makefiles, and other tools such as the debian build system depend on the existence of this. Cmake has some functionality to make this easier:

http://www.cmake.org/cmake/help/v2.8.8/cmake.html#command%3ainstall

@deanberris

This comment has been minimized.

Show comment
Hide comment
@deanberris

deanberris Aug 14, 2013

Member

Thanks @infinity0 -- this has been one of those things that haven't been prioritized but is sorely needed.

Do you have experience with this? How about you give it a shot and I'll get your PR merged too? :)

Member

deanberris commented Aug 14, 2013

Thanks @infinity0 -- this has been one of those things that haven't been prioritized but is sorely needed.

Do you have experience with this? How about you give it a shot and I'll get your PR merged too? :)

@infinity0

This comment has been minimized.

Show comment
Hide comment
@infinity0

infinity0 Aug 14, 2013

I don't have much experience with this. You might also need to make some project-level designs. For example, typically shared objects are installed to $(libdir), headers are installed to $(includedir), and static archives are not installed. I know of this document http://www.gnu.org/prep/standards/html_node/Directory-Variables.html#Directory-Variables but I don't know how much of it is GNU-specific that you can ignore. But the two vars I just mentioned are definitely not GNU-specific and your install target should honour them.

cpp-netlib currently only builds static archives and not shared objects, but you can just do SET(BUILD_SHARED_LIBS ON) in your cmake file http://www.cmake.org/Wiki/CMake_Useful_Variables#Compilers_and_Tools

I don't have much experience with this. You might also need to make some project-level designs. For example, typically shared objects are installed to $(libdir), headers are installed to $(includedir), and static archives are not installed. I know of this document http://www.gnu.org/prep/standards/html_node/Directory-Variables.html#Directory-Variables but I don't know how much of it is GNU-specific that you can ignore. But the two vars I just mentioned are definitely not GNU-specific and your install target should honour them.

cpp-netlib currently only builds static archives and not shared objects, but you can just do SET(BUILD_SHARED_LIBS ON) in your cmake file http://www.cmake.org/Wiki/CMake_Useful_Variables#Compilers_and_Tools

@JacobHacker

This comment has been minimized.

Show comment
Hide comment
@JacobHacker

JacobHacker Aug 17, 2013

Have you considered using Scons for building? Wesnoth currently uses this, and it makes installing a bit easier.

http://www.scons.org
(Making an installer)
http://www.scons.org/doc/1.2.0/HTML/scons-user/c2848.html

Scons is a modern type build system, written in python it's got good performance and extremely simple to use, as well as being cross-platform (check out the site for the full pitch).

Would you integrate the change if I made it?

Have you considered using Scons for building? Wesnoth currently uses this, and it makes installing a bit easier.

http://www.scons.org
(Making an installer)
http://www.scons.org/doc/1.2.0/HTML/scons-user/c2848.html

Scons is a modern type build system, written in python it's got good performance and extremely simple to use, as well as being cross-platform (check out the site for the full pitch).

Would you integrate the change if I made it?

@deanberris

This comment has been minimized.

Show comment
Hide comment
@deanberris

deanberris Aug 17, 2013

Member

No, sorry. Scons doesn't play well with native build systems which CMake
does do. I rather stick with CMake.

I did look at Scons and it was too complicated and thought was harder to
understand and maintain compared to Boost.Build.
On Aug 17, 2013 6:04 PM, "Jacob Hacker" notifications@github.com wrote:

Have you considered using Scons for building? Wesnoth currently uses this,
and it makes installing a bit easier.

http://www.scons.org
(Making an installer)
http://www.scons.org/doc/1.2.0/HTML/scons-user/c2848.html

Scons is a modern type build system, written in python it's got good
performance and extremely simple to use, as well as being cross-platform
(check out the site for the full pitch).

Would you integrate the change if I made it?


Reply to this email directly or view it on GitHubhttps://github.com/cpp-netlib/cpp-netlib/issues/285#issuecomment-22807608
.

Member

deanberris commented Aug 17, 2013

No, sorry. Scons doesn't play well with native build systems which CMake
does do. I rather stick with CMake.

I did look at Scons and it was too complicated and thought was harder to
understand and maintain compared to Boost.Build.
On Aug 17, 2013 6:04 PM, "Jacob Hacker" notifications@github.com wrote:

Have you considered using Scons for building? Wesnoth currently uses this,
and it makes installing a bit easier.

http://www.scons.org
(Making an installer)
http://www.scons.org/doc/1.2.0/HTML/scons-user/c2848.html

Scons is a modern type build system, written in python it's got good
performance and extremely simple to use, as well as being cross-platform
(check out the site for the full pitch).

Would you integrate the change if I made it?


Reply to this email directly or view it on GitHubhttps://github.com/cpp-netlib/cpp-netlib/issues/285#issuecomment-22807608
.

@JacobHacker

This comment has been minimized.

Show comment
Hide comment
@JacobHacker

JacobHacker Aug 18, 2013

Very well, although I don't understand that it doesn't play well with native build systems, it is a standalone build system isn't it?

I've also found it quite simple to use, of course this will likely depend on the project, it would probably be a bit worse for something larger like cpp-netlib.

Very well, although I don't understand that it doesn't play well with native build systems, it is a standalone build system isn't it?

I've also found it quite simple to use, of course this will likely depend on the project, it would probably be a bit worse for something larger like cpp-netlib.

@deanberris

This comment has been minimized.

Show comment
Hide comment
@deanberris

deanberris Aug 19, 2013

Member

Yes, and that's the problem.

Users of cpp-netlib want to be able to integrate it into their native build
systems instead of running some other build system. CMake generates the
build files once, and you're off using the system's build system during
development.

I'm sure Scons works well for applications but I'm not convinced it's worth
the effort of learning and maintaining for libraries like cpp-netlib. If
you're volunteering to maintain the Scons build indefinitely, I'd be
happier to accept pull requests. Barring that, I'm going to have to stick
with what I (and other maintainers) know and are comfortable with.

Thanks for the offer though.

On Sun, Aug 18, 2013 at 1:20 PM, Jacob Hacker notifications@github.comwrote:

Very well, although I don't understand that it doesn't play well with
native build systems, it is a standalone build system isn't it?


Reply to this email directly or view it on GitHubhttps://github.com/cpp-netlib/cpp-netlib/issues/285#issuecomment-22823934
.

Member

deanberris commented Aug 19, 2013

Yes, and that's the problem.

Users of cpp-netlib want to be able to integrate it into their native build
systems instead of running some other build system. CMake generates the
build files once, and you're off using the system's build system during
development.

I'm sure Scons works well for applications but I'm not convinced it's worth
the effort of learning and maintaining for libraries like cpp-netlib. If
you're volunteering to maintain the Scons build indefinitely, I'd be
happier to accept pull requests. Barring that, I'm going to have to stick
with what I (and other maintainers) know and are comfortable with.

Thanks for the offer though.

On Sun, Aug 18, 2013 at 1:20 PM, Jacob Hacker notifications@github.comwrote:

Very well, although I don't understand that it doesn't play well with
native build systems, it is a standalone build system isn't it?


Reply to this email directly or view it on GitHubhttps://github.com/cpp-netlib/cpp-netlib/issues/285#issuecomment-22823934
.

@infinity0

This comment has been minimized.

Show comment
Hide comment
@infinity0

infinity0 Sep 10, 2013

Hi Dean, this is still incomplete - as mentioned in that pull request, we're not yet installing documentation for example. Shall I open another separate issue or do you want to re-open this one?

Hi Dean, this is still incomplete - as mentioned in that pull request, we're not yet installing documentation for example. Shall I open another separate issue or do you want to re-open this one?

@mikhailberis

This comment has been minimized.

Show comment
Hide comment
@mikhailberis

mikhailberis Sep 10, 2013

Ah, yes. I'd prefer a new issue for the docs and other things. Thanks Ximin.
On Sep 10, 2013 10:27 PM, "Ximin Luo" notifications@github.com wrote:

Hi Dean, this is still incomplete - as mentioned in that pull request,
we're not yet installing documentation for example. Shall I open another
separate issue or do you want to re-open this one?


Reply to this email directly or view it on GitHubhttps://github.com/cpp-netlib/cpp-netlib/issues/285#issuecomment-24155521
.

Ah, yes. I'd prefer a new issue for the docs and other things. Thanks Ximin.
On Sep 10, 2013 10:27 PM, "Ximin Luo" notifications@github.com wrote:

Hi Dean, this is still incomplete - as mentioned in that pull request,
we're not yet installing documentation for example. Shall I open another
separate issue or do you want to re-open this one?


Reply to this email directly or view it on GitHubhttps://github.com/cpp-netlib/cpp-netlib/issues/285#issuecomment-24155521
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment