Skip to content

Commit

Permalink
Add if(WIN32) guard around PDB file installation
Browse files Browse the repository at this point in the history
  • Loading branch information
tttapa committed Apr 1, 2023
1 parent 1a9f815 commit 716127b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
12 changes: 7 additions & 5 deletions examples/nanobind-project/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@ install(TARGETS _add_module
COMPONENT python_modules
DESTINATION ${PY_BUILD_CMAKE_MODULE_NAME})
# Install the debug file for the Python module (Windows only)
install(FILES $<TARGET_PDB_FILE:_add_module>
EXCLUDE_FROM_ALL
COMPONENT python_modules
DESTINATION ${PY_BUILD_CMAKE_MODULE_NAME}
OPTIONAL)
if (WIN32)
install(FILES $<TARGET_PDB_FILE:_add_module>
EXCLUDE_FROM_ALL
COMPONENT python_modules
DESTINATION ${PY_BUILD_CMAKE_MODULE_NAME}
OPTIONAL)
endif()

# Generate stubs for the Python module
option(WITH_PY_STUBS
Expand Down
12 changes: 7 additions & 5 deletions examples/pybind11-project/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@ install(TARGETS _add_module
COMPONENT python_modules
DESTINATION ${PY_BUILD_CMAKE_MODULE_NAME})
# Install the debug file for the Python module (Windows only)
install(FILES $<TARGET_PDB_FILE:_add_module>
EXCLUDE_FROM_ALL
COMPONENT python_modules
DESTINATION ${PY_BUILD_CMAKE_MODULE_NAME}
OPTIONAL)
if (WIN32)
install(FILES $<TARGET_PDB_FILE:_add_module>
EXCLUDE_FROM_ALL
COMPONENT python_modules
DESTINATION ${PY_BUILD_CMAKE_MODULE_NAME}
OPTIONAL)
endif()

# Generate stubs for the Python module
option(WITH_PY_STUBS
Expand Down

0 comments on commit 716127b

Please sign in to comment.