mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -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}"
|
||||
)
|
||||
|
||||
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}
|
||||
${link_targets} ${PYTHON_LIBRARIES} p3interrogatedb)
|
||||
|
||||
|
@ -1,9 +1,15 @@
|
||||
add_definitions(-DBUILDING_DTOOLCONFIG)
|
||||
|
||||
if(HAVE_PYTHON)
|
||||
add_library(p3dtoolconfig dtoolconfig.cxx pydtool.cxx)
|
||||
if(BUILD_SHARED_LIBS)
|
||||
set(libtype MODULE)
|
||||
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()
|
||||
|
||||
target_use_packages(p3dtoolconfig PYTHON)
|
||||
|
Loading…
x
Reference in New Issue
Block a user