mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
CMake: Build Python binary modules as MODULE, never SHARED
This commit is contained in:
parent
411e0ee93f
commit
cfd603bb8d
@ -286,7 +286,11 @@ function(add_python_module module)
|
|||||||
COMMENT "Generating module ${module}"
|
COMMENT "Generating module ${module}"
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(${module} "${module}_module.cxx" ${sources})
|
if(BUILD_SHARED_LIBS)
|
||||||
|
add_library(${module} MODULE "${module}_module.cxx" ${sources})
|
||||||
|
else()
|
||||||
|
add_library(${module} STATIC "${module}_module.cxx" ${sources})
|
||||||
|
endif()
|
||||||
target_link_libraries(${module}
|
target_link_libraries(${module}
|
||||||
${link_targets} ${PYTHON_LIBRARIES} p3interrogatedb)
|
${link_targets} ${PYTHON_LIBRARIES} p3interrogatedb)
|
||||||
|
|
||||||
|
@ -1,9 +1,15 @@
|
|||||||
add_definitions(-DBUILDING_DTOOLCONFIG)
|
add_definitions(-DBUILDING_DTOOLCONFIG)
|
||||||
|
|
||||||
if(HAVE_PYTHON)
|
if(BUILD_SHARED_LIBS)
|
||||||
add_library(p3dtoolconfig dtoolconfig.cxx pydtool.cxx)
|
set(libtype MODULE)
|
||||||
else()
|
else()
|
||||||
add_library(p3dtoolconfig dtoolconfig.cxx)
|
set(libtype STATIC)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(HAVE_PYTHON)
|
||||||
|
add_library(p3dtoolconfig ${libtype} dtoolconfig.cxx pydtool.cxx)
|
||||||
|
else()
|
||||||
|
add_library(p3dtoolconfig ${libtype} dtoolconfig.cxx)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_use_packages(p3dtoolconfig PYTHON)
|
target_use_packages(p3dtoolconfig PYTHON)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user