From e91e7e7f8a13ac99d8fe717b9fb7a6535c2bdf2f Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Fri, 27 Dec 2024 14:18:45 +0900 Subject: Replace pthread linking with cmake-based variable Signed-off-by: Michele Calgaro --- CMakeLists.txt | 1 + kdict/CMakeLists.txt | 2 +- kopete/protocols/jabber/CMakeLists.txt | 2 +- kopete/protocols/jabber/jingle/libjingle/talk/p2p/base/CMakeLists.txt | 4 ++-- krfb/krfb/CMakeLists.txt | 3 ++- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dbce6644..ca9085c6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,6 +27,7 @@ set( PACKAGE tdenetwork ) ##### include essential cmake modules ########### include( FindPkgConfig ) +include( FindThreads ) include( CheckFunctionExists ) include( CheckSymbolExists ) include( CheckIncludeFile ) diff --git a/kdict/CMakeLists.txt b/kdict/CMakeLists.txt index dd9db235..d8fd9eec 100644 --- a/kdict/CMakeLists.txt +++ b/kdict/CMakeLists.txt @@ -44,5 +44,5 @@ tde_add_tdeinit_executable( kdict AUTOMOC SOURCES dcopinterface.skel main.cpp actions.cpp dict.cpp options.cpp queryview.cpp toplevel.cpp sets.cpp matchview.cpp application.cpp - LINK tdehtml-shared pthread + LINK tdehtml-shared ${CMAKE_THREAD_LIBS_INIT} ) diff --git a/kopete/protocols/jabber/CMakeLists.txt b/kopete/protocols/jabber/CMakeLists.txt index d300ddc7..cb26e4c4 100644 --- a/kopete/protocols/jabber/CMakeLists.txt +++ b/kopete/protocols/jabber/CMakeLists.txt @@ -22,7 +22,7 @@ if( WITH_JINGLE ) cricketp2pclient-static cricketxmpp-static cricketp2pbase-static cricketbase-static mediastreamer-static ortp-static ${GLIB2_LIBRARIES} ${GTHREAD2_LIBRARIES} ${GMODULE2_LIBRARIES} - ${EXPAT_LIBRARY} ${SPEEX_LIBRARIES} pthread + ${EXPAT_LIBRARY} ${SPEEX_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ) endif( ) diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/p2p/base/CMakeLists.txt b/kopete/protocols/jabber/jingle/libjingle/talk/p2p/base/CMakeLists.txt index c96bedee..e32e0591 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/p2p/base/CMakeLists.txt +++ b/kopete/protocols/jabber/jingle/libjingle/talk/p2p/base/CMakeLists.txt @@ -36,7 +36,7 @@ tde_add_executable( relayserver SOURCES relayserver.cpp relayserver_main.cpp LINK - cricketbase-static cricketp2pbase-static pthread + cricketbase-static cricketp2pbase-static ${CMAKE_THREAD_LIBS_INIT} DESTINATION ${BIN_INSTALL_DIR} ) @@ -47,6 +47,6 @@ tde_add_executable( stunserver SOURCES stunserver.cpp stunserver_main.cpp LINK - cricketbase-static cricketp2pbase-static pthread + cricketbase-static cricketp2pbase-static ${CMAKE_THREAD_LIBS_INIT} DESTINATION ${BIN_INSTALL_DIR} ) diff --git a/krfb/krfb/CMakeLists.txt b/krfb/krfb/CMakeLists.txt index fe0e6d4c..80dfbdbe 100644 --- a/krfb/krfb/CMakeLists.txt +++ b/krfb/krfb/CMakeLists.txt @@ -55,7 +55,8 @@ tde_add_executable( krfb AUTOMOC rfbcontroller.cpp xupdatescanner.cpp main.cpp connectionwidget.ui krfbifaceimpl.cpp krfbiface.skel trayicon.cpp connectiondialog.cpp LINK - krfbconfig-static tdevncserver-static srvloc-static tdeui-shared tdeio-shared jpeg Xext pthread ${XTST_LIBRARIES} + krfbconfig-static tdevncserver-static srvloc-static tdeui-shared tdeio-shared jpeg Xext + ${CMAKE_THREAD_LIBS_INIT} ${XTST_LIBRARIES} DESTINATION ${BIN_INSTALL_DIR} ) -- cgit v1.2.1