Rename clip proxy rebuild function so it's no longer called in the same way
[blender.git] / intern / cycles / CMakeLists.txt
1
2 set(CYCLES_INSTALL_PATH "scripts/addons/cycles")
3 set(WITH_CYCLES_BLENDER ON)
4
5 # External Libraries
6
7 include(cmake/external_libs.cmake)
8
9 # Build Flags
10
11 if(WITH_RAYOPTIMIZATION AND SUPPORT_SSE_BUILD)
12         set(WITH_CYCLES_OPTIMIZED_KERNEL ON)
13 endif()
14
15 if(WIN32 AND MSVC)
16         set(CYCLES_OPTIMIZED_KERNEL_FLAGS "/arch:SSE2 -D_CRT_SECURE_NO_WARNINGS /fp:fast /EHsc")
17         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fp:fast -D_CRT_SECURE_NO_WARNINGS /EHsc")
18 elseif(CMAKE_COMPILER_IS_GNUCC)
19         set(CYCLES_OPTIMIZED_KERNEL_FLAGS "-ffast-math -msse -msse2 -msse3")
20         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffast-math")
21 endif()
22
23 # for OSL, not needed yet
24 # set(RTTI_DISABLE_FLAGS "-fno-rtti -DBOOST_NO_RTTI -DBOOST_NO_TYPEID")
25 # set(RTTI_DISABLE_FLAGS "/GR- -DBOOST_NO_RTTI -DBOOST_NO_TYPEID")
26
27 # Definitions and Includes
28
29 add_definitions(${BOOST_DEFINITIONS} ${OPENIMAGEIO_DEFINITIONS})
30
31 add_definitions(-DCCL_NAMESPACE_BEGIN=namespace\ ccl\ {)
32 add_definitions(-DCCL_NAMESPACE_END=})
33
34 if(WITH_CYCLES_OPTIMIZED_KERNEL)
35         add_definitions(-DWITH_OPTIMIZED_KERNEL)
36 endif()
37
38 if(WITH_CYCLES_NETWORK)
39   add_definitions(-DWITH_NETWORK)
40 endif()
41
42 if(WITH_CYCLES_OSL)
43   add_definitions(-DWITH_OSL)
44 endif()
45
46 if(WITH_CYCLES_PARTIO)
47   add_definitions(-DWITH_PARTIO)
48 endif()
49
50 if(WITH_CYCLES_CUDA_BINARIES)
51   add_definitions(-DWITH_CUDA_BINARIES)
52 endif()
53
54 add_definitions(-DWITH_OPENCL)
55 add_definitions(-DWITH_CUDA)
56 add_definitions(-DWITH_MULTI)
57
58 include_directories(
59         ${BOOST_INCLUDE_DIR}
60         ${OPENIMAGEIO_INCLUDE_DIRS}
61         ${OPENIMAGEIO_INCLUDE_DIRS}/OpenImageIO)
62
63 # Subdirectories
64
65 if(WITH_CYCLES_BLENDER)
66         add_definitions(-DBLENDER_PLUGIN)
67         add_subdirectory(blender)
68 endif(WITH_CYCLES_BLENDER)
69
70 add_subdirectory(app)
71 add_subdirectory(bvh)
72 add_subdirectory(device)
73 add_subdirectory(doc)
74 add_subdirectory(kernel)
75 add_subdirectory(render)
76 add_subdirectory(subd)
77 add_subdirectory(util)
78