Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix -pthread handling in Debian buster
FindBoost.cmake blindly adds `${CMAKE_THREAD_LIBS_INIT}` to `${Boost_LIBRARIES}` when the component `thread` is found. On Debian buster the `FindThreads.cmake` sets that to `-pthread`. This breaks a bunch of stuff becakse `-pthread` is a linker flag, not a library. There were earlier fixes for `-lpthread`. This PR expands upon them. First this PR modifies the fix from ros#998 to not add `-l` to any linker flag. Second it adds to the fix in ros#975 to make sure `-pthread` is passed to downstream users. There's no standard cmake variable for linker flags, so this PR opts to create an interface target with just the flag, and add that to `${PROJECT_NAME}_LIBRARIES` instead. Both this PR and ros-visualization/python_qt_binding#68 are required to strip or `qt_gui_cpp` will fail at link time. Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
- Loading branch information