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

Where to extract the sources? #37

Open
ensisoft opened this issue Aug 9, 2016 · 5 comments
Open

Where to extract the sources? #37

ensisoft opened this issue Aug 9, 2016 · 5 comments
Labels

Comments

@ensisoft
Copy link

ensisoft commented Aug 9, 2016

Right, so umh.. there's absolutely no documentation. Where am I supposed to extract the sources for example libjpeg? I've tried extracting into osg-3rdparty-cmake/libjeg and various other locations and it just doesn't generate anything useful but just "empty" solution. Seems that LIBJPEG_SOURCE_DIR is never set in the top level CMakelist file. Where is that supposed to come from? If i comment out the check for that variable being set then it borks about not being able to find /jconfig.vc.

What a pain.

Thanks.

@bjornblissing
Copy link
Owner

@ensisoft
There is some very sparse documentation in the readme file. But in principle do it like this:

  1. Download the scripts CMake scripts from this repository.
  2. Download the source for the dependencies you would like to use from the locations specified in the readme file.
  3. Start the CMake GUI and select the directory with the scripts as your source directory. Use any desired output directory as binary directory.
  4. Press Configure inside the CMake GUI.
  5. Fill in the location of the downloaded sources of your desired dependencies and press "Configure" again. Repeat until there is no more errors and warnings in CMake.
  6. Press Generate inside the CMake GUI. This will generate solution file inside your binary directory.
  7. Open the solution file in your IDE.
  8. Build the ALL_BUILD project for both debug and release.
  9. Build the INSTALL project for both debug and release.

In your binary directory there will now be a folder named 3rdParty with a sub-folder named after your target platform (i.e. v140-x86 for Visual Studio 2015 32-bit). Inside this folder there should be all your headers and libraries.

@ensisoft
Copy link
Author

ensisoft commented Aug 9, 2016

Thanks for the quick reply,

is there an alternative way for those how'd prefer to script this on the command line?

@bjornblissing
Copy link
Owner

CMake can be run from the commandline, although each variable has to be set via the form:
-D <var>:<type>=<value>

For example:
-DZLIB_SOURCE_DIR:PATH=D:/zlib-1.2.8

So all variables you specified in the CMake GUI must be supplied this way.

Building the solution can then be achieved via MSBuild. This is something I never tried myself, but a command line reference to MSBuild can be found here:
https://msdn.microsoft.com/en-us/library/ms164311.aspx

@ensisoft
Copy link
Author

ensisoft commented Aug 9, 2016

Oh, right they come through the -D flags.

Thanks again for quick replies!

@ensisoft
Copy link
Author

Thanks for the replies.

@bjornblissing bjornblissing reopened this Sep 26, 2016
Repository owner locked and limited conversation to collaborators Sep 26, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants