Skip to content
Permalink
Browse files

Tweak docs on C++ building. (#601)

* updated notes on `pip install .` vs `python setup.py install`
  • Loading branch information...
meshula authored and ssteinbach committed Oct 4, 2019
1 parent 44a0c44 commit 9e4c2035b642027da2e691ab150dc87b6e37f418
Showing with 37 additions and 37 deletions.
  1. +5 −36 README.md
  2. +32 −1 docs/tutorials/quickstart.md
@@ -66,48 +66,17 @@ OTIO also supports several other kinds of plugins, for more information see:
* [SchemaDefs](https://opentimelineio.readthedocs.io/en/latest/tutorials/write-a-schemadef.html) - Define OTIO schemas.

Installing / Quick-Start
----------
------------------------

The python-wrapped version of OpenTimelineIO is publicly available via pypy. You can install OpenTimelineIO via:

`pip install opentimelineio`

For more details, including how to run the included viewer program, see: https://opentimelineio.readthedocs.io/en/latest/tutorials/quickstart.html

C++ Installation Instructions
-----------------------------

0. Get the source and deal with submodules:
+ `git clone git@github.com:PixarAnimationStudios/OpenTimelineIO.git`
+ `cd OpenTimelineIO`
+ `git submodule init`
+ `git submodule update`

1. If you want to only build for C++ development (i.e. produce the OTIO C++ libraries and header files), then use cmake:
+ `mkdir build`
+ `cd build`
+ `cmake ..`
(configure PYTHON_EXECUTABLE, PYTHON_LIBRARY, and CMAKE_INSTALL_PREFIX)
+ `make install`

2. If you wish to build only for use with Python, run one of the following two commands:
+ `pip install .`
+ `python setup.py install`

3. However, if you want to build for Python but you also want to install the OTIO C++ headers and libraries, then run one of the following two commands
+ `pip install . --install-option=“--cxx-install-root=/home/someone/cxx-otio-root"`
+ `python setup.py install --cxx-install-root=/home/someone/cxx-otio-root`

To compile a C++ file, add the following -I flags:
+ `c++ -c source.cpp -I/home/someone/cxx-otio-root/include -I/home/someone/cxx-otio-root/include/opentimelineio/deps`

To link, add the following -L/-l flags:
+ `c++ ... -L/home/someone/cxx-otio-root/lib -lopentimelineio`

(If you are using only opentime, not opentimelineio, use -lopentime. Also, you could leave out the second -I flag.)
For detailed installation instructions and notes on how to run the included viewer program, see: https://opentimelineio.readthedocs.io/en/latest/tutorials/quickstart.html


Example Usage
-------
-------------

```
import opentimelineio as otio
@@ -127,7 +96,7 @@ OTIO includes a viewer program as well (see the quickstart section for instructi
![OTIO View Screenshot](docs/_static/otioview.png)

Developing
-------
----------

If you want to contribute to the project, please see: https://opentimelineio.readthedocs.io/en/latest/tutorials/contributing.html

@@ -24,4 +24,35 @@ By default, when you install OTIO you will only get the "Core" adapters, which i
Once you have pip installed OpenTimelineIO, you should be able to run:
otioview path/to/your/file.edl
otioview path/to/your/file.edl
# Developer Quickstart
0. Get the source and submodules:
+ `git clone --recursive git@github.com:PixarAnimationStudios/OpenTimelineIO.git`
1. To build OTIO only for C++ development (i.e. produce the OTIO C++ libraries and header files), then use cmake:
+ `mkdir build`
+ `cd build`
+ `cmake .. {options}`
+ `make install`
For {options} configure the variables PYTHON_EXECUTABLE, PYTHON_LIBRARY, and CMAKE_INSTALL_PREFIX appropriately.
2. To build OTIO only for Python development, run one of the following commands:
+ `pip install .`
+ `python setup.py install`
3. To build OTIO for Python and also install the OTIO C++ headers and libraries, run the following command:
+ `python setup.py install --cxx-install-root=/home/someone/cxx-otio-root`
The first time setup.py is run, cmake scripts will be created, and the headers and libraries will be installed where you specify. If the C++ or Python sources are subsequently modified, running this command again will build and update everything appropriately.
To compile your own C++ file referencing the OTIO headers from your C++ build using gcc or clang, add the following -I flags:
+ `c++ -c source.cpp -I/home/someone/cxx-otio-root/include -I/home/someone/cxx-otio-root/include/opentimelineio/deps`
To link your own program against your OTIO build using gcc or clang, add the following -L/-l flags:
+ `c++ ... -L/home/someone/cxx-otio-root/lib -lopentimelineio`
To use opentime without opentimelineio, link with -lopentime instead, and compile with:
+ `c++ -c source.cpp -I/home/someone/cxx-otio-root/include`

0 comments on commit 9e4c203

Please sign in to comment.
You can’t perform that action at this time.