[Bf-blender-cvs] [daf290dcc80] master: CMake: fix linking Blender as a Python module

Campbell Barton noreply at git.blender.org
Tue Dec 10 13:16:28 CET 2019


Commit: daf290dcc80ce5b0904cb92c1696184e8c319ff9
Author: Campbell Barton
Date:   Tue Dec 10 23:12:47 2019 +1100
Branches: master
https://developer.blender.org/rBdaf290dcc80ce5b0904cb92c1696184e8c319ff9

CMake: fix linking Blender as a Python module

Remove direct links to Blender binary,
only link to the window manager and rely on indirect links
for everything else.

===================================================================

M	source/blender/editors/render/CMakeLists.txt
M	source/blender/editors/space_file/CMakeLists.txt
M	source/creator/CMakeLists.txt

===================================================================

diff --git a/source/blender/editors/render/CMakeLists.txt b/source/blender/editors/render/CMakeLists.txt
index 6c62dbcb3a2..7f7748bf52f 100644
--- a/source/blender/editors/render/CMakeLists.txt
+++ b/source/blender/editors/render/CMakeLists.txt
@@ -55,6 +55,10 @@ set(LIB
 
 if(WITH_HEADLESS)
   add_definitions(-DWITH_HEADLESS)
+else()
+  list(APPEND LIB
+    bf_editor_datafiles
+  )
 endif()
 
 add_definitions(${GL_DEFINITIONS})
diff --git a/source/blender/editors/space_file/CMakeLists.txt b/source/blender/editors/space_file/CMakeLists.txt
index 33f57b9c235..84df11ea39c 100644
--- a/source/blender/editors/space_file/CMakeLists.txt
+++ b/source/blender/editors/space_file/CMakeLists.txt
@@ -57,6 +57,10 @@ set(LIB
 
 if(WITH_HEADLESS)
   add_definitions(-DWITH_HEADLESS)
+else()
+  list(APPEND LIB
+    bf_editor_datafiles
+  )
 endif()
 
 if(WITH_IMAGE_OPENEXR)
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index 3628c6efda9..01eac349b9c 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -38,17 +38,6 @@ blender_include_dirs(
 )
 
 set(LIB
-  bf_blenkernel
-  bf_blenloader
-  bf_depsgraph
-  bf_dna
-  bf_imbuf
-  bf_intern_clog
-  bf_intern_guardedalloc
-  bf_intern_memutil
-  bf_intern_opencolorio
-  bf_render
-  bf_rna
   bf_windowmanager
 )
 
@@ -69,9 +58,6 @@ if(WITH_CYCLES)
     blender_include_dirs(../../intern/cycles/blender)
     add_definitions(-DWITH_CYCLES_LOGGING)
   endif()
-  list(APPEND LIB
-    bf_intern_cycles
-  )
 endif()
 
 if(WITH_CODEC_FFMPEG)
@@ -86,9 +72,6 @@ endif()
 
 if(WITH_PYTHON)
   blender_include_dirs(../blender/python)
-  list(APPEND LIB
-    bf_python
-  )
   add_definitions(-DWITH_PYTHON)
 
   if(WITH_PYTHON_SECURITY)
@@ -110,17 +93,11 @@ endif()
 
 if(WITH_BINRELOC)
   blender_include_dirs(${BINRELOC_INCLUDE_DIRS})
-  list(APPEND LIB
-    extern_binreloc
-  )
   add_definitions(-DWITH_BINRELOC)
 endif()
 
 if(WITH_FREESTYLE)
   blender_include_dirs(../blender/freestyle)
-  list(APPEND LIB
-    bf_freestyle
-  )
   add_definitions(-DWITH_FREESTYLE)
 endif()



More information about the Bf-blender-cvs mailing list