Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
pybind11
Commits
1e4bd22b
Unverified
Commit
1e4bd22b
authored
May 18, 2022
by
Henry Schreiner
Committed by
GitHub
May 18, 2022
Browse files
fix(cmake): support release and debug at the same time (#3948)
parent
a8b3ff30
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
10 deletions
+25
-10
tools/pybind11Tools.cmake
tools/pybind11Tools.cmake
+25
-10
No files found.
tools/pybind11Tools.cmake
View file @
1e4bd22b
...
...
@@ -115,17 +115,32 @@ if(PYTHON_IS_DEBUG)
PROPERTY INTERFACE_COMPILE_DEFINITIONS Py_DEBUG
)
endif
()
set_property
(
if
(
CMAKE_VERSION VERSION_LESS 3.11
)
set_property
(
TARGET pybind11::module
APPEND
PROPERTY
INTERFACE_LINK_LIBRARIES pybind11::python_link_helper
"$<$<OR:$<PLATFORM_ID:Windows>,$<PLATFORM_ID:Cygwin>>:$<BUILD_INTERFACE:
${
PYTHON_LIBRARIES
}
>>"
)
INTERFACE_LINK_LIBRARIES
pybind11::python_link_helper
"$<$<OR:$<PLATFORM_ID:Windows>,$<PLATFORM_ID:Cygwin>>:$<BUILD_INTERFACE:
${
PYTHON_LIBRARIES
}
>>"
)
set_property
(
set_property
(
TARGET pybind11::embed
APPEND
PROPERTY INTERFACE_LINK_LIBRARIES pybind11::pybind11 $<BUILD_INTERFACE:
${
PYTHON_LIBRARIES
}
>
)
else
()
target_link_libraries
(
pybind11::module
INTERFACE
pybind11::python_link_helper
"$<$<OR:$<PLATFORM_ID:Windows>,$<PLATFORM_ID:Cygwin>>:$<BUILD_INTERFACE:
${
PYTHON_LIBRARIES
}
>>"
)
target_link_libraries
(
pybind11::embed INTERFACE pybind11::pybind11
$<BUILD_INTERFACE:
${
PYTHON_LIBRARIES
}
>
)
endif
()
function
(
pybind11_extension name
)
# The prefix and extension are provided by FindPythonLibsNew.cmake
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment