Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
OCIO Static link example
g++ main.cpp -I/net/homedirs/jeremys/git/ocio.js/build/dist/include -ostatictest /net/homedirs/jeremys/git/ocio.js/build/dist/lib/libOpenColorIO.a /net/homedirs/jeremys/git/ocio.js/build/ext/dist/lib/libyaml-cpp.a /net/homedirs/jeremys/git/ocio.js/build/ext/dist/lib/libtinyxml.a
#include <iostream>
#include <OpenColorIO/OpenColorIO.h>
namespace OCIO = OCIO_NAMESPACE;
int main(int argc, const char **argv)
{
OCIO::ConstConfigRcPtr config = OCIO::GetCurrentConfig();
OCIO::ConstColorSpaceRcPtr lin = config->getColorSpace(OCIO::ROLE_SCENE_LINEAR);
std::cerr << lin->getName() << std::endl;
return 0;
}
mkdir -p build && cd build
mkdir -p dist
cmake -D CMAKE_INSTALL_PREFIX=dist -D CMAKE_SKIP_RPATH=YES -D PYTHON=/usr/bin/python2.6 -D OCIO_BUILD_STATIC=YES ../
make install -j8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment