Unverified Commit f5ac116f authored by moto's avatar moto Committed by GitHub
Browse files

Fix C++ extension for Windows (#1371)

* Fix install location and suffix for Windows
parent 7b85f1c3
...@@ -74,6 +74,9 @@ if (BUILD_TORCHAUDIO_PYTHON_EXTENSION) ...@@ -74,6 +74,9 @@ if (BUILD_TORCHAUDIO_PYTHON_EXTENSION)
) )
set_target_properties(_torchaudio PROPERTIES PREFIX "") set_target_properties(_torchaudio PROPERTIES PREFIX "")
if (MSVC)
set_target_properties(_torchaudio PROPERTIES SUFFIX ".pyd")
endif(MSVC)
if (APPLE) if (APPLE)
# https://github.com/facebookarchive/caffe2/issues/854#issuecomment-364538485 # https://github.com/facebookarchive/caffe2/issues/854#issuecomment-364538485
...@@ -116,5 +119,9 @@ if (BUILD_TORCHAUDIO_PYTHON_EXTENSION) ...@@ -116,5 +119,9 @@ if (BUILD_TORCHAUDIO_PYTHON_EXTENSION)
${ADDITIONAL_ITEMS} ${ADDITIONAL_ITEMS}
) )
install(TARGETS _torchaudio LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}) install(
TARGETS _torchaudio
LIBRARY DESTINATION .
RUNTIME DESTINATION . # For Windows
)
endif() endif()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment