From 069ebb6212aa096adb1ded0823ac4194db9b0d03 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 6 Jul 2016 07:37:47 +0200 Subject: gui, api, csv: support hier(7) on Unix This affects platforms such as FreeBSD, Cygwin or Linux. --- gui/CMakeLists.txt | 5 ++--- gui/main.cpp | 2 ++ gui/ui.cpp | 1 - 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'gui') diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index b7448b4c..a2a04af1 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -1,3 +1,4 @@ +include(opentrack-hier) opentrack_boilerplate(opentrack NO-LIBRARY) if(WIN32) @@ -12,9 +13,7 @@ endif() add_executable(opentrack ${opentrack-win32-executable} ${opentrack-all}) -if(NOT WIN32) - set_target_properties(opentrack PROPERTIES SUFFIX ".bin") -endif() +set_target_properties(opentrack PROPERTIES SUFFIX "${opentrack-binary-suffix}") target_link_libraries(opentrack opentrack-logic diff --git a/gui/main.cpp b/gui/main.cpp index 3ae01404..be42ac7a 100644 --- a/gui/main.cpp +++ b/gui/main.cpp @@ -58,6 +58,8 @@ int main(int argc, char** argv) QApplication::setAttribute(Qt::AA_X11InitThreads, true); QApplication app(argc, argv); + MainWindow::set_working_directory(); + auto w = std::make_shared(); w->show(); diff --git a/gui/ui.cpp b/gui/ui.cpp index 1c7e25e9..ebc5db21 100644 --- a/gui/ui.cpp +++ b/gui/ui.cpp @@ -85,7 +85,6 @@ MainWindow::MainWindow() : det_timer.start(1000); ensure_tray(); - set_working_directory(); if (!QFile(group::ini_pathname()).exists()) { -- cgit v1.2.3