Fix linking issue with OpenEXR and Zlib.
authorKévin Dietrich <kevin.dietrich@mailoo.org>
Fri, 26 Aug 2016 12:28:39 +0000 (14:28 +0200)
committerKévin Dietrich <kevin.dietrich@mailoo.org>
Fri, 26 Aug 2016 12:28:51 +0000 (14:28 +0200)
Link Zlib after OpenEXR.

Differential Revision: https://developer.blender.org/D2176

build_files/cmake/macros.cmake

index c4e1c56699ec4966854d11aeafedb5bda7ce1585..dc8b158f5c0493b2ea0f2e10dd7ec336ca45d2a7 100644 (file)
@@ -359,7 +359,6 @@ function(setup_liblinks
        target_link_libraries(
                ${target}
                ${PNG_LIBRARIES}
-               ${ZLIB_LIBRARIES}
                ${FREETYPE_LIBRARY}
        )
 
@@ -510,6 +509,11 @@ function(setup_liblinks
                endif()
        endif()
 
+       target_link_libraries(
+               ${target}
+               ${ZLIB_LIBRARIES}
+       )
+
        #system libraries with no dependencies such as platform link libs or opengl should go last
        target_link_libraries(${target}
                        ${BLENDER_GL_LIBRARIES})