From fe253389e027c2da3a0d4ad7304f360be64e27e5 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 24 Oct 2017 13:09:41 +0200 Subject: Fix Cycles gtests build on macOS. --- intern/cycles/test/CMakeLists.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'intern/cycles/test') diff --git a/intern/cycles/test/CMakeLists.txt b/intern/cycles/test/CMakeLists.txt index f4213c508fc..f3e49dc0c4e 100644 --- a/intern/cycles/test/CMakeLists.txt +++ b/intern/cycles/test/CMakeLists.txt @@ -42,10 +42,12 @@ if(WITH_CYCLES_OSL) ${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) -- cgit v1.2.3