2011-06-30 14:47:57 +00:00
|
|
|
|
2011-04-27 11:58:34 +00:00
|
|
|
###########################################################################
|
|
|
|
# GLUT
|
|
|
|
|
2011-08-16 16:15:34 +00:00
|
|
|
if(WITH_CYCLES_TEST)
|
|
|
|
set(GLUT_ROOT_PATH ${CYCLES_GLUT})
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-16 16:15:34 +00:00
|
|
|
find_package(GLUT)
|
|
|
|
message(STATUS "GLUT_FOUND=${GLUT_FOUND}")
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-16 16:15:34 +00:00
|
|
|
include_directories(${GLUT_INCLUDE_DIR})
|
|
|
|
endif()
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2012-06-23 13:42:14 +00:00
|
|
|
if(WITH_SYSTEM_GLEW)
|
2011-08-16 16:15:34 +00:00
|
|
|
set(CYCLES_GLEW_LIBRARY ${GLEW_LIBRARY})
|
2012-06-23 13:42:14 +00:00
|
|
|
else()
|
|
|
|
set(CYCLES_GLEW_LIBRARY extern_glew)
|
2011-08-16 16:15:34 +00:00
|
|
|
endif()
|
2011-05-27 12:13:10 +00:00
|
|
|
|
2011-04-27 11:58:34 +00:00
|
|
|
###########################################################################
|
|
|
|
# OpenShadingLanguage
|
|
|
|
|
2011-08-16 16:15:34 +00:00
|
|
|
if(WITH_CYCLES_OSL)
|
|
|
|
|
|
|
|
set(CYCLES_OSL "" CACHE PATH "Path to OpenShadingLanguage installation")
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-16 16:15:34 +00:00
|
|
|
message(STATUS "CYCLES_OSL = ${CYCLES_OSL}")
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-16 16:15:34 +00:00
|
|
|
find_library(OSL_LIBRARIES NAMES oslexec oslcomp oslquery PATHS ${CYCLES_OSL}/lib ${CYCLES_OSL}/dist)
|
|
|
|
find_path(OSL_INCLUDES OSL/oslclosure.h PATHS ${CYCLES_OSL}/include ${CYCLES_OSL}/dist)
|
|
|
|
find_program(OSL_COMPILER NAMES oslc PATHS ${CYCLES_OSL}/bin ${CYCLES_OSL}/dist)
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-16 16:15:34 +00:00
|
|
|
if(OSL_INCLUDES AND OSL_LIBRARIES AND OSL_COMPILER)
|
|
|
|
set(OSL_FOUND TRUE)
|
|
|
|
message(STATUS "OSL includes = ${OSL_INCLUDES}")
|
|
|
|
message(STATUS "OSL library = ${OSL_LIBRARIES}")
|
|
|
|
message(STATUS "OSL compiler = ${OSL_COMPILER}")
|
|
|
|
else()
|
|
|
|
message(STATUS "OSL not found")
|
|
|
|
endif()
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-16 16:15:34 +00:00
|
|
|
include_directories(${OSL_INCLUDES} ${OSL_INCLUDES}/OSL ${OSL_INCLUDES}/../../../src/liboslexec)
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-16 16:15:34 +00:00
|
|
|
endif()
|
2011-04-27 11:58:34 +00:00
|
|
|
|
|
|
|
###########################################################################
|
|
|
|
# Partio
|
|
|
|
|
2011-08-16 16:15:34 +00:00
|
|
|
if(WITH_CYCLES_PARTIO)
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-16 16:15:34 +00:00
|
|
|
set(CYCLES_PARTIO "" CACHE PATH "Path to Partio installation")
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-16 16:15:34 +00:00
|
|
|
message(STATUS "CYCLES_PARTIO = ${CYCLES_PARTIO}")
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-16 16:15:34 +00:00
|
|
|
find_library(PARTIO_LIBRARIES NAMES partio PATHS ${CYCLES_PARTIO}/lib)
|
|
|
|
find_path(PARTIO_INCLUDES Partio.h ${CYCLES_PARTIO}/include)
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-16 16:15:34 +00:00
|
|
|
find_package(ZLIB)
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-16 16:15:34 +00:00
|
|
|
if(PARTIO_INCLUDES AND PARTIO_LIBRARIES AND ZLIB_LIBRARIES)
|
|
|
|
list(APPEND PARTIO_LIBRARIES ${ZLIB_LIBRARIES})
|
|
|
|
set(PARTIO_FOUND TRUE)
|
|
|
|
message(STATUS "PARTIO includes = ${PARTIO_INCLUDES}")
|
|
|
|
message(STATUS "PARTIO library = ${PARTIO_LIBRARIES}")
|
|
|
|
else()
|
|
|
|
message(STATUS "PARTIO not found")
|
|
|
|
endif()
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-16 16:15:34 +00:00
|
|
|
include_directories(${PARTIO_INCLUDES})
|
|
|
|
|
|
|
|
endif()
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-11-10 12:52:17 +00:00
|
|
|
###########################################################################
|
|
|
|
# CUDA
|
|
|
|
|
|
|
|
if(WITH_CYCLES_CUDA_BINARIES)
|
|
|
|
find_package(CUDA) # Try to auto locate CUDA toolkit
|
|
|
|
if(CUDA_FOUND)
|
|
|
|
message(STATUS "CUDA nvcc = ${CUDA_NVCC_EXECUTABLE}")
|
|
|
|
else()
|
|
|
|
message(STATUS "CUDA compiler not found, disabling WITH_CYCLES_CUDA_BINARIES")
|
|
|
|
set(WITH_CYCLES_CUDA_BINARIES OFF)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|