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 {