CMake scripts for building OpenSceneGraph third party libraries.

Overview

osg-3rdparty-cmake

CMake scripts for building OpenSceneGraph third party libraries.

These scripts can be used to build third party libraries from source using CMake(http://www.cmake.org/).

The source code for respective library has to be downloaded separately, see download locations below.

By building the INSTALL target for both debug and release these scripts will create a folder named 3rdParty. Inside this folder there will folders created to represent each platform toolset.

Status: Build status

Prebuilt versions

Prebuilt version can be found under Releases. Version numbers if the included dependencies can be found in the versions.md file.

Toolset Prebuilt archive
Visual Studio 2017 32-bit v141-x86.zip
Visual Studio 2017 64-bit v141-x64.zip
Visual Studio 2019 32-bit v142-x86.zip
Visual Studio 2019 64-bit v142-x64.zip

License

Each of the dependencies keep their original licenses since their scripts are to be considered derivative works.

The top level script is licensed according to the Unlicense:

http://unlicense.org/

Instructions

  1. Download the CMake scripts from this repository.
  2. Download the source for the dependencies you would like to use from their respective location as specified below.
  3. Start the CMake GUI and select the directory with the CMake 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. Inside this folder there should be all your headers and libraries.

zlib

Sources for zlib can be downloaded from:

http://www.zlib.net/

libpng

Sources for libpng can be downloaded from:

http://www.libpng.org/pub/png/libpng.html

libjpeg

Sources for libjpeg can be downloaded from:

http://www.ijg.org/

libtiff

Sources for libtiff can be downloaded from:

https://gitlab.com/libtiff/libtiff

FreeType

Sources for FreeType can be downloaded from:

http://www.freetype.org/

GLUT

Sources for GLUT can be downloaded from:

https://github.com/markkilgard/glut

GIFLIB

Sources for GIFLIB can be downloaded from:

http://sourceforge.net/projects/giflib/

cURL

Sources for cURL can be downloaded from:

http://curl.haxx.se/

Comments
  • Need for new way to store AppVeyor builds

    Need for new way to store AppVeyor builds

    AppVeyors new retention policy will start on June 7, 2018. This means that built artifacts will be removed from their repository after 6 months.

    This will either force us to rebuild at least every 6 months to keep the pre-built download links valid. The alternative is to find some other storing solution for the built artifacts.

    enhancement wontfix 
    opened by bjornblissing 5
  • Having a weird issue

    Having a weird issue

    I am trying to build for VS 2015. I followed the readme , but when I hit configure I get all sorts of errors.

    CMake Warning (dev) at freetype/CMakeLists.txt:200 (ADD_LIBRARY): Syntax error in cmake code when parsing string

    D:\VAOne2017\OSG\freetype-2.3.9/include/ft2build.h
    

    Invalid escape sequence \V

    Policy CMP0010 is not set: Bad variable reference syntax is an error. Run "cmake --help-policy CMP0010" for policy details. Use the cmake_policy command to set the policy and suppress this warning. This warning is for project developers. Use -Wno-dev to suppress it.

    opened by loopless 5
  • Freetype / LibTiff fixes and libCurl addition

    Freetype / LibTiff fixes and libCurl addition

    Wanted to get your opinion on these fixes. This is with VS2015. Freetype sources are 2.6.3, seems some include files move around so the regexp to fix the headers is no longer necessary. Code could be simplified considerably based on this, but I did a quick hack to see if it was really un-neeed now, and it seems the answer is yes.

    My work-in-progress libCurl library is included, it's not had much testing yet.

    opened by zakalawe 3
  • Appveyor binaries expired

    Appveyor binaries expired

    Hello @bjornblissing,

    thanks for your work here. I wonder if you can trigger an update, since the appveyor binaries expire every six months.

    Thanks, Claudio

    question 
    opened by CBenghi 2
  • Undefined label names in ZLIB when built with ZLIB_USE_AMD64

    Undefined label names in ZLIB when built with ZLIB_USE_AMD64

    When building ZLIB with ZLIB_USE_AMD64 being enabled, ZLIB build is unsuccessful due to undefined label names.

    I have temporarily solved the issue by doing the following:

    ELSEIF(ZLIB_USE_AMD64)
        ... // same as existing
        // adds the following lines
        LIST(APPEND ZLIB_SRCS
            ${ZLIB_SOURCE_DIR}/contrib/masmx64/inffas8664.c)
    ENDIF()
    

    Many thanks for your effort in this repository.

    bug 
    opened by aarnchng 2
  • zlib cmake error

    zlib cmake error

    (1) CMake Warning (dev) at CMakeLists.txt:44 (set): implicitly converting 'Force change of path' to 'STRING' type. This warning is for project developers. Use -Wno-dev to suppress it. (2)

    …… Looking for unistd.h - not found CMake Error at zlib/CMakeLists.txt:169 (add_library): Syntax error in cmake code when parsing string

    C:\3rdparty\zlib/adler32.c
    

    Invalid character escape '\3'.

    CMake Error at zlib/CMakeLists.txt:169 (add_library): Syntax error in cmake code when parsing string

    C:\3rdparty\zlib/compress.c
    

    Invalid character escape '\3'.

    CMake Error at zlib/CMakeLists.txt:169 (add_library): Syntax error in cmake code when parsing string

    C:\3rdparty\zlib/crc32.c
    

    Invalid character escape '\3'.

    CMake Error at zlib/CMakeLists.txt:169 (add_library): Syntax error in cmake code when parsing string

    C:\3rdparty\zlib/deflate.c
    

    Invalid character escape '\3'.

    CMake Error at zlib/CMakeLists.txt:169 (add_library): Syntax error in cmake code when parsing string

    C:\3rdparty\zlib/gzclose.c
    

    Invalid character escape '\3'.

    CMake Error at zlib/CMakeLists.txt:169 (add_library): Syntax error in cmake code when parsing string

    C:\3rdparty\zlib/gzlib.c
    

    Invalid character escape '\3'.

    CMake Error at zlib/CMakeLists.txt:169 (add_library): Syntax error in cmake code when parsing string

    C:\3rdparty\zlib/gzread.c
    

    Invalid character escape '\3'.

    CMake Error at zlib/CMakeLists.txt:169 (add_library): Syntax error in cmake code when parsing string

    C:\3rdparty\zlib/gzwrite.c
    

    Invalid character escape '\3'.

    CMake Error at zlib/CMakeLists.txt:169 (add_library): Syntax error in cmake code when parsing string

    C:\3rdparty\zlib/inflate.c
    

    Invalid character escape '\3'.

    CMake Error at zlib/CMakeLists.txt:169 (add_library): Syntax error in cmake code when parsing string

    C:\3rdparty\zlib/infback.c
    

    Invalid character escape '\3'.

    CMake Error at zlib/CMakeLists.txt:169 (add_library): Syntax error in cmake code when parsing string

    C:\3rdparty\zlib/inftrees.c
    

    Invalid character escape '\3'.

    CMake Error at zlib/CMakeLists.txt:169 (add_library): Syntax error in cmake code when parsing string

    C:\3rdparty\zlib/inffast.c
    

    Invalid character escape '\3'.

    CMake Error at zlib/CMakeLists.txt:169 (add_library): Syntax error in cmake code when parsing string

    C:\3rdparty\zlib/trees.c
    

    Invalid character escape '\3'.

    CMake Error at zlib/CMakeLists.txt:169 (add_library): Syntax error in cmake code when parsing string

    C:\3rdparty\zlib/uncompr.c
    

    Invalid character escape '\3'.

    CMake Error at zlib/CMakeLists.txt:169 (add_library): Syntax error in cmake code when parsing string

    C:\3rdparty\zlib/zutil.c
    

    Invalid character escape '\3'.

    CMake Error at zlib/CMakeLists.txt:169 (add_library): Syntax error in cmake code when parsing string

    C:\3rdparty\zlib/win32/zlib1.rc
    

    Invalid character escape '\3'.

    CMake Error at zlib/CMakeLists.txt:169 (add_library): Syntax error in cmake code when parsing string

    C:\3rdparty\zlib/crc32.h
    

    Invalid character escape '\3'.

    CMake Error at zlib/CMakeLists.txt:169 (add_library): Syntax error in cmake code when parsing string

    C:\3rdparty\zlib/deflate.h
    

    Invalid character escape '\3'.

    CMake Error at zlib/CMakeLists.txt:169 (add_library): Syntax error in cmake code when parsing string

    C:\3rdparty\zlib/gzguts.h
    

    Invalid character escape '\3'.

    CMake Error at zlib/CMakeLists.txt:169 (add_library): Syntax error in cmake code when parsing string

    C:\3rdparty\zlib/inffast.h
    

    Invalid character escape '\3'.

    CMake Error at zlib/CMakeLists.txt:169 (add_library): Syntax error in cmake code when parsing string

    C:\3rdparty\zlib/inffixed.h
    

    Invalid character escape '\3'.

    CMake Error at zlib/CMakeLists.txt:169 (add_library): Syntax error in cmake code when parsing string

    C:\3rdparty\zlib/inflate.h
    

    Invalid character escape '\3'.

    CMake Error at zlib/CMakeLists.txt:169 (add_library): Syntax error in cmake code when parsing string

    C:\3rdparty\zlib/inftrees.h
    

    Invalid character escape '\3'.

    CMake Error at zlib/CMakeLists.txt:169 (add_library): Syntax error in cmake code when parsing string

    C:\3rdparty\zlib/trees.h
    

    Invalid character escape '\3'.

    CMake Error at zlib/CMakeLists.txt:169 (add_library): Syntax error in cmake code when parsing string

    C:\3rdparty\zlib/zutil.h
    

    Invalid character escape '\3'.

    Configuring incomplete, errors occurred! See also "D:/OSG/osg-3rdparty-cmake/build/CMakeFiles/CMakeOutput.log". See also "D:/OSG/osg-3rdparty-cmake/build/CMakeFiles/CMakeError.log".

    question 
    opened by mercury20160104 1
  • Missing some .c files in giflib CMake

    Missing some .c files in giflib CMake

    Missing some .c files in giflib CMake. When compiling and linking Plugin gif. It will report some unresolved symbols.

    I think the CMakeFiles should be ...................................................... ...................................................... ...................................................... ...................................................... FILE(GLOB GIFLIB_SRCS ${GIFLIB_SOURCE_DIR}/lib/*.c ) ...................................................... ...................................................... ...................................................... ......................................................

    bug 
    opened by henrya2 1
  • giflib library name should be giflib not libgif

    giflib library name should be giflib not libgif

    giflib library name should be giflib not libgif.

    OpenScenGraph 3.4.0's CMakeModule will not search for libgif. " FIND_DEPENDENCY(GIFLIB gif_lib.h "ungif;libungif;giflib" ${OSG_3RDPARTY_BIN} "D" "")" It only searches 'ungif;libungif;giflib'. Project name is correct but target lib is not right. It should be """ PROJECT(giflib C)

    SET(TARGET_LIB giflib)

    enhancement 
    opened by henrya2 1
  • libCurl support

    libCurl support

    Hoping to use this code for FlightGear, where we need libCurl (not for OSG actually, but OSg can use it, so I figured I would mention it). I note there is a pending ticket for OpenSSL support, which presumably would be complement Curl support nicely.

    Happy to look at this myself of course.

    duplicate 
    opened by zakalawe 1
  • LIBJPEG linker errors

    LIBJPEG linker errors

    Get linker errors when compiling against OpenSceneGraph:

    jpegd.lib(jcmaster.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order
    jpegd.lib(jdmarker.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order
    jpegd.lib(jcapimin.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order
    jpegd.lib(jdinput.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order
    jpegd.lib(jdhuff.obj) : error LNK2019: unresolved external symbol _jpeg_natural_order referenced in function _decode_mcu_sub
    jpegd.lib(jdmarker.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order7
    jpegd.lib(jdinput.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order7
    jpegd.lib(jcmaster.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order7
    jpegd.lib(jdmarker.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order6
    jpegd.lib(jdinput.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order6
    jpegd.lib(jcmaster.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order6
    jpegd.lib(jdmarker.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order5
    jpegd.lib(jdinput.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order5
    jpegd.lib(jcmaster.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order5
    jpegd.lib(jdmarker.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order4
    jpegd.lib(jdinput.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order4
    jpegd.lib(jcmaster.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order4
    jpegd.lib(jdmarker.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order3
    jpegd.lib(jdinput.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order3
    jpegd.lib(jcmaster.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order3
    jpegd.lib(jdmarker.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order2
    jpegd.lib(jdinput.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order2
    jpegd.lib(jcmaster.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order2
    jpegd.lib(jdinput.obj) : error LNK2019: unresolved external symbol _jdiv_round_up referenced in function _jpeg_core_output_dimensions
    jpegd.lib(jdmaster.obj) : error LNK2001: unresolved external symbol _jdiv_round_up
    jpegd.lib(jcmaster.obj) : error LNK2001: unresolved external symbol _jdiv_round_up
    jpegd.lib(jdcoefct.obj) : error LNK2019: unresolved external symbol _jround_up referenced in function _jinit_d_coef_controller
    jpegd.lib(jdpostct.obj) : error LNK2001: unresolved external symbol _jround_up
    jpegd.lib(jdsample.obj) : error LNK2001: unresolved external symbol _jround_up
    jpegd.lib(jccoefct.obj) : error LNK2001: unresolved external symbol _jround_up
    jpegd.lib(jdcoefct.obj) : error LNK2019: unresolved external symbol _jcopy_block_row referenced in function _decompress_smooth_data
    jpegd.lib(jcsample.obj) : error LNK2001: unresolved external symbol _jcopy_sample_rows
    jpegd.lib(jdsample.obj) : error LNK2019: unresolved external symbol _jcopy_sample_rows referenced in function _int_upsample
    jpegd.lib(jdcolor.obj) : error LNK2001: unresolved external symbol _jcopy_sample_rows
    jpegd.lib(jdmerge.obj) : error LNK2001: unresolved external symbol _jcopy_sample_rows
    jpegd.lib(jcprepct.obj) : error LNK2001: unresolved external symbol _jcopy_sample_rows
    D:\build_osgtemp\bin\osgPlugins-3.0.1\osgdb_jpegd.dll : fatal error LNK1120: 11 unresolved externals
    
    bug 
    opened by bjornblissing 1
  • Freetype include errors

    Freetype include errors

    Include errors when compiling against OpenSceneGraph. Check ft2build.h and config/ftheader.h. These should be a bit dirferent since their path to include libraries are wrong in our case.

    bug 
    opened by bjornblissing 1
  • Improved download_dependencies.bat

    Improved download_dependencies.bat

    Hello @bjornblissing,

    I've made a couple of changes to the source download batch file:

    • fixed curl download (old one was not available anymore)
    • download dependencies now configurable with destination folder

    By default retains c:/3rdparty destination, if valid.

    opened by CBenghi 0
  • Where to extract the sources?

    Where to extract the sources?

    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.

    question 
    opened by ensisoft 5
  • Can this repository be used in Ubuntu 14.04?

    Can this repository be used in Ubuntu 14.04?

    Hi, I am trying to install osg for Ubuntu , while the Linux pre packaged dependencies is not accessed from the link. http://www.openscenegraph.org/index.php/download-section/dependencies Is this repository work under Ubuntu? Thank you.

    question 
    opened by hughhugh 1
  • How to open project in VS2015

    How to open project in VS2015

    Sorry for my dump question, where is the .sln file after i build project with CMake. I just saw some files as following photo. And how to open it in VS2015? image

    question 
    opened by huy-lv 3
  • Download sources automatically?

    Download sources automatically?

    This is a question, not an issue really - why not use ExternalProjectAdd to download the sources automatically? (Don't have to use the build / install feature, it can be download only). Either from a zip or from source control with a stable branch name.

    question 
    opened by zakalawe 10
Releases(v1.0)
Owner
Björn Blissing
Björn Blissing
OpenSceneGraph git repository

ABI Tracker Introduction Welcome to the OpenSceneGraph (OSG). For up-to-date information on the project, in-depth details on how to compile and run li

OpenSceneGraph git repository 2.7k Jan 8, 2023
CMake toolchain file and other scripts for the Android NDK

android-cmake CMake is great, and so is Android. This is a collection of CMake scripts that may be useful to the Android NDK community. It is based on

Andrey Kamaev 1.2k Jan 7, 2023
CMake and other scripts to help build process of FlyEM software

The BuildEM System The buildem repo is a modular CMake-based system that leverages CMake's ExternalProject to simplify and automate a complex build pr

null 27 Jun 9, 2022
Extra modules and scripts for CMake.

Extra CMake Modules Introduction The Extra CMake Modules package, or ECM, adds to the modules provided by CMake, including ones used by find_package()

KDE GitHub Mirror 104 Nov 16, 2022
CMake scripts shared among other repositories

cmake-scripts Common CMake tools and wrappers to use in other repositories. scripts.cmake A wrapper file including all other CMake modules: conan.cmak

Mateusz Pusz 9 Jan 17, 2022
A simple CMake utility for building and deploying Qt based applications on Android without QtCreator

Qt Android CMake utility What it is When using Qt for Android development, QMake & QtCreator is the only sane option for compiling and deploying. But

Laurent Gomila 225 Dec 2, 2022
CMake module for building IDL files with MIDL and generating CLR DLL using Tlbimp

FindIDL CMake module for building IDL files with MIDL and generating CLR DLL using Tlbimp. Introduction Requirements Usage find_package() add_idl() ad

Apriorit Inc. 17 Dec 7, 2022
CMake module for building Windows Installer packages with WiX toolset

FindWiX CMake module for building Windows Installer packages with WiX toolset Introduction Requirements Usage find_package() wix_add_project() WiX com

Apriorit Inc. 11 Aug 5, 2022
CMake find module for Intel Threading Building Blocks

FindTBB Module FindTBB is a CMake find package module for Intel® Threading Building Blocks (TBB). Usage The signature of the TBB find module in CMake

Justus Calvin 84 Dec 3, 2022
A set of cmake modules to assist in building code

CMake 3 Tools Warning: These tools are being replaced by the Modern CMake. Some of the tools are still being maintained for now, but new projects shou

null 201 Dec 21, 2022
CMake BASIS makes it easy to create sharable software and libraries that work together

CMake BASIS makes it easy to create sharable software and libraries that work together. This is accomplished by combining and documenting some of the best practices and utilities available. This project supplies a fully integrated suite of functionality to make the whole process seamless!

CMake BASIS 44 Nov 28, 2022
CMake modules for some scientific libraries

A collection of CMake modules, which can mostly be used independently. The utilities for writing robust Find* modules might be useful until CMake take

Jed Brown 83 Dec 4, 2022
📦 CMake's missing package manager. A small CMake script for setup-free, cross-platform, reproducible dependency management.

Setup-free CMake dependency management CPM.cmake is a CMake script that adds dependency management capabilities to CMake. It's built as a thin wrapper

CPM.cmake 1.6k Jan 9, 2023
CMake checks cache helper modules – for fast CI CMake builds!

cmake-checks-cache Cross platform CMake projects do platform introspection by the means of "Check" macros. Have a look at CMake's How To Write Platfor

Cristian Adam 65 Dec 6, 2022
cmake-font-lock - Advanced, type aware, highlight support for CMake

cmake-font-lock - Advanced, type aware, highlight support for CMake

Anders Lindgren 39 Oct 2, 2022
cmake-avr - a cmake toolchain for AVR projects

cmake-avr - a cmake toolchain for AVR projects Testing the example provided The toolchain was created and tested within the following environment: Lin

Matthias Kleemann 163 Dec 5, 2022
Make CMake less painful when trying to write Modern Flexible CMake

Izzy's eXtension Modules IXM is a CMake library for writing Modern flexible CMake. This means: Reducing the amount of CMake written Selecting reasonab

IXM 107 Sep 1, 2022
CMake module to enable code coverage easily and generate coverage reports with CMake targets.

CMake-codecov CMake module to enable code coverage easily and generate coverage reports with CMake targets. Include into your project To use Findcodec

HPC 82 Nov 30, 2022
unmaintained - CMake module to activate certain C++ standard, feature checks and appropriate automated workarounds - basically an improved version of cmake-compile-features

Compatibility This library provides an advanced target_compile_features() and write_compiler_detection_header(). The problem with those is that they a

Jonathan Müller 74 Dec 26, 2022