CMake: re-order openvdb/osl linking
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Tue, 16 Apr 2019 04:09:34 +0000 (06:09 +0200)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 16 Apr 2019 04:10:00 +0000 (06:10 +0200)
Needed for building without sorted libs.

build_files/cmake/macros.cmake

index 3947f08..c034042 100644 (file)
@@ -427,8 +427,11 @@ function(setup_liblinks
        if(WITH_SDL AND NOT WITH_SDL_DYNLOAD)
                target_link_libraries(${target} ${SDL_LIBRARY})
        endif()
-       if(WITH_IMAGE_TIFF)
-               target_link_libraries(${target} ${TIFF_LIBRARY})
+       if(WITH_CYCLES_OSL)
+               target_link_libraries(${target} ${OSL_LIBRARIES})
+       endif()
+       if(WITH_OPENVDB)
+               target_link_libraries(${target} ${OPENVDB_LIBRARIES} ${TBB_LIBRARIES} ${BLOSC_LIBRARIES})
        endif()
        if(WITH_OPENIMAGEIO)
                target_link_libraries(${target} ${OPENIMAGEIO_LIBRARIES})
@@ -439,12 +442,6 @@ function(setup_liblinks
        if(WITH_OPENSUBDIV)
                        target_link_libraries(${target} ${OPENSUBDIV_LIBRARIES})
        endif()
-       if(WITH_OPENVDB)
-               target_link_libraries(${target} ${OPENVDB_LIBRARIES} ${TBB_LIBRARIES} ${BLOSC_LIBRARIES})
-       endif()
-       if(WITH_CYCLES_OSL)
-               target_link_libraries(${target} ${OSL_LIBRARIES})
-       endif()
        if(WITH_CYCLES_EMBREE)
                target_link_libraries(${target} ${EMBREE_LIBRARIES})
        endif()
@@ -458,6 +455,9 @@ function(setup_liblinks
        if(WITH_ALEMBIC)
                target_link_libraries(${target} ${ALEMBIC_LIBRARIES} ${HDF5_LIBRARIES})
        endif()
+       if(WITH_IMAGE_TIFF)
+               target_link_libraries(${target} ${TIFF_LIBRARY})
+       endif()
        if(WITH_IMAGE_OPENEXR)
                target_link_libraries(${target} ${OPENEXR_LIBRARIES})
        endif()