Skip to content

Commit

Permalink
Merge pull request #42 from andrewkaufman/buildImprovements
Browse files Browse the repository at this point in the history
Build improvements
  • Loading branch information
andrewkaufman authored Jan 7, 2020
2 parents 15fc54a + 1f3e222 commit 78ce226
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
11 changes: 6 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ project(AtomsGaffer)
option( USE_GAFFER_DEPENDENCIES "Turn this off you're building against your own dependencies (eg boost, python, tbb, exr, cortex) rather than the versions included with Gaffer" ON )
option( USE_ATOMS_PROCEDURAL "Turn this off you plan to load AtomsGaffer in maya or another environment that requires a full atoms license" ON )

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_VERBOSE_MAKEFILE OFF)
set(CMAKE_VERBOSE_MAKEFILE ON)

if(ATOMS_MAYA_ROOT)
set(ATOMS_INCLUDE_PATH ${ATOMS_MAYA_ROOT}/include)
set(ATOMS_LIB_PATH ${ATOMS_MAYA_ROOT}/lib/2018)
set(ATOMS_LIB_PATH ${ATOMS_MAYA_ROOT}/lib/${MAYA_MAJOR_VERSION})
set(ATOMS_ICONS_PATH ${ATOMS_MAYA_ROOT}/icons)
endif()

Expand Down Expand Up @@ -42,7 +41,8 @@ file( GLOB AtomsGafferSrc src/AtomsGaffer/*.cpp )
link_directories( AtomsGaffer ${GAFFER_ROOT}/lib ${ATOMS_LIB_PATH} )
add_library( AtomsGaffer SHARED ${AtomsGafferSrc} )
target_compile_definitions( AtomsGaffer PRIVATE BOOST_SIGNALS_NO_DEPRECATION_WARNING=1 LINUX=1 )
target_include_directories( AtomsGaffer PRIVATE include ${DEPENDENCY_INCLUDE_PATHS} )
target_include_directories( AtomsGaffer SYSTEM PRIVATE ${DEPENDENCY_INCLUDE_PATHS} )
target_include_directories( AtomsGaffer PRIVATE include )
if(USE_ATOMS_PROCEDURAL)
target_link_libraries( AtomsGaffer Gaffer GafferScene AtomsProcedural )
else()
Expand All @@ -56,7 +56,8 @@ add_library( AtomsGafferModule SHARED ${AtomsGafferModuleSrc} )
set_target_properties( AtomsGafferModule PROPERTIES PREFIX "" OUTPUT_NAME "_AtomsGaffer" )
target_compile_definitions( AtomsGafferModule PRIVATE BOOST_SIGNALS_NO_DEPRECATION_WARNING=1 LINUX=1 )
target_link_libraries( AtomsGafferModule AtomsGaffer )
target_include_directories( AtomsGafferModule PRIVATE include ${DEPENDENCY_INCLUDE_PATHS} ${PYTHON_ROOT}/include/python2.7 )
target_include_directories( AtomsGafferModule SYSTEM PRIVATE ${DEPENDENCY_INCLUDE_PATHS} ${PYTHON_ROOT}/include/python2.7 )
target_include_directories( AtomsGafferModule PRIVATE include )
target_link_libraries( AtomsGafferModule GafferBindings )
install( TARGETS AtomsGafferModule DESTINATION python/AtomsGaffer )

Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ The Tool Chefs have open-sourced their [Atoms Crowd](https://atoms.toolchefs.com

* cmake
* Gaffer Install
* Atoms Install

**In a terminal:**

Expand All @@ -21,8 +22,8 @@ setenv ATOMS_ROOT <atoms install path>
setenv ATOMSGAFFER_INSTALL_PREFIX <your desired install path>
cd atomsGaffer
cmake -DGAFFER_ROOT=$GAFFER_ROOT -D$ATOMS_ROOT -DCMAKE_INSTALL_PREFIX=$ATOMSGAFFER_INSTALL_PREFIX .
make install -j <num cores>
cmake -DGAFFER_ROOT=$GAFFER_ROOT -DATOMS_ROOT=$ATOMS_ROOT -DCMAKE_CXX_FLAGS='-std=c++11' -DCMAKE_INSTALL_PREFIX=$ATOMSGAFFER_INSTALL_PREFIX .
make install -j <num cores>)
```

### Runtime Instructions
Expand Down

0 comments on commit 78ce226

Please sign in to comment.