From 3f42479e77d7d75a84964d20c977cc5691ff61b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sat, 16 Jul 2011 15:34:29 +0200 Subject: [PATCH] Only build the qt plugin on linux --- plugins/CMakeLists.txt | 4 +++- plugins/qtplug/qtplug.cpp | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 5847f3b6f..72d0be03a 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -96,7 +96,9 @@ ENDMACRO(DFHACK_PLUGIN) #endmacro() #RECURSE_DIRS() -add_subdirectory (qtplug) +IF(UNIX) + add_subdirectory (qtplug) +ENDIF() DFHACK_PLUGIN(reveal reveal.cpp) OPTION(BUILD_KITTENS "Build the kittens plugin." OFF) diff --git a/plugins/qtplug/qtplug.cpp b/plugins/qtplug/qtplug.cpp index b103c0237..8b7ace6bf 100644 --- a/plugins/qtplug/qtplug.cpp +++ b/plugins/qtplug/qtplug.cpp @@ -20,6 +20,7 @@ using namespace DFHack; static int runnable(void *); static SDL::Mutex * instance_mutex = 0; static bool running = false; +static SDL::Thread * QTThread; DFhackCExport command_result runqt (Core * c, vector & parameters); @@ -47,7 +48,7 @@ DFhackCExport command_result runqt (Core * c, vector & parameters) if(!running) { running = true; - SDL::Thread * IO = SDL_CreateThread(runnable, 0); + QTThread = SDL_CreateThread(runnable, 0); } else {