vcpkg/ports/pybind11/fix-debug-link.patch
JonLiu1993 4ce46ddf46
[pybind11] Fix debug link failure (#31318)
* Fix debug link failure

* update version

* update version

---------

Co-authored-by: Zhao Liu <v-zhli17@microsoft.com>
2023-07-14 16:37:14 -07:00

13 lines
632 B
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0d93203..031088a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -196,6 +196,7 @@ if(NOT TARGET pybind11_headers)
target_compile_features(pybind11_headers INTERFACE cxx_inheriting_constructors cxx_user_literals
cxx_right_angle_brackets)
+ target_compile_definitions (pybind11_headers INTERFACE $<$<CONFIG:Debug>:Py_DEBUG>)
if(NOT "${PYBIND11_INTERNALS_VERSION}" STREQUAL "")
target_compile_definitions(
pybind11_headers INTERFACE "PYBIND11_INTERNALS_VERSION=${PYBIND11_INTERNALS_VERSION}")