bjornblissing / osg-3rdparty-cmake

CMake scripts for building OpenSceneGraph third party libraries.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Where to extract the sources?

ensisoft opened this issue · comments

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.

@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.

Thanks for the quick reply,

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

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

Oh, right they come through the -D flags.

Thanks again for quick replies!

Thanks for the replies.