Skip to content

Commit 09d077e

Browse files
committed
Revert "Same logic but try exposing the include directories as public"
This reverts commit 2f2c91d.
1 parent 60df908 commit 09d077e

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

src/torchcodec/_core/CMakeLists.txt

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -71,23 +71,14 @@ function(make_torchcodec_sublibrary
7171
)
7272
endif()
7373

74-
# For the core library, make dependencies PRIVATE to prevent transitive linking issues
75-
# but still expose include directories
74+
# For the core library, use PRIVATE to prevent FFmpeg dependencies from leaking
75+
# For other libraries, use PUBLIC so they can properly link to their dependencies
7676
if(${library_name} MATCHES ".*_core[0-9]+$")
7777
target_link_libraries(
7878
${library_name}
7979
PRIVATE
8080
${library_dependencies}
8181
)
82-
# Manually expose FFmpeg include directories as PUBLIC for compilation
83-
foreach(dep ${library_dependencies})
84-
if(TARGET ${dep})
85-
get_target_property(dep_include_dirs ${dep} INTERFACE_INCLUDE_DIRECTORIES)
86-
if(dep_include_dirs)
87-
target_include_directories(${library_name} PUBLIC ${dep_include_dirs})
88-
endif()
89-
endif()
90-
endforeach()
9182
else()
9283
target_link_libraries(
9384
${library_name}

0 commit comments

Comments
 (0)