Build: limit Py_ENABLE_SHARED to modules using Python headers
And remove Python flags from nodes, no longer needed.
This commit is contained in:
@@ -1271,7 +1271,6 @@ endif()
|
||||
# Configure Python
|
||||
|
||||
if(WITH_PYTHON_MODULE)
|
||||
add_definitions(-DPy_ENABLE_SHARED)
|
||||
# Not currently supported due to different required Python link flags.
|
||||
if(WITH_GTESTS)
|
||||
message(STATUS "GTests not compatible with Python module, disabling WITH_GTESTS")
|
||||
|
||||
@@ -561,6 +561,10 @@ set(INC_SYS
|
||||
|
||||
add_definitions(-DWITH_FREESTYLE)
|
||||
|
||||
if(WITH_PYTHON_MODULE)
|
||||
add_definitions(-DPy_ENABLE_SHARED)
|
||||
endif()
|
||||
|
||||
if(WITH_PYTHON_SAFETY)
|
||||
# For bpy_rna.h access.
|
||||
add_definitions(-DWITH_PYTHON_SAFETY)
|
||||
|
||||
@@ -102,20 +102,6 @@ if(WITH_BULLET)
|
||||
add_definitions(-DWITH_BULLET)
|
||||
endif()
|
||||
|
||||
if(WITH_PYTHON)
|
||||
list(APPEND INC
|
||||
../python
|
||||
)
|
||||
list(APPEND INC_SYS
|
||||
${PYTHON_INCLUDE_DIRS}
|
||||
)
|
||||
list(APPEND LIB
|
||||
${PYTHON_LINKFLAGS}
|
||||
${PYTHON_LIBRARIES}
|
||||
)
|
||||
add_definitions(-DWITH_PYTHON)
|
||||
endif()
|
||||
|
||||
if(WITH_TBB)
|
||||
list(APPEND INC_SYS
|
||||
${TBB_INCLUDE_DIRS}
|
||||
|
||||
@@ -188,20 +188,6 @@ if(WITH_BULLET)
|
||||
add_definitions(-DWITH_BULLET)
|
||||
endif()
|
||||
|
||||
if(WITH_PYTHON)
|
||||
list(APPEND INC
|
||||
../../python
|
||||
)
|
||||
list(APPEND INC_SYS
|
||||
${PYTHON_INCLUDE_DIRS}
|
||||
)
|
||||
list(APPEND LIB
|
||||
${PYTHON_LINKFLAGS}
|
||||
${PYTHON_LIBRARIES}
|
||||
)
|
||||
add_definitions(-DWITH_PYTHON)
|
||||
endif()
|
||||
|
||||
if(WITH_TBB)
|
||||
list(APPEND INC_SYS
|
||||
${TBB_INCLUDE_DIRS}
|
||||
|
||||
@@ -132,20 +132,6 @@ set(LIB
|
||||
bf_nodes
|
||||
)
|
||||
|
||||
if(WITH_PYTHON)
|
||||
list(APPEND INC
|
||||
../../python
|
||||
)
|
||||
list(APPEND INC_SYS
|
||||
${PYTHON_INCLUDE_DIRS}
|
||||
)
|
||||
list(APPEND LIB
|
||||
${PYTHON_LINKFLAGS}
|
||||
${PYTHON_LIBRARIES}
|
||||
)
|
||||
add_definitions(-DWITH_PYTHON)
|
||||
endif()
|
||||
|
||||
if(WITH_FREESTYLE)
|
||||
add_definitions(-DWITH_FREESTYLE)
|
||||
endif()
|
||||
|
||||
@@ -57,21 +57,6 @@ set(LIB
|
||||
bf_nodes
|
||||
)
|
||||
|
||||
if(WITH_PYTHON)
|
||||
list(APPEND INC
|
||||
../../python
|
||||
)
|
||||
list(APPEND INC_SYS
|
||||
${PYTHON_INCLUDE_DIRS}
|
||||
)
|
||||
list(APPEND LIB
|
||||
${PYTHON_LINKFLAGS}
|
||||
${PYTHON_LIBRARIES}
|
||||
)
|
||||
add_definitions(-DWITH_PYTHON)
|
||||
endif()
|
||||
|
||||
|
||||
blender_add_lib(bf_nodes_texture "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
||||
|
||||
# RNA_prototypes.h
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
if(WITH_PYTHON_MODULE)
|
||||
add_definitions(-DPy_ENABLE_SHARED)
|
||||
endif()
|
||||
|
||||
add_subdirectory(intern)
|
||||
add_subdirectory(generic)
|
||||
add_subdirectory(gpu)
|
||||
|
||||
Reference in New Issue
Block a user