diff options
Diffstat (limited to 'build_files/cmake/platform')
-rw-r--r-- | build_files/cmake/platform/platform_apple.cmake | 7 | ||||
-rw-r--r-- | build_files/cmake/platform/platform_unix.cmake | 11 | ||||
-rw-r--r-- | build_files/cmake/platform/platform_win32.cmake | 4 |
3 files changed, 21 insertions, 1 deletions
diff --git a/build_files/cmake/platform/platform_apple.cmake b/build_files/cmake/platform/platform_apple.cmake index e7b0097a137..31302bf1100 100644 --- a/build_files/cmake/platform/platform_apple.cmake +++ b/build_files/cmake/platform/platform_apple.cmake @@ -333,6 +333,13 @@ if(WITH_LLVM) if(NOT LLVM_FOUND) message(FATAL_ERROR "LLVM not found.") endif() + if(WITH_CLANG) + find_package(Clang) + if(NOT CLANG_FOUND) + message(FATAL_ERROR "Clang not found.") + endif() + endif() + endif() if(WITH_CYCLES_OSL) diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake index 5d3f074bdda..ef73ef40ac3 100644 --- a/build_files/cmake/platform/platform_unix.cmake +++ b/build_files/cmake/platform/platform_unix.cmake @@ -70,6 +70,7 @@ if(EXISTS ${LIBDIR}) set(BOOST_LIBRARYDIR ${LIBDIR}/boost/lib) set(Boost_NO_SYSTEM_PATHS ON) set(OPENEXR_ROOT_DIR ${LIBDIR}/openexr) + set(CLANG_ROOT_DIR ${LIBDIR}/llvm) endif() if(WITH_STATIC_LIBS) @@ -420,7 +421,9 @@ if(WITH_LLVM) endif() find_package_wrapper(LLVM) - + if(WITH_CLANG) + find_package_wrapper(Clang) + endif() # Symbol conflicts with same UTF library used by OpenCollada if(EXISTS ${LIBDIR}) if(WITH_OPENCOLLADA AND (${LLVM_VERSION} VERSION_LESS "4.0.0")) @@ -430,7 +433,13 @@ if(WITH_LLVM) if(NOT LLVM_FOUND) set(WITH_LLVM OFF) + set(WITH_CLANG OFF) message(STATUS "LLVM not found") + else() + if(NOT CLANG_FOUND) + set(WITH_CLANG OFF) + message(STATUS "Clang not found") + endif() endif() endif() diff --git a/build_files/cmake/platform/platform_win32.cmake b/build_files/cmake/platform/platform_win32.cmake index e739e8ee5a2..e1cc1219249 100644 --- a/build_files/cmake/platform/platform_win32.cmake +++ b/build_files/cmake/platform/platform_win32.cmake @@ -672,6 +672,10 @@ endif() if(WITH_CYCLES_OSL) set(CYCLES_OSL ${LIBDIR}/osl CACHE PATH "Path to OpenShadingLanguage installation") set(OSL_SHADER_DIR ${CYCLES_OSL}/shaders) + # Shaders have moved around a bit between OSL versions, check multiple locations + if(NOT EXISTS "${OSL_SHADER_DIR}") + set(OSL_SHADER_DIR ${CYCLES_OSL}/share/OSL/shaders) + endif() find_library(OSL_LIB_EXEC NAMES oslexec PATHS ${CYCLES_OSL}/lib) find_library(OSL_LIB_COMP NAMES oslcomp PATHS ${CYCLES_OSL}/lib) find_library(OSL_LIB_QUERY NAMES oslquery PATHS ${CYCLES_OSL}/lib) |