Make PTex support optional

Basically makes configuration log much cleaner on systems
where PTex is not installed.
This commit is contained in:
Sergey Sharybin 2014-05-16 14:27:49 +02:00 committed by Manuel Kraemer
parent 575cb30e54
commit 5cafd6c40e
3 changed files with 14 additions and 8 deletions

View File

@ -278,6 +278,7 @@ option(NO_EXAMPLES "Disable examples build" OFF)
option(NO_REGRESSION "Disable regression tests build" OFF)
option(NO_PYTHON "Disable Python SWIG build" OFF)
option(NO_MAYA "Disable Maya plugin build" OFF)
option(NO_PTEX "Disable PTex support" OFF)
option(NO_DOC "Disable documentation build" OFF)
option(NO_OMP "Disable OpenMP backend" OFF)
option(NO_TBB "Disable TBB backend" OFF)
@ -303,7 +304,9 @@ endif()
if(NOT ANDROID AND NOT IOS)
find_package(GLFW 2.7.0)
endif()
find_package(PTex 2.0)
if(NOT NO_PTEX)
find_package(PTex 2.0)
endif()
find_package(PythonInterp 2.6)
find_package(SWIG 1.3.40)
find_package(Doxygen 1.8.4)
@ -438,13 +441,14 @@ if(PTEX_FOUND)
-DOPENSUBDIV_HAS_PTEX
)
else()
message(WARNING
"Ptex was not found : the OpenSubdiv Ptex example will not be "
"available. If you do have Ptex installed and see this message, "
"please add your Ptex path to FindPTex.cmake in "
"${PROJECT_SOURCE_DIR}/cmake or set it through the PTEX_LOCATION "
"cmake command line argument or environment variable."
)
if(NOT NO_PTEX)
message(WARNING
"Ptex was not found : the OpenSubdiv Ptex example will not be "
"available. If you do have Ptex installed and see this message, "
"please add your Ptex path to FindPTex.cmake in "
"${PROJECT_SOURCE_DIR}/cmake or set it through the PTEX_LOCATION "
"cmake command line argument or environment variable.")
endif()
endif()
if (NOT NO_MAYA)

View File

@ -59,6 +59,7 @@ Optional:
-DNO_REGRESSION=1 // disable regression tests build
-DNO_PYTHON=1 // disable Python SWIG build
-DNO_MAYA=1 // disable Maya plugin build
-DNO_PTEX=1 // disable PTex support
-DNO_DOC=1 // disable documentation build
-DNO_OMP=1 // disable OpenMP
-DNO_CUDA=1 // disable CUDA

View File

@ -119,6 +119,7 @@ The following configuration arguments can be passed to the cmake command line.
-DNO_REGRESSION=1 // disable regression tests build
-DNO_PYTHON=1 // disable Python SWIG build
-DNO_MAYA=1 // disable Maya plugin build
-DNO_PTEX=1 // disable PTex support
-DNO_DOC=1 // disable documentation build
-DNO_OMP=1 // disable OpenMP
-DNO_TBB=1 // disable TBB