Skip to content

Commit 4ebd78a

Browse files
committed
Set output dirs to CMAKE_CURRENT_BINARY_DIR for Windows
1 parent 46d4df5 commit 4ebd78a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/torchcodec/_core/CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,18 @@ function(make_torchcodec_sublibrary
4646
# Avoid adding the "lib" prefix which we already add explicitly.
4747
set_target_properties(${library_name} PROPERTIES PREFIX "")
4848

49+
# On Windows, avoid the Release/Debug subdirectories in output
50+
if(WIN32)
51+
set_target_properties(${library_name} PROPERTIES
52+
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}
53+
RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR}
54+
LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}
55+
LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR}
56+
ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}
57+
ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR}
58+
)
59+
endif()
60+
4961
target_link_libraries(
5062
${library_name}
5163
PUBLIC

0 commit comments

Comments
 (0)