Fix Cycles gtests build on macOS.
[blender.git] / intern / cycles / test / CMakeLists.txt
index 9af777fb9dd03ca8f79299df47f5024dd9dda2b7..f3e49dc0c4e2e29272acf656ae764445dd42d08f 100644 (file)
@@ -22,12 +22,17 @@ set(INC
 )
 
 set(ALL_CYCLES_LIBRARIES
 )
 
 set(ALL_CYCLES_LIBRARIES
-       cycles_render
        cycles_device
        cycles_device
+       cycles_kernel
+       cycles_render
        cycles_bvh
        cycles_graph
        cycles_subd
        cycles_util
        cycles_bvh
        cycles_graph
        cycles_subd
        cycles_util
+       extern_clew
+       ${BLENDER_GL_LIBRARIES}
+       ${BLENDER_GLEW_LIBRARIES}
+       ${CYCLES_APP_GLEW_LIBRARY}
        ${OPENIMAGEIO_LIBRARIES}
 )
 if(WITH_CYCLES_OSL)
        ${OPENIMAGEIO_LIBRARIES}
 )
 if(WITH_CYCLES_OSL)
@@ -37,10 +42,12 @@ if(WITH_CYCLES_OSL)
                ${LLVM_LIBRARIES}
        )
 endif()
                ${LLVM_LIBRARIES}
        )
 endif()
-if(WITH_IMAGE_OPENJPEG AND NOT WITH_SYSTEM_OPENJPEG)
-       list(APPEND ALL_CYCLES_LIBRARIES
-               extern_openjpeg
-       )
+if(WITH_IMAGE_OPENJPEG)
+       if(WITH_SYSTEM_OPENJPEG)
+               list(APPEND ALL_CYCLES_LIBRARIES ${OPENJPEG_LIBRARIES})
+       else()
+               list(APPEND ALL_CYCLES_LIBRARIES extern_openjpeg)
+       endif()
 endif()
 if(WITH_CYCLES_OPENSUBDIV)
        add_definitions(-DWITH_OPENSUBDIV)
 endif()
 if(WITH_CYCLES_OPENSUBDIV)
        add_definitions(-DWITH_OPENSUBDIV)
@@ -52,14 +59,34 @@ if(WITH_CYCLES_OPENSUBDIV)
                ${OPENSUBDIV_LIBRARIES}
        )
 endif()
                ${OPENSUBDIV_LIBRARIES}
        )
 endif()
+if(WITH_CUDA_DYNLOAD)
+       list(APPEND ALL_CYCLES_LIBRARIES extern_cuew)
+else()
+       list(APPEND ALL_CYCLES_LIBRARIES ${CUDA_CUDA_LIBRARY})
+endif()
+if(NOT CYCLES_STANDALONE_REPOSITORY)
+       list(APPEND ALL_CYCLES_LIBRARIES bf_intern_glew_mx bf_intern_guardedalloc ${GLEW_LIBRARY})
+endif()
+
 list(APPEND ALL_CYCLES_LIBRARIES
        ${BOOST_LIBRARIES}
 list(APPEND ALL_CYCLES_LIBRARIES
        ${BOOST_LIBRARIES}
+       ${PNG_LIBRARIES}
+       ${JPEG_LIBRARIES}
+       ${ZLIB_LIBRARIES}
+       ${TIFF_LIBRARY}
+       ${OPENIMAGEIO_LIBRARIES}
+       ${OPENEXR_LIBRARIES}
 )
 
 include_directories(${INC})
 
 )
 
 include_directories(${INC})
 
-link_directories(${BOOST_LIBPATH})
-link_directories(${OPENIMAGEIO_LIBPATH})
+link_directories(${OPENIMAGEIO_LIBPATH}
+                 ${BOOST_LIBPATH}
+                 ${PNG_LIBPATH}
+                 ${JPEG_LIBPATH}
+                 ${ZLIB_LIBPATH}
+                 ${TIFF_LIBPATH}
+                 ${OPENEXR_LIBPATH})
 
 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS}")
 set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}")
 
 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS}")
 set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}")