mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 17:35:34 -04:00
CMake: Make Python static library names use '.'
This is to be consistent with makepanda as of cedd4172c4e.
This commit is contained in:
parent
aa9a195665
commit
18d5c983de
@ -42,7 +42,6 @@ function(add_python_target target)
|
|||||||
endforeach(arg)
|
endforeach(arg)
|
||||||
|
|
||||||
string(REGEX REPLACE "\\.[^.]+$" "" namespace "${target}")
|
string(REGEX REPLACE "\\.[^.]+$" "" namespace "${target}")
|
||||||
string(REPLACE "." "_" underscore_namespace "${namespace}")
|
|
||||||
string(REPLACE "." "/" slash_namespace "${namespace}")
|
string(REPLACE "." "/" slash_namespace "${namespace}")
|
||||||
|
|
||||||
add_library(${target} ${MODULE_TYPE} ${sources})
|
add_library(${target} ${MODULE_TYPE} ${sources})
|
||||||
@ -61,13 +60,13 @@ function(add_python_target target)
|
|||||||
else()
|
else()
|
||||||
set_target_properties(${target} PROPERTIES
|
set_target_properties(${target} PROPERTIES
|
||||||
OUTPUT_NAME "${basename}"
|
OUTPUT_NAME "${basename}"
|
||||||
PREFIX "libpython_${underscore_namespace}_")
|
PREFIX "libpy.${namespace}.")
|
||||||
|
|
||||||
install(TARGETS ${target} EXPORT "${export}" COMPONENT "${component}" DESTINATION lib)
|
install(TARGETS ${target} EXPORT "${export}" COMPONENT "${component}" DESTINATION lib)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(keywords OVERWRITE ARCH)
|
set(keywords OVERWRITE ARCH)
|
||||||
if(NOT underscore_namespace MATCHES ".*_.*")
|
if(NOT slash_namespace MATCHES ".*/.*")
|
||||||
list(APPEND keywords ROOT)
|
list(APPEND keywords ROOT)
|
||||||
endif()
|
endif()
|
||||||
ensure_python_init("${PROJECT_BINARY_DIR}/${slash_namespace}" ${keywords})
|
ensure_python_init("${PROJECT_BINARY_DIR}/${slash_namespace}" ${keywords})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user