Page MenuHome
Paste P522

CMake Linking (old patch for reference, applies to 56933373e29e1ed076bfb8ab4b50c447e66f00ff)
ActivePublic

Authored by Campbell Barton (campbellbarton) on Aug 31 2017, 2:03 PM.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1b5a0ed81e5..8dfd5676284 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2326,6 +2326,7 @@ if(WITH_IMAGE_OPENJPEG)
else()
set(OPENJPEG_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/extern/libopenjpeg")
set(OPENJPEG_DEFINES "-DOPJ_STATIC")
+ set(OPENJPEG_LIBRARIES "extern_openjpeg")
endif()
# Special handling of Windows platform where openjpeg is always static.
if(WIN32)
@@ -2333,6 +2334,12 @@ if(WITH_IMAGE_OPENJPEG)
endif()
endif()
+if(WITH_LZO)
+ if(NOT WITH_SYSTEM_LZO)
+ set(LZO_LIBRARIES "extern_minilzo")
+ endif()
+endif()
+
if(WITH_IMAGE_REDCODE)
set(REDCODE ${CMAKE_SOURCE_DIR}/extern)
set(REDCODE_INC ${REDCODE})
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index 90c4fbd5674..bf4c469e492 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -212,6 +212,8 @@ function(blender_add_lib_nolist
add_library(${name} ${sources})
+ target_link_libraries(${name} ${lib_depends})
+
# works fine without having the includes
# listed is helpful for IDE's (QtCreator/MSVC)
blender_source_group("${sources}")
@@ -229,10 +231,13 @@ function(blender_add_lib
sources
includes
includes_sys
+ libs
)
blender_add_lib_nolist(${name} "${sources}" "${includes}" "${includes_sys}")
+ target_link_libraries(${name} "${libs}")
+
set_property(GLOBAL APPEND PROPERTY BLENDER_LINK_LIBS ${name})
endfunction()
@@ -469,7 +474,8 @@ endfunction()
function(SETUP_BLENDER_SORTED_LIBS)
- get_property(BLENDER_LINK_LIBS GLOBAL PROPERTY BLENDER_LINK_LIBS)
+ # get_property(BLENDER_LINK_LIBS GLOBAL PROPERTY BLENDER_LINK_LIBS)
+ set(BLENDER_LINK_LIBS)
list(APPEND BLENDER_LINK_LIBS
bf_windowmanager
diff --git a/extern/Eigen3/CMakeLists.txt b/extern/Eigen3/CMakeLists.txt
index e3b63881aca..e70ca902dde 100644
--- a/extern/Eigen3/CMakeLists.txt
+++ b/extern/Eigen3/CMakeLists.txt
@@ -40,4 +40,8 @@ set(SRC
intern/svd.h
)
-blender_add_lib(extern_eigen3 "${SRC}" "${INC}" "${INC_SYS}")
+set(LIB
+
+)
+
+blender_add_lib(extern_eigen3 "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/extern/binreloc/CMakeLists.txt b/extern/binreloc/CMakeLists.txt
index 524b884450c..6cb54bfb7c0 100644
--- a/extern/binreloc/CMakeLists.txt
+++ b/extern/binreloc/CMakeLists.txt
@@ -32,7 +32,11 @@ set(SRC
include/binreloc.h
)
+set(LIB
+
+)
+
add_definitions(-DENABLE_BINRELOC)
-blender_add_lib(extern_binreloc "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(extern_binreloc "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/extern/bullet2/CMakeLists.txt b/extern/bullet2/CMakeLists.txt
index 2b2c18c0685..42281b4ed95 100644
--- a/extern/bullet2/CMakeLists.txt
+++ b/extern/bullet2/CMakeLists.txt
@@ -403,4 +403,4 @@ if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive")
endif()
-blender_add_lib(extern_bullet "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(extern_bullet "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/extern/carve/CMakeLists.txt b/extern/carve/CMakeLists.txt
index 643bd423546..b43eacb7819 100644
--- a/extern/carve/CMakeLists.txt
+++ b/extern/carve/CMakeLists.txt
@@ -169,4 +169,4 @@ if(WITH_BOOST)
)
endif()
-blender_add_lib(extern_carve "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(extern_carve "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/extern/clew/CMakeLists.txt b/extern/clew/CMakeLists.txt
index f75e933034f..ca5651177fe 100644
--- a/extern/clew/CMakeLists.txt
+++ b/extern/clew/CMakeLists.txt
@@ -37,6 +37,10 @@ set(SRC
src/clew.c
)
+set(LIB
+
+)
+
add_definitions(-DCL_USE_DEPRECATED_OPENCL_1_1_APIS)
-blender_add_lib(extern_clew "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(extern_clew "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/extern/colamd/CMakeLists.txt b/extern/colamd/CMakeLists.txt
index 3019ee5904e..ac09f0aab0d 100644
--- a/extern/colamd/CMakeLists.txt
+++ b/extern/colamd/CMakeLists.txt
@@ -38,4 +38,4 @@ set(SRC
Include/UFconfig.h
)
-blender_add_lib(extern_colamd "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(extern_colamd "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/extern/cuew/CMakeLists.txt b/extern/cuew/CMakeLists.txt
index 284fbbc6aca..7eda73f7b81 100644
--- a/extern/cuew/CMakeLists.txt
+++ b/extern/cuew/CMakeLists.txt
@@ -37,4 +37,8 @@ set(SRC
src/cuew.c
)
-blender_add_lib(extern_cuew "${SRC}" "${INC}" "${INC_SYS}")
+set(LIB
+
+)
+
+blender_add_lib(extern_cuew "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/extern/glew-es/CMakeLists.txt b/extern/glew-es/CMakeLists.txt
index ba80d3f6120..854b5d15952 100644
--- a/extern/glew-es/CMakeLists.txt
+++ b/extern/glew-es/CMakeLists.txt
@@ -47,6 +47,10 @@ set(SRC
include/GL/wglew.h
)
+set(LIB
+
+)
+
add_definitions(${GL_DEFINITIONS})
if(WITH_GLEW_MX)
@@ -54,4 +58,4 @@ if(WITH_GLEW_MX)
endif()
-blender_add_lib(extern_glew_es "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(extern_glew_es "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/extern/glew/CMakeLists.txt b/extern/glew/CMakeLists.txt
index f264b3905be..803cc24dc7f 100644
--- a/extern/glew/CMakeLists.txt
+++ b/extern/glew/CMakeLists.txt
@@ -51,4 +51,4 @@ if(WITH_GLEW_MX)
add_definitions(-DGLEW_MX)
endif()
-blender_add_lib(extern_glew "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(extern_glew "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/extern/gtest/CMakeLists.txt b/extern/gtest/CMakeLists.txt
index 21b296f93df..20c82c0375c 100644
--- a/extern/gtest/CMakeLists.txt
+++ b/extern/gtest/CMakeLists.txt
@@ -69,4 +69,8 @@ set(SRC
include/gtest/internal/gtest-type-util.h
)
-blender_add_lib(extern_gtest "${SRC}" "${INC}" "${INC_SYS}")
+set(LIB
+
+)
+
+blender_add_lib(extern_gtest "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/extern/libmv/CMakeLists.txt b/extern/libmv/CMakeLists.txt
index 089743567f0..8c96411c68c 100644
--- a/extern/libmv/CMakeLists.txt
+++ b/extern/libmv/CMakeLists.txt
@@ -72,6 +72,11 @@ if(WITH_LIBMV OR WITH_GTESTS OR (WITH_CYCLES AND WITH_CYCLES_LOGGING))
)
endif()
+set(LIB
+ extern_ceres
+ extern_glog
+)
+
if(WITH_LIBMV)
TEST_SHARED_PTR_SUPPORT()
if(SHARED_PTR_FOUND)
@@ -219,7 +224,7 @@ if(WITH_LIBMV)
if(WITH_GTESTS)
- blender_add_lib(libmv_test_dataset "./libmv/multiview/test_data_sets.cc" "" "")
+ blender_add_lib(libmv_test_dataset "./libmv/multiview/test_data_sets.cc" "" "" "")
BLENDER_SRC_GTEST("libmv_predict_tracks" "./libmv/autotrack/predict_tracks_test.cc" "libmv_test_dataset;extern_libmv;extern_ceres")
BLENDER_SRC_GTEST("libmv_tracks" "./libmv/autotrack/tracks_test.cc" "libmv_test_dataset;extern_libmv;extern_ceres")
@@ -259,7 +264,8 @@ else()
)
endif()
-blender_add_lib(extern_libmv "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(extern_libmv "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
+unset(LIB)
if(WITH_LIBMV)
add_subdirectory(third_party)
@@ -345,5 +351,5 @@ if(WITH_LIBMV OR WITH_GTESTS OR (WITH_CYCLES AND WITH_CYCLES_LOGGING))
)
endif()
- blender_add_lib(extern_glog "${GLOG_SRC}" "${INC}" "${INC_SYS}")
+ blender_add_lib(extern_glog "${GLOG_SRC}" "${INC}" "${INC_SYS}" "")
endif()
diff --git a/extern/libmv/third_party/ceres/CMakeLists.txt b/extern/libmv/third_party/ceres/CMakeLists.txt
index f9a7d0631c0..f6b1cc39315 100644
--- a/extern/libmv/third_party/ceres/CMakeLists.txt
+++ b/extern/libmv/third_party/ceres/CMakeLists.txt
@@ -356,4 +356,4 @@ else()
endif()
endif()
-blender_add_lib(extern_ceres "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(extern_ceres "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/extern/libopenjpeg/CMakeLists.txt b/extern/libopenjpeg/CMakeLists.txt
index ad49eee25b6..8642b2fb385 100644
--- a/extern/libopenjpeg/CMakeLists.txt
+++ b/extern/libopenjpeg/CMakeLists.txt
@@ -86,4 +86,4 @@ set(SRC
opj_config.h
)
-blender_add_lib(extern_openjpeg "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(extern_openjpeg "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/extern/libredcode/CMakeLists.txt b/extern/libredcode/CMakeLists.txt
index c75523741ea..8e8bfc861e2 100644
--- a/extern/libredcode/CMakeLists.txt
+++ b/extern/libredcode/CMakeLists.txt
@@ -43,4 +43,4 @@ set(SRC
add_definitions(${OPENJPEG_DEFINES})
-blender_add_lib(extern_redcode "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(extern_redcode "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/extern/lzma/CMakeLists.txt b/extern/lzma/CMakeLists.txt
index 31670f595f6..cd6b28b7fd5 100644
--- a/extern/lzma/CMakeLists.txt
+++ b/extern/lzma/CMakeLists.txt
@@ -47,4 +47,4 @@ set(SRC
Types.h
)
-blender_add_lib(extern_lzma "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(extern_lzma "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/extern/lzo/CMakeLists.txt b/extern/lzo/CMakeLists.txt
index 23bbf268cc6..07ef0813638 100644
--- a/extern/lzo/CMakeLists.txt
+++ b/extern/lzo/CMakeLists.txt
@@ -41,4 +41,4 @@ set(SRC
minilzo/minilzo.h
)
-blender_add_lib(extern_minilzo "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(extern_minilzo "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/extern/rangetree/CMakeLists.txt b/extern/rangetree/CMakeLists.txt
index ba682233381..29f081882b6 100644
--- a/extern/rangetree/CMakeLists.txt
+++ b/extern/rangetree/CMakeLists.txt
@@ -27,5 +27,5 @@ set(SRC
range_tree_c_api.cc
)
-blender_add_lib(extern_rangetree "${SRC}" "${INC}" "")
+blender_add_lib(extern_rangetree "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/extern/recastnavigation/CMakeLists.txt b/extern/recastnavigation/CMakeLists.txt
index d6c7fd357b1..8cb5bc15144 100644
--- a/extern/recastnavigation/CMakeLists.txt
+++ b/extern/recastnavigation/CMakeLists.txt
@@ -67,4 +67,4 @@ set(SRC
Recast/Include/RecastAssert.h
)
-blender_add_lib(extern_recastnavigation "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(extern_recastnavigation "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/extern/sdlew/CMakeLists.txt b/extern/sdlew/CMakeLists.txt
index 8571ad9251d..6b38a8cbfa1 100644
--- a/extern/sdlew/CMakeLists.txt
+++ b/extern/sdlew/CMakeLists.txt
@@ -37,4 +37,8 @@ set(SRC
src/sdlew.c
)
-blender_add_lib(extern_sdlew "${SRC}" "${INC}" "${INC_SYS}")
+set(LIB
+
+)
+
+blender_add_lib(extern_sdlew "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/extern/wcwidth/CMakeLists.txt b/extern/wcwidth/CMakeLists.txt
index 724c5ea5d74..b16465b938a 100644
--- a/extern/wcwidth/CMakeLists.txt
+++ b/extern/wcwidth/CMakeLists.txt
@@ -37,4 +37,8 @@ set(SRC
wcwidth.h
)
-blender_add_lib(extern_wcwidth "${SRC}" "${INC}" "${INC_SYS}")
+set(LIB
+
+)
+
+blender_add_lib(extern_wcwidth "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/extern/xdnd/CMakeLists.txt b/extern/xdnd/CMakeLists.txt
index 832ddfde396..8bc749c31d8 100644
--- a/extern/xdnd/CMakeLists.txt
+++ b/extern/xdnd/CMakeLists.txt
@@ -40,4 +40,4 @@ add_definitions(
-DHAVE_SYS_TIME_H
)
-blender_add_lib(extern_xdnd "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(extern_xdnd "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/intern/audaspace/CMakeLists.txt b/intern/audaspace/CMakeLists.txt
index 2d415296dac..46aa4dcc7c9 100644
--- a/intern/audaspace/CMakeLists.txt
+++ b/intern/audaspace/CMakeLists.txt
@@ -353,4 +353,4 @@ if(WITH_PYTHON)
endif()
endif()
-blender_add_lib(bf_intern_audaspace "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_intern_audaspace "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/intern/container/CMakeLists.txt b/intern/container/CMakeLists.txt
index 4743247af26..47429230a98 100644
--- a/intern/container/CMakeLists.txt
+++ b/intern/container/CMakeLists.txt
@@ -38,4 +38,4 @@ set(SRC
)
# infact nothing to compile!
-blender_add_lib(bf_intern_ctr "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_intern_ctr "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/intern/cycles/blender/CMakeLists.txt b/intern/cycles/blender/CMakeLists.txt
index c6a2b919486..3f9ed1b7c35 100644
--- a/intern/cycles/blender/CMakeLists.txt
+++ b/intern/cycles/blender/CMakeLists.txt
@@ -40,6 +40,15 @@ set(SRC
blender_util.h
)
+set(LIB
+ cycles_bvh
+ cycles_device
+ cycles_kernel
+ cycles_render
+ cycles_subd
+ cycles_util
+)
+
set(ADDON_FILES
addon/__init__.py
addon/engine.py
@@ -52,7 +61,7 @@ set(ADDON_FILES
add_definitions(${GL_DEFINITIONS})
-blender_add_lib(bf_intern_cycles "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_intern_cycles "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
# avoid link failure with clang 3.4 debug
if(CMAKE_C_COMPILER_ID MATCHES "Clang" AND NOT ${CMAKE_C_COMPILER_VERSION} VERSION_LESS '3.4')
diff --git a/intern/dualcon/CMakeLists.txt b/intern/dualcon/CMakeLists.txt
index 40c8ef8ff9c..7bfae16bdfe 100644
--- a/intern/dualcon/CMakeLists.txt
+++ b/intern/dualcon/CMakeLists.txt
@@ -45,5 +45,5 @@ set(SRC
dualcon.h
)
-blender_add_lib(bf_intern_dualcon "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_intern_dualcon "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt
index 948b4bf91d1..b61c46bbca8 100644
--- a/intern/ghost/CMakeLists.txt
+++ b/intern/ghost/CMakeLists.txt
@@ -88,6 +88,11 @@ set(SRC
intern/GHOST_WindowManager.h
)
+set(LIB
+ bf_intern_string
+ bf_intern_glew_mx
+)
+
if(WITH_GHOST_DEBUG)
list(APPEND SRC
intern/GHOST_EventPrinter.cpp
@@ -207,6 +212,10 @@ elseif(WITH_X11)
intern/GHOST_DropTargetX11.h
)
+
+ list(APPEND LIB
+ extern_xdnd
+ )
endif()
if(X11_XF86keysym_INCLUDE_PATH)
@@ -332,4 +341,4 @@ endif()
add_definitions(${GL_DEFINITIONS})
-blender_add_lib(bf_intern_ghost "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_intern_ghost "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/intern/ghost/test/CMakeLists.txt b/intern/ghost/test/CMakeLists.txt
index e1475966d47..da90f3faccf 100644
--- a/intern/ghost/test/CMakeLists.txt
+++ b/intern/ghost/test/CMakeLists.txt
@@ -18,6 +18,7 @@ macro(blender_add_lib
sources
includes
includes_sys
+ libs
)
endmacro()
diff --git a/intern/glew-mx/CMakeLists.txt b/intern/glew-mx/CMakeLists.txt
index 8b692b5136c..a92d36b8db5 100644
--- a/intern/glew-mx/CMakeLists.txt
+++ b/intern/glew-mx/CMakeLists.txt
@@ -39,6 +39,10 @@ set(SRC
intern/symbol-binding.h
)
+set(LIB
+
+)
+
add_definitions(${GL_DEFINITIONS})
-blender_add_lib(bf_intern_glew_mx "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_intern_glew_mx "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/intern/guardedalloc/CMakeLists.txt b/intern/guardedalloc/CMakeLists.txt
index 1d041ba5380..667ac192b1b 100644
--- a/intern/guardedalloc/CMakeLists.txt
+++ b/intern/guardedalloc/CMakeLists.txt
@@ -44,6 +44,10 @@ set(SRC
../atomic/atomic_ops.h
)
+set(LIB
+
+)
+
if(WIN32 AND NOT UNIX)
list(APPEND SRC
intern/mmap_win.c
@@ -52,12 +56,12 @@ if(WIN32 AND NOT UNIX)
)
endif()
-blender_add_lib(bf_intern_guardedalloc "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_intern_guardedalloc "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
# Override C++ alloc, optional.
if(WITH_CXX_GUARDEDALLOC)
set(SRC
cpp/mallocn.cpp
)
- blender_add_lib(bf_intern_guardedalloc_cpp "${SRC}" "${INC}" "${INC_SYS}")
+ blender_add_lib(bf_intern_guardedalloc_cpp "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
endif()
diff --git a/intern/iksolver/CMakeLists.txt b/intern/iksolver/CMakeLists.txt
index 9476e0379e9..1ede13a766a 100644
--- a/intern/iksolver/CMakeLists.txt
+++ b/intern/iksolver/CMakeLists.txt
@@ -72,4 +72,8 @@ set(SRC
intern/TNT/version.h
)
-blender_add_lib(bf_intern_iksolver "${SRC}" "${INC}" "${INC_SYS}")
+set(LIB
+ bf_intern_moto
+)
+
+blender_add_lib(bf_intern_iksolver "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/intern/itasc/CMakeLists.txt b/intern/itasc/CMakeLists.txt
index bdf0f88e516..b4780f677ee 100644
--- a/intern/itasc/CMakeLists.txt
+++ b/intern/itasc/CMakeLists.txt
@@ -360,4 +360,4 @@ set(SRC
unset(EIGEN3_HEADERS)
-blender_add_lib(bf_intern_itasc "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_intern_itasc "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/intern/locale/CMakeLists.txt b/intern/locale/CMakeLists.txt
index 6896702fcbf..bcbe8a25159 100644
--- a/intern/locale/CMakeLists.txt
+++ b/intern/locale/CMakeLists.txt
@@ -59,7 +59,7 @@ if(WITH_INTERNATIONAL)
add_definitions(${BOOST_DEFINITIONS})
endif()
-blender_add_lib(bf_intern_locale "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_intern_locale "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
# -----------------------------------------------------------------------------
# Build msgfmt executable
diff --git a/intern/memutil/CMakeLists.txt b/intern/memutil/CMakeLists.txt
index 3f9f8d6fe25..07f24080bb4 100644
--- a/intern/memutil/CMakeLists.txt
+++ b/intern/memutil/CMakeLists.txt
@@ -46,4 +46,4 @@ set(SRC
MEM_SmartPtr.h
)
-blender_add_lib(bf_intern_memutil "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_intern_memutil "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/intern/mikktspace/CMakeLists.txt b/intern/mikktspace/CMakeLists.txt
index e48b0240f98..7f36bfe8aea 100644
--- a/intern/mikktspace/CMakeLists.txt
+++ b/intern/mikktspace/CMakeLists.txt
@@ -37,5 +37,5 @@ set(SRC
mikktspace.h
)
-blender_add_lib(bf_intern_mikktspace "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_intern_mikktspace "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/intern/moto/CMakeLists.txt b/intern/moto/CMakeLists.txt
index 8075c66b847..a7ac32420a3 100644
--- a/intern/moto/CMakeLists.txt
+++ b/intern/moto/CMakeLists.txt
@@ -80,4 +80,4 @@ set(SRC
include/MT_Vector4.inl
)
-blender_add_lib(bf_intern_moto "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_intern_moto "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/intern/opencolorio/CMakeLists.txt b/intern/opencolorio/CMakeLists.txt
index 61a8d995f40..d3ecdc9a625 100644
--- a/intern/opencolorio/CMakeLists.txt
+++ b/intern/opencolorio/CMakeLists.txt
@@ -69,4 +69,4 @@ if(WITH_OPENCOLORIO)
endif()
-blender_add_lib(bf_intern_opencolorio "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_intern_opencolorio "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/intern/opennl/CMakeLists.txt b/intern/opennl/CMakeLists.txt
index af8fde8572b..98dce5beef3 100644
--- a/intern/opennl/CMakeLists.txt
+++ b/intern/opennl/CMakeLists.txt
@@ -90,4 +90,8 @@ set(SRC
superlu/util.h
)
-blender_add_lib(bf_intern_opennl "${SRC}" "${INC}" "${INC_SYS}")
+set(LIB
+ extern_colamd
+)
+
+blender_add_lib(bf_intern_opennl "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/intern/opensubdiv/CMakeLists.txt b/intern/opensubdiv/CMakeLists.txt
index a4dfe339728..e4fdc043484 100644
--- a/intern/opensubdiv/CMakeLists.txt
+++ b/intern/opensubdiv/CMakeLists.txt
@@ -49,6 +49,10 @@ set(SRC
opensubdiv_intern.h
)
+set(LIB
+
+)
+
if(WITH_SUBSURF_WERROR)
ADD_CHECK_C_COMPILER_FLAG(CMAKE_C_FLAGS C_WERROR -Werror)
ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS C_WERROR -Werror)
@@ -91,4 +95,6 @@ if(OPENSUBDIV_HAS_OPENCL)
add_definitions(-DOPENSUBDIV_HAS_CLEW)
endif()
-blender_add_lib(bf_intern_opensubdiv "${SRC}" "${INC}" "${INC_SYS}")
+
+
+blender_add_lib(bf_intern_opensubdiv "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/intern/raskter/CMakeLists.txt b/intern/raskter/CMakeLists.txt
index 3e1368d8eb0..22306d99e04 100644
--- a/intern/raskter/CMakeLists.txt
+++ b/intern/raskter/CMakeLists.txt
@@ -37,4 +37,4 @@ set(SRC
raskter.h
)
-blender_add_lib(bf_intern_raskter "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_intern_raskter "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/intern/rigidbody/CMakeLists.txt b/intern/rigidbody/CMakeLists.txt
index 5d84c2cf082..a45760ac42d 100644
--- a/intern/rigidbody/CMakeLists.txt
+++ b/intern/rigidbody/CMakeLists.txt
@@ -35,4 +35,8 @@ set(SRC
RBI_api.h
)
-blender_add_lib(bf_intern_rigidbody "${SRC}" "${INC}" "${INC_SYS}")
+set(LIB
+ extern_bullet
+)
+
+blender_add_lib(bf_intern_rigidbody "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/intern/smoke/CMakeLists.txt b/intern/smoke/CMakeLists.txt
index 8cda0fd140f..2c7617cb331 100644
--- a/intern/smoke/CMakeLists.txt
+++ b/intern/smoke/CMakeLists.txt
@@ -100,5 +100,5 @@ if(WITH_FFTW3)
)
endif()
-blender_add_lib(bf_intern_smoke "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_intern_smoke "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/intern/string/CMakeLists.txt b/intern/string/CMakeLists.txt
index ddadfc61bee..96961eb06e3 100644
--- a/intern/string/CMakeLists.txt
+++ b/intern/string/CMakeLists.txt
@@ -38,4 +38,4 @@ set(SRC
STR_String.h
)
-blender_add_lib(bf_intern_string "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_intern_string "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/intern/utfconv/CMakeLists.txt b/intern/utfconv/CMakeLists.txt
index 118d1710e53..0e0883dfd61 100644
--- a/intern/utfconv/CMakeLists.txt
+++ b/intern/utfconv/CMakeLists.txt
@@ -40,4 +40,4 @@ if(WIN32)
)
endif()
-blender_add_lib(bf_intern_utfconv "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_intern_utfconv "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/avi/CMakeLists.txt b/source/blender/avi/CMakeLists.txt
index 292206d8cb9..b541ad5ba23 100644
--- a/source/blender/avi/CMakeLists.txt
+++ b/source/blender/avi/CMakeLists.txt
@@ -50,4 +50,4 @@ set(SRC
intern/avi_rgb32.h
)
-blender_add_lib(bf_avi "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_avi "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/blenfont/CMakeLists.txt b/source/blender/blenfont/CMakeLists.txt
index 36ad6fe03cf..7c9118d1fb8 100644
--- a/source/blender/blenfont/CMakeLists.txt
+++ b/source/blender/blenfont/CMakeLists.txt
@@ -73,4 +73,4 @@ endif()
add_definitions(${GL_DEFINITIONS})
-blender_add_lib(bf_blenfont "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_blenfont "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt
index 0865efb5ba7..b77aadf902b 100644
--- a/source/blender/blenkernel/CMakeLists.txt
+++ b/source/blender/blenkernel/CMakeLists.txt
@@ -296,10 +296,36 @@ set(SRC
intern/data_transfer_intern.h
)
+set(LIB
+ extern_libmv
+ bf_intern_mikktspace
+ bf_intern_raskter
+ bf_blenlib
+ bf_bmesh
+ bf_blenfont
+ bf_blentranslation
+ bf_blenloader
+ bf_depsgraph
+ bf_ikplugin
+ bf_gpu
+ bf_imbuf
+ bf_nodes
+ bf_modifiers
+ bf_rna
+ bf_python
+ bf_python_bmesh
+)
+
+
if(WITH_BINRELOC)
list(APPEND INC_SYS
${BINRELOC_INCLUDE_DIRS}
)
+
+ list(APPEND LIB
+ extern_binreloc
+ )
+
add_definitions(-DWITH_BINRELOC)
endif()
@@ -317,6 +343,10 @@ if(WITH_AUDASPACE)
list(APPEND INC_SYS
${AUDASPACE_C_INCLUDE_DIRS}
)
+
+ list(APPEND LIB
+ bf_intern_audaspace
+ )
endif()
if(WITH_BULLET)
@@ -326,6 +356,10 @@ if(WITH_BULLET)
list(APPEND INC
../../../intern/rigidbody
)
+ list(APPEND LIB
+ extern_bullet
+ bf_intern_rigidbody
+ )
add_definitions(-DWITH_BULLET)
endif()
@@ -373,6 +407,9 @@ if(WITH_CODEC_AVI)
list(APPEND INC
../avi
)
+ list(APPEND LIB
+ bf_avi
+ )
add_definitions(-DWITH_AVI)
endif()
@@ -445,6 +482,9 @@ if(WITH_LZO)
../../../extern/lzo/minilzo
)
endif()
+ list(APPEND LIB
+ ${LZO_LIBRARIES}
+ )
add_definitions(-DWITH_LZO)
endif()
@@ -452,6 +492,9 @@ if(WITH_LZMA)
list(APPEND INC_SYS
../../../extern/lzma
)
+ list(APPEND LIB
+ extern_lzma
+ )
add_definitions(-DWITH_LZMA)
endif()
@@ -516,6 +559,9 @@ if(WITH_OPENSUBDIV)
PROPERTIES COMPILE_FLAGS -Werror)
endif()
endif()
+ list(APPEND LIB
+ bf_intern_opensubdiv
+ )
endif()
## Warnings as errors, this is too strict!
@@ -527,4 +573,4 @@ if(WITH_LEGACY_DEPSGRAPH)
add_definitions(-DWITH_LEGACY_DEPSGRAPH)
endif()
-blender_add_lib(bf_blenkernel "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_blenkernel "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/blenlib/CMakeLists.txt b/source/blender/blenlib/CMakeLists.txt
index 0de614a5ca7..55cdb22089e 100644
--- a/source/blender/blenlib/CMakeLists.txt
+++ b/source/blender/blenlib/CMakeLists.txt
@@ -204,6 +204,12 @@ set(SRC
PIL_time_utildefines.h
)
+set(LIB
+ bf_intern_guardedalloc
+ extern_wcwidth
+ extern_eigen3
+)
+
if(WITH_MEM_VALGRIND)
add_definitions(-DWITH_MEM_VALGRIND)
endif()
@@ -225,4 +231,4 @@ set_source_files_properties(
PROPERTIES HEADER_FILE_ONLY TRUE
)
-blender_add_lib(bf_blenlib "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_blenlib "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/blenloader/CMakeLists.txt b/source/blender/blenloader/CMakeLists.txt
index 8364df38208..ddb30c927f5 100644
--- a/source/blender/blenloader/CMakeLists.txt
+++ b/source/blender/blenloader/CMakeLists.txt
@@ -61,6 +61,10 @@ set(SRC
intern/readfile.h
)
+set(LIB
+ bf_dna
+)
+
if(WITH_BUILDINFO)
add_definitions(-DWITH_BUILDINFO)
endif()
@@ -73,4 +77,4 @@ if(WITH_CODEC_FFMPEG)
add_definitions(-DWITH_FFMPEG)
endif()
-blender_add_lib(bf_blenloader "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_blenloader "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/blentranslation/CMakeLists.txt b/source/blender/blentranslation/CMakeLists.txt
index 59bd7f0adfa..afbc4ae90b6 100644
--- a/source/blender/blentranslation/CMakeLists.txt
+++ b/source/blender/blentranslation/CMakeLists.txt
@@ -42,7 +42,14 @@ set(SRC
BLT_translation.h
)
+set(LIB
+
+)
+
if(WITH_INTERNATIONAL)
+ list(APPEND LIB
+ bf_intern_locale
+ )
add_definitions(-DWITH_INTERNATIONAL)
endif()
@@ -53,4 +60,4 @@ if(WITH_PYTHON)
)
endif()
-blender_add_lib(bf_blentranslation "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_blentranslation "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/bmesh/CMakeLists.txt b/source/blender/bmesh/CMakeLists.txt
index 257768b0ac8..280c6f492f2 100644
--- a/source/blender/bmesh/CMakeLists.txt
+++ b/source/blender/bmesh/CMakeLists.txt
@@ -159,6 +159,11 @@ set(SRC
bmesh_tools.h
)
+set(LIB
+ bf_blenlib
+ extern_rangetree
+)
+
if(MSVC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")
endif()
@@ -185,4 +190,4 @@ if(WITH_FREESTYLE)
add_definitions(-DWITH_FREESTYLE)
endif()
-blender_add_lib(bf_bmesh "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_bmesh "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/collada/CMakeLists.txt b/source/blender/collada/CMakeLists.txt
index 293049a1a05..0ec53e8928d 100644
--- a/source/blender/collada/CMakeLists.txt
+++ b/source/blender/collada/CMakeLists.txt
@@ -116,4 +116,4 @@ if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive")
endif()
-blender_add_lib(bf_collada "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_collada "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/compositor/CMakeLists.txt b/source/blender/compositor/CMakeLists.txt
index 972db6b71d2..f989e6d88fa 100644
--- a/source/blender/compositor/CMakeLists.txt
+++ b/source/blender/compositor/CMakeLists.txt
@@ -537,6 +537,12 @@ set(SRC
operations/COM_MaskOperation.h
)
+set(LIB
+ extern_clew
+ bf_blenlib
+ bf_imbuf_openexr
+)
+
list(APPEND INC
${CMAKE_CURRENT_BINARY_DIR}/operations
)
@@ -555,4 +561,4 @@ if(WITH_CYCLES AND WITH_CYCLES_DEBUG)
add_definitions(-DWITH_CYCLES_DEBUG)
endif()
-blender_add_lib(bf_compositor "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_compositor "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/depsgraph/CMakeLists.txt b/source/blender/depsgraph/CMakeLists.txt
index f3ff709e98b..51766a95c81 100644
--- a/source/blender/depsgraph/CMakeLists.txt
+++ b/source/blender/depsgraph/CMakeLists.txt
@@ -119,4 +119,4 @@ if(WITH_OPENSUBDIV)
add_definitions(-DWITH_OPENSUBDIV)
endif()
-blender_add_lib(bf_depsgraph "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_depsgraph "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/animation/CMakeLists.txt b/source/blender/editors/animation/CMakeLists.txt
index 473b0e6bc5a..18cda37b30e 100644
--- a/source/blender/editors/animation/CMakeLists.txt
+++ b/source/blender/editors/animation/CMakeLists.txt
@@ -55,10 +55,14 @@ set(SRC
anim_intern.h
)
+set(LIB
+
+)
+
if(WITH_INTERNATIONAL)
add_definitions(-DWITH_INTERNATIONAL)
endif()
add_definitions(${GL_DEFINITIONS})
-blender_add_lib(bf_editor_animation "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_editor_animation "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/armature/CMakeLists.txt b/source/blender/editors/armature/CMakeLists.txt
index 1ed70b3cd98..632d8a9152f 100644
--- a/source/blender/editors/armature/CMakeLists.txt
+++ b/source/blender/editors/armature/CMakeLists.txt
@@ -64,6 +64,10 @@ set(SRC
reeb.h
)
+set(LIB
+ bf_blenlib
+)
+
if(WITH_INTERNATIONAL)
add_definitions(-DWITH_INTERNATIONAL)
endif()
@@ -77,4 +81,4 @@ endif()
add_definitions(${GL_DEFINITIONS})
-blender_add_lib(bf_editor_armature "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_editor_armature "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/curve/CMakeLists.txt b/source/blender/editors/curve/CMakeLists.txt
index 83346e9550c..f8617b5998b 100644
--- a/source/blender/editors/curve/CMakeLists.txt
+++ b/source/blender/editors/curve/CMakeLists.txt
@@ -47,4 +47,4 @@ if(WITH_INTERNATIONAL)
add_definitions(-DWITH_INTERNATIONAL)
endif()
-blender_add_lib(bf_editor_curve "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_editor_curve "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/datafiles/CMakeLists.txt b/source/blender/editors/datafiles/CMakeLists.txt
index 2a84ca7f297..5858ec4cf81 100644
--- a/source/blender/editors/datafiles/CMakeLists.txt
+++ b/source/blender/editors/datafiles/CMakeLists.txt
@@ -130,4 +130,4 @@ if(WITH_BLENDER)
data_to_c_simple(../../../../release/datafiles/startup.blend SRC)
endif()
-blender_add_lib(bf_editor_datafiles "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_editor_datafiles "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/gpencil/CMakeLists.txt b/source/blender/editors/gpencil/CMakeLists.txt
index 83a13abb33f..1b052be9f51 100644
--- a/source/blender/editors/gpencil/CMakeLists.txt
+++ b/source/blender/editors/gpencil/CMakeLists.txt
@@ -58,4 +58,4 @@ endif()
add_definitions(${GL_DEFINITIONS})
-blender_add_lib(bf_editor_gpencil "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_editor_gpencil "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/interface/CMakeLists.txt b/source/blender/editors/interface/CMakeLists.txt
index c57f8d5c7a8..0baac950183 100644
--- a/source/blender/editors/interface/CMakeLists.txt
+++ b/source/blender/editors/interface/CMakeLists.txt
@@ -61,6 +61,14 @@ set(SRC
interface_intern.h
)
+set(LIB
+ bf_editor_datafiles
+ bf_editor_space_clip
+ bf_editor_space_file
+ bf_editor_space_image
+ bf_blenlib
+)
+
if(WITH_INTERNATIONAL)
add_definitions(-DWITH_INTERNATIONAL)
endif()
@@ -81,4 +89,4 @@ endif()
add_definitions(${GL_DEFINITIONS})
-blender_add_lib(bf_editor_interface "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_editor_interface "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/io/CMakeLists.txt b/source/blender/editors/io/CMakeLists.txt
index 828cb494eab..b37654c9820 100644
--- a/source/blender/editors/io/CMakeLists.txt
+++ b/source/blender/editors/io/CMakeLists.txt
@@ -42,7 +42,15 @@ set(SRC
io_ops.h
)
+set(LIB
+
+)
+
if(WITH_OPENCOLLADA)
+ list(APPEND LIB
+ bf_collada
+ )
+
add_definitions(-DWITH_COLLADA)
endif()
@@ -50,4 +58,4 @@ if(WITH_INTERNATIONAL)
add_definitions(-DWITH_INTERNATIONAL)
endif()
-blender_add_lib(bf_editor_io "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_editor_io "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/mask/CMakeLists.txt b/source/blender/editors/mask/CMakeLists.txt
index 033d034cf4e..ac8760afbc6 100644
--- a/source/blender/editors/mask/CMakeLists.txt
+++ b/source/blender/editors/mask/CMakeLists.txt
@@ -50,6 +50,11 @@ set(SRC
mask_intern.h
)
+set(LIB
+ bf_editor_space_sequencer
+ bf_blenkernel
+)
+
add_definitions(${GL_DEFINITIONS})
-blender_add_lib(bf_editor_mask "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_editor_mask "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/mesh/CMakeLists.txt b/source/blender/editors/mesh/CMakeLists.txt
index 0280f662a26..d1930fdfb8f 100644
--- a/source/blender/editors/mesh/CMakeLists.txt
+++ b/source/blender/editors/mesh/CMakeLists.txt
@@ -63,6 +63,11 @@ set(SRC
mesh_intern.h
)
+set(LIB
+
+)
+
+
if(WITH_GAMEENGINE)
add_definitions(-DWITH_GAMEENGINE)
@@ -89,4 +94,4 @@ endif()
add_definitions(${GL_DEFINITIONS})
-blender_add_lib(bf_editor_mesh "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_editor_mesh "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/metaball/CMakeLists.txt b/source/blender/editors/metaball/CMakeLists.txt
index 0f9de8dbf87..de8ec81f0c7 100644
--- a/source/blender/editors/metaball/CMakeLists.txt
+++ b/source/blender/editors/metaball/CMakeLists.txt
@@ -40,4 +40,4 @@ set(SRC
mball_intern.h
)
-blender_add_lib(bf_editor_metaball "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_editor_metaball "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/object/CMakeLists.txt b/source/blender/editors/object/CMakeLists.txt
index b3d02d45e13..ddcdf6fe378 100644
--- a/source/blender/editors/object/CMakeLists.txt
+++ b/source/blender/editors/object/CMakeLists.txt
@@ -66,6 +66,14 @@ set(SRC
add_definitions(${GL_DEFINITIONS})
+set(LIB
+ bf_editor_armature
+ bf_editor_curve
+ bf_editor_physics
+ bf_render
+ bf_blenkernel
+)
+
if(WITH_PYTHON)
add_definitions(-DWITH_PYTHON)
endif()
@@ -78,4 +86,4 @@ if(WITH_INTERNATIONAL)
add_definitions(-DWITH_INTERNATIONAL)
endif()
-blender_add_lib(bf_editor_object "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_editor_object "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/physics/CMakeLists.txt b/source/blender/editors/physics/CMakeLists.txt
index 898422dac51..4d9ee80027d 100644
--- a/source/blender/editors/physics/CMakeLists.txt
+++ b/source/blender/editors/physics/CMakeLists.txt
@@ -51,7 +51,15 @@ set(SRC
physics_intern.h
)
+set(LIB
+
+)
+
+
if(WITH_MOD_FLUID)
+ list(APPEND LIB
+ bf_intern_elbeem
+ )
add_definitions(-DWITH_MOD_FLUID)
endif()
@@ -68,4 +76,4 @@ endif()
add_definitions(${GL_DEFINITIONS})
-blender_add_lib(bf_editor_physics "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_editor_physics "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/render/CMakeLists.txt b/source/blender/editors/render/CMakeLists.txt
index 971ab9f3458..185fc57346f 100644
--- a/source/blender/editors/render/CMakeLists.txt
+++ b/source/blender/editors/render/CMakeLists.txt
@@ -51,6 +51,10 @@ set(SRC
render_intern.h
)
+set(LIB
+
+)
+
if(WITH_CODEC_QUICKTIME)
list(APPEND INC
../../quicktime
@@ -63,6 +67,10 @@ endif()
if(WITH_HEADLESS)
add_definitions(-DWITH_HEADLESS)
+else()
+ list(APPEND LIB
+ bf_editor_datafiles
+ )
endif()
add_definitions(${GL_DEFINITIONS})
@@ -78,4 +86,4 @@ if(WITH_INTERNATIONAL)
add_definitions(-DWITH_INTERNATIONAL)
endif()
-blender_add_lib(bf_editor_render "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_editor_render "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/screen/CMakeLists.txt b/source/blender/editors/screen/CMakeLists.txt
index ed86ffa5e16..645991094c0 100644
--- a/source/blender/editors/screen/CMakeLists.txt
+++ b/source/blender/editors/screen/CMakeLists.txt
@@ -49,10 +49,14 @@ set(SRC
screen_intern.h
)
+set(LIB
+ bf_editor_object
+)
+
if(WITH_INTERNATIONAL)
add_definitions(-DWITH_INTERNATIONAL)
endif()
add_definitions(${GL_DEFINITIONS})
-blender_add_lib(bf_editor_screen "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_editor_screen "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/sculpt_paint/CMakeLists.txt b/source/blender/editors/sculpt_paint/CMakeLists.txt
index 46753df4e13..34276fb7bb8 100644
--- a/source/blender/editors/sculpt_paint/CMakeLists.txt
+++ b/source/blender/editors/sculpt_paint/CMakeLists.txt
@@ -67,4 +67,4 @@ endif()
add_definitions(${GL_DEFINITIONS})
-blender_add_lib(bf_editor_sculpt_paint "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_editor_sculpt_paint "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/sound/CMakeLists.txt b/source/blender/editors/sound/CMakeLists.txt
index 535cd579030..869f1bf3b27 100644
--- a/source/blender/editors/sound/CMakeLists.txt
+++ b/source/blender/editors/sound/CMakeLists.txt
@@ -54,4 +54,4 @@ if(WITH_CODEC_SNDFILE)
add_definitions(-DWITH_SNDFILE)
endif()
-blender_add_lib(bf_editor_sound "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_editor_sound "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/space_action/CMakeLists.txt b/source/blender/editors/space_action/CMakeLists.txt
index 839071d1330..73155f23102 100644
--- a/source/blender/editors/space_action/CMakeLists.txt
+++ b/source/blender/editors/space_action/CMakeLists.txt
@@ -46,6 +46,11 @@ set(SRC
action_intern.h
)
+set(LIB
+ bf_editor_gpencil
+ bf_editor_mask
+)
+
add_definitions(${GL_DEFINITIONS})
-blender_add_lib(bf_editor_space_action "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_editor_space_action "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/space_api/CMakeLists.txt b/source/blender/editors/space_api/CMakeLists.txt
index bf3257389ce..74aec0c99e6 100644
--- a/source/blender/editors/space_api/CMakeLists.txt
+++ b/source/blender/editors/space_api/CMakeLists.txt
@@ -37,4 +37,27 @@ set(SRC
spacetypes.c
)
-blender_add_lib(bf_editor_space_api "${SRC}" "${INC}" "${INC_SYS}")
+set(LIB
+ bf_editor_io
+ bf_editor_sound
+ bf_editor_space_action
+ bf_editor_space_buttons
+ bf_editor_space_clip
+ bf_editor_space_console
+ bf_editor_space_file
+ bf_editor_space_graph
+ bf_editor_space_image
+ bf_editor_space_info
+ bf_editor_space_logic
+ bf_editor_space_nla
+ bf_editor_space_node
+ bf_editor_space_outliner
+ bf_editor_space_script
+ bf_editor_space_sequencer
+ bf_editor_space_text
+ bf_editor_space_time
+ bf_editor_space_userpref
+ bf_editor_space_view3d
+)
+
+blender_add_lib(bf_editor_space_api "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/space_buttons/CMakeLists.txt b/source/blender/editors/space_buttons/CMakeLists.txt
index 397d79e1dbe..1f6055ca40f 100644
--- a/source/blender/editors/space_buttons/CMakeLists.txt
+++ b/source/blender/editors/space_buttons/CMakeLists.txt
@@ -54,4 +54,4 @@ if(WITH_FREESTYLE)
add_definitions(-DWITH_FREESTYLE)
endif()
-blender_add_lib(bf_editor_space_buttons "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_editor_space_buttons "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/space_clip/CMakeLists.txt b/source/blender/editors/space_clip/CMakeLists.txt
index d17d1856502..579abf0c007 100644
--- a/source/blender/editors/space_clip/CMakeLists.txt
+++ b/source/blender/editors/space_clip/CMakeLists.txt
@@ -58,10 +58,15 @@ set(SRC
clip_intern.h
)
+set(LIB
+ bf_editor_mask
+ bf_editor_uvedit
+)
+
add_definitions(${GL_DEFINITIONS})
if(WITH_INTERNATIONAL)
add_definitions(-DWITH_INTERNATIONAL)
endif()
-blender_add_lib(bf_editor_space_clip "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_editor_space_clip "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/space_console/CMakeLists.txt b/source/blender/editors/space_console/CMakeLists.txt
index ecfb1f0e0df..4be37c60ef0 100644
--- a/source/blender/editors/space_console/CMakeLists.txt
+++ b/source/blender/editors/space_console/CMakeLists.txt
@@ -49,4 +49,4 @@ endif()
add_definitions(${GL_DEFINITIONS})
-blender_add_lib(bf_editor_space_console "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_editor_space_console "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/space_file/CMakeLists.txt b/source/blender/editors/space_file/CMakeLists.txt
index fd701a8be4c..a408d9cf267 100644
--- a/source/blender/editors/space_file/CMakeLists.txt
+++ b/source/blender/editors/space_file/CMakeLists.txt
@@ -55,6 +55,10 @@ set(SRC
fsmenu.h
)
+set(LIB
+ bf_editor_datafiles
+)
+
if(WITH_HEADLESS)
add_definitions(-DWITH_HEADLESS)
endif()
@@ -97,4 +101,4 @@ if(WITH_FREESTYLE)
add_definitions(-DWITH_FREESTYLE)
endif()
-blender_add_lib(bf_editor_space_file "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_editor_space_file "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/space_graph/CMakeLists.txt b/source/blender/editors/space_graph/CMakeLists.txt
index 40a196fa95b..51b3f0ffd24 100644
--- a/source/blender/editors/space_graph/CMakeLists.txt
+++ b/source/blender/editors/space_graph/CMakeLists.txt
@@ -61,4 +61,4 @@ endif()
add_definitions(${GL_DEFINITIONS})
-blender_add_lib(bf_editor_space_graph "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_editor_space_graph "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/space_image/CMakeLists.txt b/source/blender/editors/space_image/CMakeLists.txt
index c60d194b620..dc834eead8d 100644
--- a/source/blender/editors/space_image/CMakeLists.txt
+++ b/source/blender/editors/space_image/CMakeLists.txt
@@ -49,6 +49,11 @@ set(SRC
image_intern.h
)
+set(LIB
+ bf_editor_mask
+ bf_editor_uvedit
+)
+
if(WITH_INTERNATIONAL)
add_definitions(-DWITH_INTERNATIONAL)
endif()
@@ -75,4 +80,4 @@ endif()
add_definitions(${GL_DEFINITIONS})
-blender_add_lib(bf_editor_space_image "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_editor_space_image "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/space_info/CMakeLists.txt b/source/blender/editors/space_info/CMakeLists.txt
index 96fe9322b97..36f71ea9e35 100644
--- a/source/blender/editors/space_info/CMakeLists.txt
+++ b/source/blender/editors/space_info/CMakeLists.txt
@@ -57,4 +57,4 @@ endif()
add_definitions(${GL_DEFINITIONS})
-blender_add_lib(bf_editor_space_info "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_editor_space_info "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/space_logic/CMakeLists.txt b/source/blender/editors/space_logic/CMakeLists.txt
index 349c003cf56..f3ae59785c7 100644
--- a/source/blender/editors/space_logic/CMakeLists.txt
+++ b/source/blender/editors/space_logic/CMakeLists.txt
@@ -55,4 +55,4 @@ if(WITH_INTERNATIONAL)
add_definitions(-DWITH_INTERNATIONAL)
endif()
-blender_add_lib(bf_editor_space_logic "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_editor_space_logic "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/space_nla/CMakeLists.txt b/source/blender/editors/space_nla/CMakeLists.txt
index c8c64a79945..ed9d67f9686 100644
--- a/source/blender/editors/space_nla/CMakeLists.txt
+++ b/source/blender/editors/space_nla/CMakeLists.txt
@@ -47,10 +47,14 @@ set(SRC
nla_intern.h
)
+set(LIB
+ bf_editor_space_action
+)
+
if(WITH_INTERNATIONAL)
add_definitions(-DWITH_INTERNATIONAL)
endif()
add_definitions(${GL_DEFINITIONS})
-blender_add_lib(bf_editor_space_nla "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_editor_space_nla "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/space_node/CMakeLists.txt b/source/blender/editors/space_node/CMakeLists.txt
index cde818333e4..e10b09d08fd 100644
--- a/source/blender/editors/space_node/CMakeLists.txt
+++ b/source/blender/editors/space_node/CMakeLists.txt
@@ -68,4 +68,4 @@ endif()
add_definitions(${GL_DEFINITIONS})
-blender_add_lib(bf_editor_space_node "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_editor_space_node "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/space_outliner/CMakeLists.txt b/source/blender/editors/space_outliner/CMakeLists.txt
index 289d6e715e1..6d45310d7f4 100644
--- a/source/blender/editors/space_outliner/CMakeLists.txt
+++ b/source/blender/editors/space_outliner/CMakeLists.txt
@@ -48,10 +48,17 @@ set(SRC
outliner_intern.h
)
+set(LIB
+ bf_editor_armature
+ bf_editor_object
+ bf_physics
+ bf_editor_space_sequencer
+)
+
if(WITH_INTERNATIONAL)
add_definitions(-DWITH_INTERNATIONAL)
endif()
add_definitions(${GL_DEFINITIONS})
-blender_add_lib(bf_editor_space_outliner "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_editor_space_outliner "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/space_script/CMakeLists.txt b/source/blender/editors/space_script/CMakeLists.txt
index 2eb31576c57..cdb9aff820b 100644
--- a/source/blender/editors/space_script/CMakeLists.txt
+++ b/source/blender/editors/space_script/CMakeLists.txt
@@ -51,4 +51,4 @@ endif()
add_definitions(${GL_DEFINITIONS})
-blender_add_lib(bf_editor_space_script "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_editor_space_script "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/space_sequencer/CMakeLists.txt b/source/blender/editors/space_sequencer/CMakeLists.txt
index 778ccf902d1..3c8ea3ed2f7 100644
--- a/source/blender/editors/space_sequencer/CMakeLists.txt
+++ b/source/blender/editors/space_sequencer/CMakeLists.txt
@@ -52,6 +52,10 @@ set(SRC
sequencer_intern.h
)
+set(LIB
+ bf_editor_interface
+)
+
if(WITH_AUDASPACE)
add_definitions(${AUDASPACE_DEFINITIONS})
@@ -66,4 +70,4 @@ endif()
add_definitions(${GL_DEFINITIONS})
-blender_add_lib(bf_editor_space_sequencer "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_editor_space_sequencer "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/space_text/CMakeLists.txt b/source/blender/editors/space_text/CMakeLists.txt
index de85ddc40ab..5fd3fde8905 100644
--- a/source/blender/editors/space_text/CMakeLists.txt
+++ b/source/blender/editors/space_text/CMakeLists.txt
@@ -51,6 +51,10 @@ set(SRC
text_intern.h
)
+set(LIB
+ bf_blenkernel
+)
+
add_definitions(${GL_DEFINITIONS})
if(WITH_PYTHON)
@@ -64,4 +68,4 @@ if(WITH_INTERNATIONAL)
add_definitions(-DWITH_INTERNATIONAL)
endif()
-blender_add_lib(bf_editor_space_text "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_editor_space_text "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/space_time/CMakeLists.txt b/source/blender/editors/space_time/CMakeLists.txt
index 90af405eaa8..37a7e6fa6f5 100644
--- a/source/blender/editors/space_time/CMakeLists.txt
+++ b/source/blender/editors/space_time/CMakeLists.txt
@@ -43,4 +43,4 @@ set(SRC
add_definitions(${GL_DEFINITIONS})
-blender_add_lib(bf_editor_space_time "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_editor_space_time "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/space_userpref/CMakeLists.txt b/source/blender/editors/space_userpref/CMakeLists.txt
index bd82ef13cd7..22062d7a8eb 100644
--- a/source/blender/editors/space_userpref/CMakeLists.txt
+++ b/source/blender/editors/space_userpref/CMakeLists.txt
@@ -39,4 +39,4 @@ set(SRC
userpref_intern.h
)
-blender_add_lib(bf_editor_space_userpref "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_editor_space_userpref "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/space_view3d/CMakeLists.txt b/source/blender/editors/space_view3d/CMakeLists.txt
index 059b384a9e2..fd84f3a3ba0 100644
--- a/source/blender/editors/space_view3d/CMakeLists.txt
+++ b/source/blender/editors/space_view3d/CMakeLists.txt
@@ -68,6 +68,17 @@ set(SRC
view3d_intern.h
)
+set(LIB
+ bf_editor_animation
+ bf_editor_gpencil
+ bf_editor_space_api
+ bf_editor_transform
+ bf_editor_util
+ bf_editor_uvedit
+ bf_gpu
+ bf_python_ext
+)
+
if(WITH_PYTHON)
blender_include_dirs(../../python)
add_definitions(-DWITH_PYTHON)
@@ -94,4 +105,4 @@ if(WITH_LEGACY_DEPSGRAPH)
add_definitions(-DWITH_LEGACY_DEPSGRAPH)
endif()
-blender_add_lib(bf_editor_space_view3d "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_editor_space_view3d "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/transform/CMakeLists.txt b/source/blender/editors/transform/CMakeLists.txt
index 42aa6a0a3a3..1c36e83aeb3 100644
--- a/source/blender/editors/transform/CMakeLists.txt
+++ b/source/blender/editors/transform/CMakeLists.txt
@@ -52,6 +52,10 @@ set(SRC
transform.h
)
+set(LIB
+ bf_editor_space_nla
+)
+
if(WITH_INTERNATIONAL)
add_definitions(-DWITH_INTERNATIONAL)
endif()
@@ -62,4 +66,4 @@ endif()
add_definitions(${GL_DEFINITIONS})
-blender_add_lib(bf_editor_transform "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_editor_transform "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/util/CMakeLists.txt b/source/blender/editors/util/CMakeLists.txt
index 7de788dca56..beac9b8043e 100644
--- a/source/blender/editors/util/CMakeLists.txt
+++ b/source/blender/editors/util/CMakeLists.txt
@@ -95,6 +95,26 @@ set(SRC
../include/UI_view2d.h
)
+set(LIB
+ bf_editor_armature
+ bf_editor_curve
+ bf_editor_gpencil
+ bf_editor_interface
+ bf_editor_mesh
+ bf_editor_metaball
+ bf_editor_object
+ bf_editor_physics
+ bf_editor_render
+ bf_editor_screen
+ bf_editor_sculpt_paint
+ bf_editor_space_buttons
+ bf_editor_space_node
+ bf_editor_space_outliner
+ bf_editor_space_text
+ bf_editor_space_view3d
+ bf_blenkernel
+)
+
add_definitions(${GL_DEFINITIONS})
if(WITH_INTERNATIONAL)
@@ -108,4 +128,4 @@ if(WITH_PYTHON)
)
endif()
-blender_add_lib(bf_editor_util "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_editor_util "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/uvedit/CMakeLists.txt b/source/blender/editors/uvedit/CMakeLists.txt
index a90763eed4e..7a6d688bdeb 100644
--- a/source/blender/editors/uvedit/CMakeLists.txt
+++ b/source/blender/editors/uvedit/CMakeLists.txt
@@ -48,17 +48,25 @@ set(SRC
uvedit_parametrizer.h
)
+set(LIB
+ bf_editor_object
+ bf_blenlib
+)
+
if(WITH_INTERNATIONAL)
add_definitions(-DWITH_INTERNATIONAL)
endif()
if(WITH_OPENNL)
- add_definitions(-DWITH_OPENNL)
list(APPEND INC_SYS
../../../../intern/opennl/extern
)
+ list(APPEND LIB
+ bf_intern_opennl
+ )
+ add_definitions(-DWITH_OPENNL)
endif()
add_definitions(${GL_DEFINITIONS})
-blender_add_lib(bf_editor_uvedit "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_editor_uvedit "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/freestyle/CMakeLists.txt b/source/blender/freestyle/CMakeLists.txt
index c14a5c53734..416f84cce28 100644
--- a/source/blender/freestyle/CMakeLists.txt
+++ b/source/blender/freestyle/CMakeLists.txt
@@ -580,4 +580,4 @@ if(WIN32)
)
endif()
-blender_add_lib(bf_freestyle "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_freestyle "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/gpu/CMakeLists.txt b/source/blender/gpu/CMakeLists.txt
index 328623f884f..871775fadfd 100644
--- a/source/blender/gpu/CMakeLists.txt
+++ b/source/blender/gpu/CMakeLists.txt
@@ -92,6 +92,10 @@ set(SRC
intern/gpu_private.h
)
+set(LIB
+
+)
+
data_to_c_simple(shaders/gpu_shader_geometry.glsl SRC)
data_to_c_simple(shaders/gpu_program_smoke_frag.glsl SRC)
data_to_c_simple(shaders/gpu_program_smoke_color_frag.glsl SRC)
@@ -119,6 +123,9 @@ if(WITH_GAMEENGINE)
endif()
if(WITH_MOD_SMOKE)
+ list(APPEND LIB
+ bf_intern_smoke
+ )
add_definitions(-DWITH_SMOKE)
endif()
@@ -132,5 +139,5 @@ if(WITH_OPENSUBDIV)
add_definitions(-DWITH_OPENSUBDIV)
endif()
-blender_add_lib(bf_gpu "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_gpu "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/ikplugin/CMakeLists.txt b/source/blender/ikplugin/CMakeLists.txt
index 8991e113410..4da5c73885e 100644
--- a/source/blender/ikplugin/CMakeLists.txt
+++ b/source/blender/ikplugin/CMakeLists.txt
@@ -44,6 +44,11 @@ set(SRC
intern/ikplugin_api.h
)
+set(LIB
+
+)
+
+
if(WITH_IK_SOLVER)
add_definitions(-DWITH_IK_SOLVER)
list(APPEND INC
@@ -53,6 +58,9 @@ if(WITH_IK_SOLVER)
intern/iksolver_plugin.c
intern/iksolver_plugin.h
)
+ list(APPEND LIB
+ bf_intern_iksolver
+ )
endif()
if(WITH_IK_ITASC)
@@ -67,6 +75,9 @@ if(WITH_IK_ITASC)
intern/itasc_plugin.cpp
intern/itasc_plugin.h
)
+ list(APPEND LIB
+ bf_intern_itasc
+ )
endif()
-blender_add_lib(bf_ikplugin "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_ikplugin "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/imbuf/CMakeLists.txt b/source/blender/imbuf/CMakeLists.txt
index 295a48dc245..bac3c921584 100644
--- a/source/blender/imbuf/CMakeLists.txt
+++ b/source/blender/imbuf/CMakeLists.txt
@@ -88,6 +88,11 @@ set(SRC
../../../intern/ffmpeg/ffmpeg_compat.h
)
+set(LIB
+ bf_blenfont
+ bf_intern_opencolorio
+)
+
if(WITH_IMAGE_OPENEXR)
add_definitions(-DWITH_OPENEXR)
else()
@@ -109,6 +114,9 @@ endif()
if(WITH_OPENIMAGEIO)
+ list(APPEND LIB
+ bf_imbuf_openimageio
+ )
add_definitions(-DWITH_OPENIMAGEIO)
endif()
@@ -119,7 +127,9 @@ if(WITH_IMAGE_OPENJPEG)
list(APPEND SRC
intern/jp2.c
)
-
+ list(APPEND LIB
+ ${OPENJPEG_LIBRARIES}
+ )
add_definitions(-DWITH_OPENJPEG ${OPENJPEG_DEFINES})
endif()
@@ -127,6 +137,9 @@ if(WITH_IMAGE_REDCODE)
list(APPEND INC_SYS
${REDCODE_INC}
)
+ list(APPEND LIB
+ extern_redcode
+ )
add_definitions(-DWITH_REDCODE)
endif()
@@ -164,10 +177,16 @@ if(WITH_CODEC_FFMPEG)
endif()
if(WITH_IMAGE_DDS)
+ list(APPEND LIB
+ bf_imbuf_dds
+ )
add_definitions(-DWITH_DDS)
endif()
if(WITH_IMAGE_CINEON)
+ list(APPEND LIB
+ bf_imbuf_cineon
+ )
add_definitions(-DWITH_CINEON)
endif()
@@ -188,4 +207,4 @@ if(WIN32)
)
endif()
-blender_add_lib(bf_imbuf "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_imbuf "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/imbuf/intern/cineon/CMakeLists.txt b/source/blender/imbuf/intern/cineon/CMakeLists.txt
index c96db4e4a3d..d28c1c04e28 100644
--- a/source/blender/imbuf/intern/cineon/CMakeLists.txt
+++ b/source/blender/imbuf/intern/cineon/CMakeLists.txt
@@ -55,4 +55,4 @@ if(WITH_IMAGE_CINEON)
add_definitions(-DWITH_CINEON)
endif()
-blender_add_lib(bf_imbuf_cineon "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_imbuf_cineon "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/imbuf/intern/dds/CMakeLists.txt b/source/blender/imbuf/intern/dds/CMakeLists.txt
index 57603725ce1..f4468aa23f4 100644
--- a/source/blender/imbuf/intern/dds/CMakeLists.txt
+++ b/source/blender/imbuf/intern/dds/CMakeLists.txt
@@ -63,4 +63,4 @@ if(WITH_IMAGE_DDS)
add_definitions(-DWITH_DDS)
endif()
-blender_add_lib(bf_imbuf_dds "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_imbuf_dds "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/imbuf/intern/oiio/CMakeLists.txt b/source/blender/imbuf/intern/oiio/CMakeLists.txt
index c873fa3f32d..b2d6c2cbec0 100644
--- a/source/blender/imbuf/intern/oiio/CMakeLists.txt
+++ b/source/blender/imbuf/intern/oiio/CMakeLists.txt
@@ -52,4 +52,4 @@ if(WITH_OPENIMAGEIO)
add_definitions(-DWITH_OPENIMAGEIO)
endif()
-blender_add_lib(bf_imbuf_openimageio "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_imbuf_openimageio "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/imbuf/intern/openexr/CMakeLists.txt b/source/blender/imbuf/intern/openexr/CMakeLists.txt
index d5cb8e8a3b6..41ce5ed0a85 100644
--- a/source/blender/imbuf/intern/openexr/CMakeLists.txt
+++ b/source/blender/imbuf/intern/openexr/CMakeLists.txt
@@ -52,4 +52,4 @@ if(WITH_IMAGE_OPENEXR)
add_definitions(-DWITH_OPENEXR)
endif()
-blender_add_lib(bf_imbuf_openexr "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_imbuf_openexr "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/makesdna/intern/CMakeLists.txt b/source/blender/makesdna/intern/CMakeLists.txt
index 52487edfd2b..c167f56ecb4 100644
--- a/source/blender/makesdna/intern/CMakeLists.txt
+++ b/source/blender/makesdna/intern/CMakeLists.txt
@@ -80,7 +80,7 @@ set(SRC
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/dna.c PROPERTIES GENERATED TRUE)
-blender_add_lib(bf_dna "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_dna "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
# -----------------------------------------------------------------------------
@@ -100,4 +100,4 @@ set(SRC
../../blenlib/intern/hash_mm2a.c
)
-blender_add_lib(bf_dna_blenlib "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_dna_blenlib "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt
index 987b594421f..cb8be841073 100644
--- a/source/blender/makesrna/intern/CMakeLists.txt
+++ b/source/blender/makesrna/intern/CMakeLists.txt
@@ -173,11 +173,17 @@ set(INC_SYS
)
+set(LIB
+)
+
if(WITH_CYCLES)
add_definitions(-DWITH_CYCLES)
if(WITH_CYCLES_DEBUG)
add_definitions(-DWITH_CYCLES_DEBUG)
endif()
+ list(APPEND LIB
+ bf_intern_cycles
+ )
endif()
if(WITH_PYTHON)
@@ -346,6 +352,7 @@ add_executable(makesrna ${SRC} ${SRC_RNA_INC} ${SRC_DNA_INC})
target_link_libraries(makesrna bf_dna)
target_link_libraries(makesrna bf_dna_blenlib)
+
# Output rna_*_gen.c
# note (linux only): with crashes try add this after COMMAND: valgrind --leak-check=full --track-origins=yes
add_custom_command(
@@ -367,4 +374,4 @@ set(SRC
add_definitions(${GL_DEFINITIONS})
-blender_add_lib(bf_rna "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_rna "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/modifiers/CMakeLists.txt b/source/blender/modifiers/CMakeLists.txt
index ad230dede24..c350ea20a78 100644
--- a/source/blender/modifiers/CMakeLists.txt
+++ b/source/blender/modifiers/CMakeLists.txt
@@ -111,6 +111,10 @@ set(SRC
intern/MOD_weightvg_util.h
)
+set(LIB
+ bf_blenkernel
+)
+
if(WITH_MOD_BOOLEAN)
add_definitions(-DWITH_MOD_BOOLEAN)
list(APPEND SRC
@@ -119,6 +123,9 @@ if(WITH_MOD_BOOLEAN)
list(APPEND INC
../../../extern/carve
)
+ list(APPEND LIB
+ extern_carve
+ )
endif()
if(WITH_MOD_REMESH)
@@ -126,6 +133,9 @@ if(WITH_MOD_REMESH)
list(APPEND INC
../../../intern/dualcon
)
+list(APPEND LIB
+ bf_intern_dualcon
+)
endif()
if(WITH_MOD_FLUID)
@@ -155,4 +165,4 @@ if(WITH_OPENSUBDIV)
add_definitions(-DWITH_OPENSUBDIV)
endif()
-blender_add_lib(bf_modifiers "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_modifiers "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/nodes/CMakeLists.txt b/source/blender/nodes/CMakeLists.txt
index d20881df150..42b56f3fd93 100644
--- a/source/blender/nodes/CMakeLists.txt
+++ b/source/blender/nodes/CMakeLists.txt
@@ -292,4 +292,4 @@ if(WITH_CYCLES AND WITH_CYCLES_DEBUG)
add_definitions(-DWITH_CYCLES_DEBUG)
endif()
-blender_add_lib(bf_nodes "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_nodes "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/physics/CMakeLists.txt b/source/blender/physics/CMakeLists.txt
index 08ff1faca49..55f560245ef 100644
--- a/source/blender/physics/CMakeLists.txt
+++ b/source/blender/physics/CMakeLists.txt
@@ -50,4 +50,4 @@ set(SRC
BPH_mass_spring.h
)
-blender_add_lib(bf_physics "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_physics "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/python/bmesh/CMakeLists.txt b/source/blender/python/bmesh/CMakeLists.txt
index c7b86acc8f9..d67fbd5b811 100644
--- a/source/blender/python/bmesh/CMakeLists.txt
+++ b/source/blender/python/bmesh/CMakeLists.txt
@@ -53,8 +53,12 @@ set(SRC
bmesh_py_utils.h
)
+set(LIB
+ bf_python_mathutils
+)
+
if(WITH_FREESTYLE)
add_definitions(-DWITH_FREESTYLE)
endif()
-blender_add_lib(bf_python_bmesh "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_python_bmesh "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/python/generic/CMakeLists.txt b/source/blender/python/generic/CMakeLists.txt
index df611e00d00..5172f54c190 100644
--- a/source/blender/python/generic/CMakeLists.txt
+++ b/source/blender/python/generic/CMakeLists.txt
@@ -53,4 +53,4 @@ set(SRC
add_definitions(${GL_DEFINITIONS})
-blender_add_lib(bf_python_ext "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_python_ext "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/python/intern/CMakeLists.txt b/source/blender/python/intern/CMakeLists.txt
index f04bca75a8c..7584e488d6b 100644
--- a/source/blender/python/intern/CMakeLists.txt
+++ b/source/blender/python/intern/CMakeLists.txt
@@ -102,6 +102,10 @@ set(SRC
../BPY_extern.h
)
+set(LIB
+ bf_python_ext
+)
+
# only to check if buildinfo is available
if(WITH_BUILDINFO)
add_definitions(-DBUILD_DATE)
@@ -278,4 +282,4 @@ endif()
add_definitions(${GL_DEFINITIONS})
-blender_add_lib(bf_python "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_python "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/python/mathutils/CMakeLists.txt b/source/blender/python/mathutils/CMakeLists.txt
index f70f893aeac..717039bbb3b 100644
--- a/source/blender/python/mathutils/CMakeLists.txt
+++ b/source/blender/python/mathutils/CMakeLists.txt
@@ -57,5 +57,8 @@ set(SRC
mathutils_noise.h
)
+set(LIB
+ bf_blenlib
+)
-blender_add_lib(bf_python_mathutils "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_python_mathutils "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/quicktime/CMakeLists.txt b/source/blender/quicktime/CMakeLists.txt
index f853c35457f..28dd939811f 100644
--- a/source/blender/quicktime/CMakeLists.txt
+++ b/source/blender/quicktime/CMakeLists.txt
@@ -59,4 +59,4 @@ if(WITH_AUDASPACE)
)
endif()
-blender_add_lib(bf_quicktime "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_quicktime "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/render/CMakeLists.txt b/source/blender/render/CMakeLists.txt
index 9e40ab02ee4..a171bd8627f 100644
--- a/source/blender/render/CMakeLists.txt
+++ b/source/blender/render/CMakeLists.txt
@@ -124,6 +124,10 @@ set(SRC
intern/raytrace/vbvh.h
)
+set(LIB
+
+)
+
if(WITH_PYTHON)
add_definitions(-DWITH_PYTHON)
list(APPEND INC
@@ -136,6 +140,9 @@ if(WITH_IMAGE_OPENEXR)
endif()
if(WITH_MOD_SMOKE)
+ list(APPEND LIB
+ bf_intern_smoke
+ )
add_definitions(-DWITH_SMOKE)
endif()
@@ -176,4 +183,4 @@ if(APPLE)
endif()
endif()
-blender_add_lib_nolist(bf_render "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_render "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/windowmanager/CMakeLists.txt b/source/blender/windowmanager/CMakeLists.txt
index eaea70adc83..59213d4a33a 100644
--- a/source/blender/windowmanager/CMakeLists.txt
+++ b/source/blender/windowmanager/CMakeLists.txt
@@ -80,6 +80,12 @@ set(SRC
wm_window.h
)
+set(LIB
+ bf_intern_ghost
+ bf_intern_memutil
+ bf_editor_util
+)
+
if(WITH_AUDASPACE)
add_definitions(${AUDASPACE_DEFINITIONS})
@@ -151,7 +157,10 @@ if(WIN32)
endif()
if(WITH_COMPOSITOR)
+ list(APPEND LIB
+ bf_compositor
+ )
add_definitions(-DWITH_COMPOSITOR)
endif()
-blender_add_lib_nolist(bf_windowmanager "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(bf_windowmanager "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index 08390b585ac..bcf3b97798b 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -1048,8 +1048,21 @@ unset(BLENDER_TEXT_FILES_DESTINATION)
add_dependencies(blender makesdna)
-setup_blender_sorted_libs()
-target_link_libraries(blender ${BLENDER_SORTED_LIBS})
+# setup_blender_sorted_libs()
+target_link_libraries(
+ blender
+ bf_windowmanager
+ bf_render
+ bf_blenlib
+ bf_blenkernel
+ )
+
+if(WITH_CYCLES)
+ target_link_libraries(
+ blender
+ bf_intern_cycles
+ )
+endif()
setup_liblinks(blender)
diff --git a/source/gameengine/BlenderRoutines/CMakeLists.txt b/source/gameengine/BlenderRoutines/CMakeLists.txt
index aaeb2e10462..2c87946671e 100644
--- a/source/gameengine/BlenderRoutines/CMakeLists.txt
+++ b/source/gameengine/BlenderRoutines/CMakeLists.txt
@@ -75,4 +75,4 @@ if(WITH_BULLET)
endif()
-blender_add_lib(ge_blen_routines "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(ge_blen_routines "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/gameengine/Converter/CMakeLists.txt b/source/gameengine/Converter/CMakeLists.txt
index 4db9fcebd06..01b215bc92a 100644
--- a/source/gameengine/Converter/CMakeLists.txt
+++ b/source/gameengine/Converter/CMakeLists.txt
@@ -120,4 +120,4 @@ if(WITH_AUDASPACE)
)
endif()
-blender_add_lib(ge_converter "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(ge_converter "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/gameengine/Expressions/CMakeLists.txt b/source/gameengine/Expressions/CMakeLists.txt
index 9c563a46ea2..082978c989e 100644
--- a/source/gameengine/Expressions/CMakeLists.txt
+++ b/source/gameengine/Expressions/CMakeLists.txt
@@ -88,4 +88,4 @@ if(WITH_PYTHON)
)
endif()
-blender_add_lib(ge_logic_expressions "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(ge_logic_expressions "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/gameengine/GameLogic/CMakeLists.txt b/source/gameengine/GameLogic/CMakeLists.txt
index 05071f59707..abcd9d36680 100644
--- a/source/gameengine/GameLogic/CMakeLists.txt
+++ b/source/gameengine/GameLogic/CMakeLists.txt
@@ -141,4 +141,4 @@ if(WITH_SDL)
endif()
endif()
-blender_add_lib(ge_logic "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(ge_logic "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/gameengine/Ketsji/CMakeLists.txt b/source/gameengine/Ketsji/CMakeLists.txt
index 417f54cc8b9..b282584f651 100644
--- a/source/gameengine/Ketsji/CMakeLists.txt
+++ b/source/gameengine/Ketsji/CMakeLists.txt
@@ -262,4 +262,4 @@ if(WITH_BULLET)
add_definitions(-DWITH_BULLET)
endif()
-blender_add_lib(ge_logic_ketsji "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(ge_logic_ketsji "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/gameengine/Ketsji/KXNetwork/CMakeLists.txt b/source/gameengine/Ketsji/KXNetwork/CMakeLists.txt
index cfc6ded4e65..77d4b545414 100644
--- a/source/gameengine/Ketsji/KXNetwork/CMakeLists.txt
+++ b/source/gameengine/Ketsji/KXNetwork/CMakeLists.txt
@@ -53,4 +53,4 @@ set(SRC
KX_NetworkObjectSensor.h
)
-blender_add_lib(ge_logic_network "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(ge_logic_network "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/gameengine/Network/CMakeLists.txt b/source/gameengine/Network/CMakeLists.txt
index 019fc3e6032..e17f4ab59fb 100644
--- a/source/gameengine/Network/CMakeLists.txt
+++ b/source/gameengine/Network/CMakeLists.txt
@@ -45,4 +45,4 @@ set(SRC
NG_NetworkScene.h
)
-blender_add_lib(ge_logic_ngnetwork "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(ge_logic_ngnetwork "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/gameengine/Network/LoopBackNetwork/CMakeLists.txt b/source/gameengine/Network/LoopBackNetwork/CMakeLists.txt
index 75877575614..66e5a7f2ac5 100644
--- a/source/gameengine/Network/LoopBackNetwork/CMakeLists.txt
+++ b/source/gameengine/Network/LoopBackNetwork/CMakeLists.txt
@@ -40,4 +40,4 @@ set(SRC
NG_LoopBackNetworkDeviceInterface.h
)
-blender_add_lib(ge_logic_loopbacknetwork "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(ge_logic_loopbacknetwork "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/gameengine/Physics/Bullet/CMakeLists.txt b/source/gameengine/Physics/Bullet/CMakeLists.txt
index e52dc1ba052..261c56965c1 100644
--- a/source/gameengine/Physics/Bullet/CMakeLists.txt
+++ b/source/gameengine/Physics/Bullet/CMakeLists.txt
@@ -69,4 +69,4 @@ endif()
add_definitions(${GL_DEFINITIONS})
-blender_add_lib(ge_phys_bullet "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(ge_phys_bullet "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/gameengine/Physics/Dummy/CMakeLists.txt b/source/gameengine/Physics/Dummy/CMakeLists.txt
index 692331f1ce4..0286b986e30 100644
--- a/source/gameengine/Physics/Dummy/CMakeLists.txt
+++ b/source/gameengine/Physics/Dummy/CMakeLists.txt
@@ -38,4 +38,4 @@ set(SRC
DummyPhysicsEnvironment.h
)
-blender_add_lib(ge_phys_dummy "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(ge_phys_dummy "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/gameengine/Rasterizer/CMakeLists.txt b/source/gameengine/Rasterizer/CMakeLists.txt
index 5bc3f22e327..923fc0ba106 100644
--- a/source/gameengine/Rasterizer/CMakeLists.txt
+++ b/source/gameengine/Rasterizer/CMakeLists.txt
@@ -84,4 +84,4 @@ set(SRC
add_definitions(${GL_DEFINITIONS})
-blender_add_lib(ge_rasterizer "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(ge_rasterizer "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt
index 888a7114f50..68416fb82cb 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt
+++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt
@@ -69,4 +69,4 @@ set(SRC
add_definitions(${GL_DEFINITIONS})
-blender_add_lib(ge_oglrasterizer "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(ge_oglrasterizer "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/gameengine/SceneGraph/CMakeLists.txt b/source/gameengine/SceneGraph/CMakeLists.txt
index bbad429bbcd..731fe602d8c 100644
--- a/source/gameengine/SceneGraph/CMakeLists.txt
+++ b/source/gameengine/SceneGraph/CMakeLists.txt
@@ -50,4 +50,4 @@ set(SRC
SG_Tree.h
)
-blender_add_lib(ge_scenegraph "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(ge_scenegraph "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/gameengine/VideoTexture/CMakeLists.txt b/source/gameengine/VideoTexture/CMakeLists.txt
index 4be9a9abe5c..7ddc2849d3d 100644
--- a/source/gameengine/VideoTexture/CMakeLists.txt
+++ b/source/gameengine/VideoTexture/CMakeLists.txt
@@ -103,4 +103,4 @@ if(WITH_CODEC_FFMPEG)
)
endif()
-blender_add_lib(ge_videotex "${SRC}" "${INC}" "${INC_SYS}")
+blender_add_lib(ge_videotex "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/tests/gtests/testing/CMakeLists.txt b/tests/gtests/testing/CMakeLists.txt
index 0e5da492ed2..32d4ccd9a1e 100644
--- a/tests/gtests/testing/CMakeLists.txt
+++ b/tests/gtests/testing/CMakeLists.txt
@@ -47,4 +47,8 @@ set(SRC
testing.h
)
-blender_add_lib(bf_testing_main "${SRC}" "${INC}" "${INC_SYS}")
+set(LIB
+
+)
+
+blender_add_lib(bf_testing_main "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")