mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-26 14:43:50 -04:00
CMake: Don't link to mimalloc if it is not enabled
This commit is contained in:
parent
d6ebd62034
commit
6e14591a8b
@ -94,12 +94,16 @@ add_component_library(p3dtoolbase NOINIT SYMBOL BUILDING_DTOOL_DTOOLBASE
|
||||
target_include_directories(p3dtoolbase PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
|
||||
$<BUILD_INTERFACE:${PANDA_OUTPUT_DIR}/include>)
|
||||
target_link_libraries(p3dtoolbase PKG::EIGEN PKG::THREADS PKG::MIMALLOC)
|
||||
target_link_libraries(p3dtoolbase PKG::EIGEN PKG::THREADS)
|
||||
target_interrogate(p3dtoolbase ${P3DTOOLBASE_SOURCES} EXTENSIONS ${P3DTOOLBASE_IGATEEXT})
|
||||
|
||||
if(HAVE_MIMALLOC AND CMAKE_CXX_COMPILER_ID MATCHES "^(GNU|Clang)$")
|
||||
# Do not re-export symbols from these libraries.
|
||||
target_link_options(p3dtoolbase PRIVATE "LINKER:--exclude-libs,libmimalloc.a")
|
||||
if(HAVE_MIMALLOC AND USE_MEMORY_MIMALLOC)
|
||||
target_link_libraries(p3dtoolbase PKG::MIMALLOC)
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "^(GNU|Clang)$")
|
||||
# Do not re-export symbols from these libraries.
|
||||
target_link_options(p3dtoolbase PRIVATE "LINKER:--exclude-libs,libmimalloc.a")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_METALIBS)
|
||||
|
Loading…
x
Reference in New Issue
Block a user