Skip to content
This repository was archived by the owner on May 6, 2021. It is now read-only.

Commit d1e57e9

Browse files
committed
Fix linking with static Qt Embedded builds
Make sure pthreads and dl get linked when building Hyperion using a static Qt Embedded library instead of Qt X11
1 parent 24ea048 commit d1e57e9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

cmake/qt4/Qt4ConfigDependentSettings.cmake

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,16 @@ if(Q_WS_X11)
270270

271271
endif()
272272

273+
if(Q_WS_QWS)
274+
set(CMAKE_THREAD_PREFER_PTHREADS 1)
275+
find_package(Threads)
276+
if(CMAKE_USE_PTHREADS_INIT)
277+
set(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${CMAKE_THREAD_LIBS_INIT})
278+
endif()
279+
280+
set (QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${CMAKE_DL_LIBS})
281+
282+
endif()
273283

274284
if(Q_WS_WIN)
275285
set(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} imm32 winmm)

0 commit comments

Comments
 (0)