add cmake option WITH_SYSTEM_OPENJPEG so linux can build cycles without having libope...
[blender.git] / build_files / cmake / macros.cmake
index 6939f21d461a6c7e0796fadf4a5ff04f807344bd..61a89b568ad3b30c50f1d6a675869cb0e023209f 100644 (file)
@@ -193,7 +193,7 @@ macro(SETUP_LIBDIRS)
        if(WITH_OPENIMAGEIO)
                link_directories(${OPENIMAGEIO_LIBPATH})
        endif()
-       if(WITH_IMAGE_OPENJPEG AND UNIX AND NOT APPLE)
+       if(WITH_IMAGE_OPENJPEG AND WITH_SYSTEM_OPENJPEG)
                link_directories(${OPENJPEG_LIBPATH})
        endif()
        if(WITH_CODEC_QUICKTIME)
@@ -303,7 +303,7 @@ macro(setup_liblinks
                        target_link_libraries(${target} ${OPENEXR_LIBRARIES})
                endif()
        endif()
-       if(WITH_IMAGE_OPENJPEG AND UNIX AND NOT APPLE)
+       if(WITH_IMAGE_OPENJPEG AND WITH_SYSTEM_OPENJPEG)
                target_link_libraries(${target} ${OPENJPEG_LIBRARIES})
        endif()
        if(WITH_CODEC_FFMPEG)