Jump to content
  • Advertisement
Sign in to follow this  
Ichi

cmake & glew on linux & windows

This topic is 1150 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all

 

I am working on a project which depends on GLEW and I want GLEW to be installed automatically if needed.

 

I wanna do following (its very simple but everything i try doesnt result in what i want):

GLEW src is located in {CMAKE_SOURCE_DIR}/external/glew

if GLEW is not yet installed to your system -> build glew into ${CMAKE_BINARY_DIR}/external/glew and install it to your system

 

How do I check if glew is already installed to your system?

How do I get this working the same way on both linux and windows?

 

I don't want glew to be part of my project. I dont want to call its install target if i call mine.

It should build and install and then i wanna use that installed files.

 

Thanks smile.png

Edited by Ichi

Share this post


Link to post
Share on other sites
Advertisement


I don't want glew to be part of my project... I want GLEW to be installed automatically if needed.

 

You are right that you shouldn't make it part of your own project.  GLEW has some confusing ownership issues, with portions released under four different licenses and sparse documentation about which is which. Some are BSD-like, some are MIT-like.  Critically, some are GNU GPL, so if any of that stuff gets incorporated you are automatically pulled into that license if you aren't already.  Be VERY careful about pulling in other products.

 
 

As for automatic installs, that's not how it is normally done for source code releases.

 

It is a bad idea to auto-install software on any machine you don't own, especially a development machine. The other people may not agree to the license, they may have other editions on their machine and you're introducing conflicts, they may have other software configurations on their machine that you are ruining.  Don't do it.

 

Typically you provide a link in your build system to the module, as you seemingly did with ${CMAKE_BINARY_DIR}.  Document that CMAKE_BINARY_DIR must be configured to point to somewhere, and you tell them the web page for GLEW so they can download it themselves.

 

Within your own group you may want to have scripts that install a previously-downloaded release GLEW, likely running their installer with the correct options or just copying directories from a network location you have configured.  Otherwise, within your group you download and install it yourself.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!