--- CMakeLists.txt.orig 2018-12-15 16:05:53.000000000 -0700
+++ CMakeLists.txt 2018-12-29 16:20:36.000000000 -0700
"MinSizeRel" "RelWithDebInfo")
-if(NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/src/ext/openexr/OpenEXR")
- message(FATAL_ERROR "The OpenEXR submodule directory is missing! "
- "You probably did not clone the project with --recursive. It is possible to recover "
- "by running \"git submodule update --init --recursive\"")
-if(NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/src/ext/glog/cmake")
- message(FATAL_ERROR "The glog submodule directory is missing! "
- "You probably did not clone the project with --recursive, or you first checked out "
- "pbrt before it was added. It is possible to recover by running "
- "\"git submodule update --init --recursive\"")
-if(NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/src/ext/ptex/src")
- message(FATAL_ERROR "The ptex submodule directory is missing! "
- "You probably did not clone the project with --recursive, or you first checked out "
- "pbrt before it was added. It is possible to recover by running "
- "\"git submodule update --init --recursive\"")
-if(NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/src/ext/zlib/doc")
- message(FATAL_ERROR "The zlib submodule directory is missing! "
- "You probably did not clone the project with --recursive, or you first checked out "
- "pbrt before it was added. It is possible to recover by running "
- "\"git submodule update --init --recursive\"")
+find_package(PkgConfig REQUIRED)
FIND_PACKAGE ( Sanitizers )
IF(CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-conversion-null")
-ELSEIF(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+ELSEIF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-register")
ELSEIF(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
###########################################################################
-SET(ILMBASE_NAMESPACE_VERSIONING OFF CACHE BOOL " " FORCE)
-SET(OPENEXR_NAMESPACE_VERSIONING OFF CACHE BOOL " " FORCE)
-SET(OPENEXR_BUILD_SHARED_LIBS OFF CACHE BOOL " " FORCE)
-SET(ILMBASE_BUILD_SHARED_LIBS OFF CACHE BOOL " " FORCE)
-ADD_SUBDIRECTORY(src/ext/openexr)
-SET_PROPERTY(TARGET IexMath eLut toFloat b44ExpLogTable dwaLookups IlmThread Half Iex Imath IlmImf PROPERTY FOLDER "ext")
+pkg_check_modules(OPENEXR REQUIRED OpenEXR)
- src/ext/openexr/IlmBase/Imath
- src/ext/openexr/IlmBase/Half
- src/ext/openexr/IlmBase/Iex