force Linux static builds to only use static dependencies
parent
951b7318e4
commit
d4170b0ac5
|
@ -110,6 +110,8 @@ SET(THREADSLIB Threads::Threads)
|
|||
if(TSMUXER_STATIC_BUILD)
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
message("-- Static Linux build, will link whole pthread!")
|
||||
set_target_properties(tsmuxer PROPERTIES LINK_SEARCH_START_STATIC 1)
|
||||
set_target_properties(tsmuxer PROPERTIES LINK_SEARCH_END_STATIC 1)
|
||||
SET(THREADSLIB -pthread -Wl,--whole-archive -lpthread -Wl,--no-whole-archive)
|
||||
endif()
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue