From 98a70e0e80e82f8bb0205d106c745cfa545e21a0 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 14 Sep 2013 19:30:08 +0200 Subject: Init X11 threads on Q_OS_UNIX --- CMakeLists.txt | 2 ++ facetracknoir/main.cpp | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8c7b1389..6e5b6978 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -492,6 +492,8 @@ endif() add_executable(opentrack ${opentrack-win32-executable} ${opentrack-bin-c} ${opentrack-bin-moc} ${opentrack-bin-uih} ${opentrack-bin-rcc}) if(WIN32) target_link_libraries(opentrack "${CMAKE_SOURCE_DIR}/dinput/dinput8.lib" "${CMAKE_SOURCE_DIR}/dinput/dxguid.lib" "${CMAKE_SOURCE_DIR}/dinput/strmiids.lib" winmm) + else() + target_link_libraries(opentrack X11) endif() if(MSVC) SET_TARGET_PROPERTIES(opentrack PROPERTIES LINK_FLAGS "/ENTRY:mainCRTStartup") diff --git a/facetracknoir/main.cpp b/facetracknoir/main.cpp index bc0f973b..4dc96603 100644 --- a/facetracknoir/main.cpp +++ b/facetracknoir/main.cpp @@ -30,13 +30,17 @@ #include #if defined(_WIN32) -#include +# include //#pragma comment(linker, "/SUBSYSTEM:console /ENTRY:mainCRTStartup") +#elif defined(Q_OS_UNIX) +#include #endif int main(int argc, char** argv) { #if defined(_WIN32) (void) timeBeginPeriod(1); +#elif defined(Q_OS_UNIX) + XInitThreads(); #endif QApplication app(argc, argv); QFont font; -- cgit v1.2.3