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

Adding install target to cmake #65

Closed
Maigo opened this issue Oct 17, 2016 · 4 comments
Closed

Adding install target to cmake #65

Maigo opened this issue Oct 17, 2016 · 4 comments

Comments

@Maigo
Copy link

Maigo commented Oct 17, 2016

Would it be possible to add install targets to the cmake build? I did a quick try to include this library as an external project dependency in a local project, but as glad does not build as a standard library with install (instead using parent scope sets, which does not work for external projects), I've currently hit somewhat of a wall.

could be solved (?) by something as simple as:

install(TARGETS glad ARCHIVE DESTINATION lib)
install(FILES ${GLAD_HEADERS} DESTINATION include)

assuming the header(s) could be accessed separately from the source(s).

@Maigo Maigo changed the title adding install target to cmake Adding install target to cmake Oct 17, 2016
@Dav1dde
Copy link
Owner

Dav1dde commented Oct 17, 2016

I am all open for improvements, unfortunately I am not really firm with cmake. If you want to make a PR I will happily accept it, just make sure to include in the description how I can test it.

@Maigo
Copy link
Author

Maigo commented Oct 18, 2016

That makes two of us :) but I'll give it a go when I have some time over. Thanks.

@p-groarke
Copy link

p-groarke commented Jul 17, 2017

This works, you just need to define GLAD_INSTALL=On

ExternalProject_Add(glad_ext
	GIT_REPOSITORY https://github.com/Dav1dde/glad.git
	GIT_TAG v0.1.14a0
	CMAKE_ARGS ${CMAKE_ARGS}
		-DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}
		-DCMAKE_PREFIX_PATH=${CMAKE_CURRENT_BINARY_DIR}
		-DGLAD_PROFILE="core"
		-DGLAD_API="gl=4.1"
		-DGLAD_INSTALL=On
)

@Maigo
Copy link
Author

Maigo commented Jul 21, 2017

Closing this issue as it has been resolved, as noted above. :)

@Maigo Maigo closed this as completed Jul 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants