2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-16 16:15:34 +00:00
|
|
|
set(CYCLES_INSTALL_PATH "scripts/addons/cycles")
|
2011-11-08 20:27:37 +00:00
|
|
|
set(WITH_CYCLES_BLENDER ON)
|
2011-08-16 16:15:34 +00:00
|
|
|
|
|
|
|
# External Libraries
|
|
|
|
|
|
|
|
include(cmake/external_libs.cmake)
|
|
|
|
|
|
|
|
# Build Flags
|
|
|
|
|
2011-11-10 14:13:32 +00:00
|
|
|
if(WITH_RAYOPTIMIZATION AND SUPPORT_SSE_BUILD)
|
2011-11-15 15:13:38 +00:00
|
|
|
set(WITH_CYCLES_OPTIMIZED_KERNEL ON)
|
2011-08-16 16:15:34 +00:00
|
|
|
|
2011-11-15 15:13:38 +00:00
|
|
|
if(WIN32 AND MSVC)
|
2011-11-23 16:30:50 +00:00
|
|
|
set(CYCLES_OPTIMIZED_KERNEL_FLAGS "/arch:SSE2 -D_CRT_SECURE_NO_WARNINGS /fp:fast")
|
2011-09-04 15:39:09 +00:00
|
|
|
elseif(CMAKE_COMPILER_IS_GNUCC)
|
2011-11-23 16:30:50 +00:00
|
|
|
set(CYCLES_OPTIMIZED_KERNEL_FLAGS "-ffast-math -msse -msse2 -msse3")
|
2011-09-04 15:39:09 +00:00
|
|
|
endif()
|
2011-11-08 20:27:37 +00:00
|
|
|
endif()
|
2011-04-28 13:47:27 +00:00
|
|
|
|
2011-11-15 15:13:38 +00:00
|
|
|
# for OSL, not needed yet
|
|
|
|
# set(RTTI_DISABLE_FLAGS "-fno-rtti -DBOOST_NO_RTTI -DBOOST_NO_TYPEID")
|
|
|
|
# set(RTTI_DISABLE_FLAGS "/GR- -DBOOST_NO_RTTI -DBOOST_NO_TYPEID")
|
2011-11-10 14:32:16 +00:00
|
|
|
|
2011-08-16 16:15:34 +00:00
|
|
|
# Definitions and Includes
|
|
|
|
|
|
|
|
add_definitions(${BOOST_DEFINITIONS} ${OPENIMAGEIO_DEFINITIONS})
|
|
|
|
|
|
|
|
add_definitions(-DCCL_NAMESPACE_BEGIN=namespace\ ccl\ {)
|
|
|
|
add_definitions(-DCCL_NAMESPACE_END=})
|
|
|
|
|
2011-11-15 15:13:38 +00:00
|
|
|
if(WITH_CYCLES_OPTIMIZED_KERNEL)
|
|
|
|
add_definitions(-DWITH_OPTIMIZED_KERNEL)
|
|
|
|
endif()
|
|
|
|
|
2011-08-16 16:15:34 +00:00
|
|
|
if(WITH_CYCLES_NETWORK)
|
|
|
|
add_definitions(-DWITH_NETWORK)
|
2011-04-28 13:47:27 +00:00
|
|
|
endif()
|
|
|
|
|
2011-08-16 16:15:34 +00:00
|
|
|
if(WITH_CYCLES_OSL)
|
|
|
|
add_definitions(-DWITH_OSL)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(WITH_CYCLES_PARTIO)
|
|
|
|
add_definitions(-DWITH_PARTIO)
|
|
|
|
endif()
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-11-10 12:52:17 +00:00
|
|
|
if(WITH_CYCLES_CUDA_BINARIES)
|
|
|
|
add_definitions(-DWITH_CUDA_BINARIES)
|
|
|
|
endif()
|
|
|
|
|
2011-09-02 14:55:06 +00:00
|
|
|
add_definitions(-DWITH_OPENCL)
|
2011-09-09 12:04:39 +00:00
|
|
|
add_definitions(-DWITH_CUDA)
|
2011-09-12 13:13:56 +00:00
|
|
|
add_definitions(-DWITH_MULTI)
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-16 16:15:34 +00:00
|
|
|
include_directories(
|
|
|
|
${BOOST_INCLUDE_DIR}
|
2011-09-18 04:55:22 +00:00
|
|
|
${OPENIMAGEIO_INCLUDE_DIRS}
|
|
|
|
${OPENIMAGEIO_INCLUDE_DIRS}/OpenImageIO)
|
2011-04-27 11:58:34 +00:00
|
|
|
|
|
|
|
# Subdirectories
|
|
|
|
|
2011-08-16 16:15:34 +00:00
|
|
|
if(WITH_CYCLES_BLENDER)
|
2011-11-18 15:39:40 +00:00
|
|
|
add_definitions(-DBLENDER_PLUGIN)
|
2011-11-18 21:06:36 +00:00
|
|
|
add_subdirectory(blender)
|
2011-08-16 16:15:34 +00:00
|
|
|
endif(WITH_CYCLES_BLENDER)
|
|
|
|
|
|
|
|
add_subdirectory(app)
|
|
|
|
add_subdirectory(bvh)
|
|
|
|
add_subdirectory(device)
|
|
|
|
add_subdirectory(doc)
|
|
|
|
add_subdirectory(kernel)
|
|
|
|
add_subdirectory(render)
|
|
|
|
add_subdirectory(subd)
|
|
|
|
add_subdirectory(util)
|
2011-11-10 12:52:17 +00:00
|
|
|
|