File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -110,11 +110,15 @@ if(APPLE)
110110
111111 # Set pkg-config private libs for macOS
112112 set (PKG_CONFIG_LIBS_PRIVATE "Libs.private: -framework Foundation -framework AVFoundation -framework CoreVideo -framework CoreMedia -framework Accelerate" )
113- elseif (UNIX AND NOT APPLE )
114- # Linux - no additional libraries needed for V4L2 as it's part of kernel
115- set (PKG_CONFIG_LIBS_PRIVATE "" )
113+ elseif (UNIX AND NOT APPLE AND NOT WIN32 )
114+ # Linux – link pthread for std::thread support
115+ find_package (Threads REQUIRED )
116+ target_link_libraries (ccap PUBLIC Threads::Threads )
117+
118+ # Propagate to pkg-config for consumers
119+ set (PKG_CONFIG_LIBS_PRIVATE "Libs.private: -lpthread" )
116120else ()
117- # Windows or other platforms
121+ # Windows (including MinGW) or other platforms
118122 set (PKG_CONFIG_LIBS_PRIVATE "" )
119123endif ()
120124
You can’t perform that action at this time.
0 commit comments