From c8fa7f5edd4a48bd87c9781a20a1227868372768 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 31 Oct 2015 18:34:04 +0100 Subject: fix typo --- qxt-mini/qxtglobalshortcut_x11.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qxt-mini/qxtglobalshortcut_x11.cpp b/qxt-mini/qxtglobalshortcut_x11.cpp index b13770a2..30b71ff1 100644 --- a/qxt-mini/qxtglobalshortcut_x11.cpp +++ b/qxt-mini/qxtglobalshortcut_x11.cpp @@ -1,4 +1,4 @@ -#ifndef __APPLE_ +#ifndef __APPLE__ #define QXT_BUILD #include "qxtglobalshortcut_p.h" /**************************************************************************** -- cgit v1.2.3 From a1d93782b084354821dcb6d6cc03fc449b4d9f9a Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 31 Oct 2015 18:41:48 +0100 Subject: fix osx install bundle order --- CMakeLists.txt | 1 + cmake/opentrack-install.cmake | 10 ---------- macosx/CMakeLists.txt | 9 +++++++++ 3 files changed, 10 insertions(+), 10 deletions(-) create mode 100644 macosx/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index aa6f988e..26cc2518 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,6 +22,7 @@ file(GLOB opentrack-subprojects "csv/${C}" "pose-widget/${C}" "spline-widget/${C}" + "macosx/${C}" ) foreach(i ${opentrack-subprojects}) get_filename_component(i ${i} DIRECTORY) diff --git a/cmake/opentrack-install.cmake b/cmake/opentrack-install.cmake index 8e3d0420..598572fa 100644 --- a/cmake/opentrack-install.cmake +++ b/cmake/opentrack-install.cmake @@ -15,13 +15,3 @@ install(FILES "${CMAKE_SOURCE_DIR}/bin/NPClient64.dll" "${CMAKE_SOURCE_DIR}/bin/TrackIR.exe" DESTINATION . ${opentrack-perms}) - -if(APPLE) - install(CODE " - execute_process(COMMAND /bin/sh \"${CMAKE_SOURCE_DIR}/macosx/make-app-bundle.sh\" - \"${CMAKE_SOURCE_DIR}/macosx\" - \"${CMAKE_INSTALL_PREFIX}\" - \"${CMAKE_BINARY_DIR}\" - \"${OPENTRACK_COMMIT}\") - ") -endif() diff --git a/macosx/CMakeLists.txt b/macosx/CMakeLists.txt new file mode 100644 index 00000000..214ea676 --- /dev/null +++ b/macosx/CMakeLists.txt @@ -0,0 +1,9 @@ +if(APPLE) + install(CODE " + execute_process(COMMAND /bin/sh \"${CMAKE_SOURCE_DIR}/macosx/make-app-bundle.sh\" + \"${CMAKE_SOURCE_DIR}/macosx\" + \"${CMAKE_INSTALL_PREFIX}\" + \"${CMAKE_BINARY_DIR}\" + \"${OPENTRACK_COMMIT}\") + ") +endif() -- cgit v1.2.3 From a700b1f65deee494584fed18908b513c41585999 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 31 Oct 2015 18:51:13 +0100 Subject: osx: nix dot.DS_Store --- macosx/make-app-bundle.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/macosx/make-app-bundle.sh b/macosx/make-app-bundle.sh index d0afb790..30a1517b 100644 --- a/macosx/make-app-bundle.sh +++ b/macosx/make-app-bundle.sh @@ -14,6 +14,7 @@ test -n "$version" || exit 1 tmp="$(mktemp -d "/tmp/$APPNAME-tmp.XXXXXXX")" test $? -eq 0 || exit 1 +rm -f -- "$install/.DS_Store" sh "$dir/install-fail-tool" "$install" cp -R "$dir/opentrack.app" "$tmp/" || exit 1 -- cgit v1.2.3 From d58e8a9a48b2b230ba4e65653abc9654c1f9c01c Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 1 Nov 2015 06:24:58 +0100 Subject: try not to statically link qxt-mini cf. 3e60ccda96dfada9307a0a25134475c726f1ae72 --- gui/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index b2540a68..19e98571 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -17,7 +17,7 @@ opentrack_compat(opentrack) if(UNIX OR APPLE) target_include_directories(opentrack PRIVATE "${CMAKE_SOURCE_DIR}/qxt-mini") - opentrack_library(opentrack-qxt-mini ${CMAKE_SOURCE_DIR}/qxt-mini NO-LINKER-SCRIPT STATIC) + opentrack_library(opentrack-qxt-mini ${CMAKE_SOURCE_DIR}/qxt-mini NO-LINKER-SCRIPT NO-COMPAT) if(NOT APPLE) target_link_libraries(opentrack-qxt-mini X11) endif() -- cgit v1.2.3 From 882dae825773963ef44bfee61ca990fddbb94d02 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 1 Nov 2015 08:18:41 +0100 Subject: cmake: fix NO-LINKER-SCRIPT typo --- cmake/opentrack-macros.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmake/opentrack-macros.cmake b/cmake/opentrack-macros.cmake index df19ddf0..e171a6fb 100644 --- a/cmake/opentrack-macros.cmake +++ b/cmake/opentrack-macros.cmake @@ -50,9 +50,10 @@ macro(opentrack_library n dir) add_library(${n} ${link-mode} ${${n}-all}) set(link-mode) if(NOT opentrack-foolib_NO-COMPAT) - target_link_libraries(${n} opentrack-api ${MY_QT_LIBS} opentrack-compat) + target_link_libraries(${n} opentrack-api opentrack-compat) endif() - if(CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE AND NOT NO-LINKER-SCRIPT) + target_link_libraries(${n} ${MY_QT_LIBS}) + if(CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE AND NOT opentrack-foolib_NO-LINKER-SCRIPT) SET_TARGET_PROPERTIES(${n} PROPERTIES LINK_FLAGS "${opentrack-foolib_LINK} ${opentrack-foolib_GNU-LINK} -Wl,--as-needed -Wl,--version-script=\"${CMAKE_SOURCE_DIR}/opentrack-compat/${version-script}-version-script.txt\"" COMPILE_FLAGS "${opentrack-foolib_COMPILE} ${opentrack-foolib_GNU-COMPILE} -fvisibility=hidden -fvisibility-inlines-hidden" -- cgit v1.2.3 From f14becff3653fa71911303fb0898a5d5a9cdfe95 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 1 Nov 2015 08:19:00 +0100 Subject: qxt-mini: make own module --- CMakeLists.txt | 3 ++- gui/CMakeLists.txt | 12 ------------ qxt-mini/CMakeLists.txt | 12 ++++++++++++ qxt-mini/qxtglobalshortcut.cpp | 1 - qxt-mini/qxtglobalshortcut_mac.cpp | 1 - qxt-mini/qxtglobalshortcut_x11.cpp | 1 - 6 files changed, 14 insertions(+), 16 deletions(-) create mode 100644 qxt-mini/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 26cc2518..16ee3be3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,9 +4,9 @@ cmake_minimum_required(VERSION 2.8.11) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake/) include(CMakeParseArguments) include(opentrack-policy) +include(opentrack-qt) include(opentrack-platform) include(opentrack-macros) -include(opentrack-qt) include(opentrack-version) include(opentrack-tarball) include(opentrack-install) @@ -23,6 +23,7 @@ file(GLOB opentrack-subprojects "pose-widget/${C}" "spline-widget/${C}" "macosx/${C}" + "qxt-mini/${C}" ) foreach(i ${opentrack-subprojects}) get_filename_component(i ${i} DIRECTORY) diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index 19e98571..f483f695 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -14,22 +14,10 @@ opentrack_qt(opentrack) add_executable(opentrack ${opentrack-win32-executable} ${opentrack-all}) opentrack_compat(opentrack) - -if(UNIX OR APPLE) - target_include_directories(opentrack PRIVATE "${CMAKE_SOURCE_DIR}/qxt-mini") - opentrack_library(opentrack-qxt-mini ${CMAKE_SOURCE_DIR}/qxt-mini NO-LINKER-SCRIPT NO-COMPAT) - if(NOT APPLE) - target_link_libraries(opentrack-qxt-mini X11) - endif() -endif() - if(NOT WIN32) set_target_properties(opentrack PROPERTIES SUFFIX ".bin") endif() target_link_libraries(opentrack opentrack-api opentrack-version opentrack-pose-widget opentrack-spline-widget) -if(APPLE) - SET_TARGET_PROPERTIES(opentrack-qxt-mini PROPERTIES LINK_FLAGS "-framework Carbon -framework CoreFoundation") -endif() if(UNIX OR APPLE) target_link_libraries(opentrack opentrack-qxt-mini) endif() diff --git a/qxt-mini/CMakeLists.txt b/qxt-mini/CMakeLists.txt new file mode 100644 index 00000000..2fe5993b --- /dev/null +++ b/qxt-mini/CMakeLists.txt @@ -0,0 +1,12 @@ +if(UNIX OR APPLE) + opentrack_boilerplate(opentrack-qxt-mini + NO-LINKER-SCRIPT NO-COMPAT + COMPILE "-DQXT_BUILD -DBUILD_QXT_GUI" + ) + if(NOT APPLE) + target_link_libraries(opentrack-qxt-mini X11) + else() + set_target_properties(opentrack-qxt-mini PROPERTIES LINK_FLAGS + "-framework Carbon -framework CoreFoundation") + endif() +endif() diff --git a/qxt-mini/qxtglobalshortcut.cpp b/qxt-mini/qxtglobalshortcut.cpp index 4b400a72..45576d37 100644 --- a/qxt-mini/qxtglobalshortcut.cpp +++ b/qxt-mini/qxtglobalshortcut.cpp @@ -1,4 +1,3 @@ -#define QXT_BUILD #include "qxtglobalshortcut.h" /**************************************************************************** ** Copyright (c) 2006 - 2011, the LibQxt project. diff --git a/qxt-mini/qxtglobalshortcut_mac.cpp b/qxt-mini/qxtglobalshortcut_mac.cpp index 34de694e..b19de377 100644 --- a/qxt-mini/qxtglobalshortcut_mac.cpp +++ b/qxt-mini/qxtglobalshortcut_mac.cpp @@ -1,5 +1,4 @@ #ifdef __APPLE__ -#define QXT_BUILD #include /**************************************************************************** ** Copyright (c) 2006 - 2011, the LibQxt project. diff --git a/qxt-mini/qxtglobalshortcut_x11.cpp b/qxt-mini/qxtglobalshortcut_x11.cpp index 30b71ff1..12279ac8 100644 --- a/qxt-mini/qxtglobalshortcut_x11.cpp +++ b/qxt-mini/qxtglobalshortcut_x11.cpp @@ -1,5 +1,4 @@ #ifndef __APPLE__ -#define QXT_BUILD #include "qxtglobalshortcut_p.h" /**************************************************************************** ** Copyright (c) 2006 - 2011, the LibQxt project. -- cgit v1.2.3 From 8151bc76140b1e97f656101254e3a4e2d164129a Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 1 Nov 2015 08:20:07 +0100 Subject: cmake: nuke -rdynamic --- cmake/opentrack-platform.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmake/opentrack-platform.cmake b/cmake/opentrack-platform.cmake index aac3a2b8..c659e4c0 100644 --- a/cmake/opentrack-platform.cmake +++ b/cmake/opentrack-platform.cmake @@ -58,3 +58,10 @@ if(CMAKE_COMPILER_IS_GNUCXX OR APPLE) endif() set_property(GLOBAL PROPERTY USE_FOLDERS OFF) + +# nix -rdynamic passed from Linux-GNU.cmake +if(CMAKE_COMPILER_IS_GNUCXX) + set(__LINUX_COMPILER_GNU 1) + set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS) + set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS) +endif() -- cgit v1.2.3 From 73921613ddddc8d1f8e0caed21ab8dd490a74eb1 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 1 Nov 2015 08:35:17 +0100 Subject: cmake: add current module name to preprocessor vars --- cmake/opentrack-macros.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/opentrack-macros.cmake b/cmake/opentrack-macros.cmake index e171a6fb..e43dc3b5 100644 --- a/cmake/opentrack-macros.cmake +++ b/cmake/opentrack-macros.cmake @@ -66,6 +66,8 @@ macro(opentrack_library n dir) set_target_properties(${n} PROPERTIES LINK_FLAGS "${link-flags} ${opentrack-foolib_LINK}" COMPILE_FLAGS "${opentrack-foolib_COMPILE}") set(link-flags) endif() + string(REPLACE "-" "_" n_ ${n}) + target_compile_definitions(${n} PRIVATE "BUILD_${n_}") if(NOT opentrack-foolib_STATIC) install(TARGETS ${n} RUNTIME DESTINATION . LIBRARY DESTINATION .) endif() -- cgit v1.2.3 From cc16fd0121fe79ae1fd9539a606c19827f64bc23 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 1 Nov 2015 08:36:28 +0100 Subject: use newly-added preprocessor variable --- csv/csv.cpp | 1 - csv/csv.h | 9 ++++++++- opentrack-compat/shm.h | 9 ++++++++- pose-widget/glwidget.h | 9 ++++++++- qxt-mini/CMakeLists.txt | 5 +---- qxt-mini/qxtglobal.h | 6 ++++++ spline-widget/functionconfig.h | 9 ++++++++- spline-widget/qfunctionconfigurator.h | 4 ++-- 8 files changed, 41 insertions(+), 11 deletions(-) diff --git a/csv/csv.cpp b/csv/csv.cpp index 2193ed80..26a36b70 100644 --- a/csv/csv.cpp +++ b/csv/csv.cpp @@ -8,7 +8,6 @@ * purpose with or without fee is hereby granted, provided that the above * * copyright notice and this permission notice appear in all copies. * */ -#define INSIDE_CSV #include "csv.h" #include #include diff --git a/csv/csv.h b/csv/csv.h index a896a076..7ae1ad5c 100644 --- a/csv/csv.h +++ b/csv/csv.h @@ -1,4 +1,5 @@ #pragma once +#include #include #include #include @@ -6,7 +7,13 @@ #include #include -class CSV +#ifdef BUILD_opentrack_csv +# define CSV_EXPORT Q_DECL_EXPORT +#else +# define CSV_EXPORT Q_DECL_IMPORT +#endif + +class CSV_EXPORT CSV { public: QString readLine(); diff --git a/opentrack-compat/shm.h b/opentrack-compat/shm.h index 17a0d843..7c8a66a9 100644 --- a/opentrack-compat/shm.h +++ b/opentrack-compat/shm.h @@ -18,8 +18,15 @@ #include #include #endif +#include -class PortableLockedShm { +#ifdef BUILD_opentrack_compat +# define COMPAT_EXPORT Q_DECL_EXPORT +#else +# define COMPAT_EXPORT Q_DECL_IMPORT +#endif + +class COMPAT_EXPORT PortableLockedShm { public: PortableLockedShm(const char *shmName, const char *mutexName, int mapSize); ~PortableLockedShm(); diff --git a/pose-widget/glwidget.h b/pose-widget/glwidget.h index 81517399..fca3502d 100644 --- a/pose-widget/glwidget.h +++ b/pose-widget/glwidget.h @@ -7,12 +7,19 @@ #pragma once +#include #include #include #include "opentrack/plugin-api.hpp" #include "opentrack/simple-mat.hpp" -class GLWidget : public QWidget +#ifdef BUILD_opentrack_pose_widget +# define POSE_WIDGET_EXPORT Q_DECL_EXPORT +#else +# define POSE_WIDGET_EXPORT Q_DECL_IMPORT +#endif + +class POSE_WIDGET_EXPORT GLWidget : public QWidget { public: using num = float; diff --git a/qxt-mini/CMakeLists.txt b/qxt-mini/CMakeLists.txt index 2fe5993b..5de29cd1 100644 --- a/qxt-mini/CMakeLists.txt +++ b/qxt-mini/CMakeLists.txt @@ -1,8 +1,5 @@ if(UNIX OR APPLE) - opentrack_boilerplate(opentrack-qxt-mini - NO-LINKER-SCRIPT NO-COMPAT - COMPILE "-DQXT_BUILD -DBUILD_QXT_GUI" - ) + opentrack_boilerplate(opentrack-qxt-mini NO-LINKER-SCRIPT NO-COMPAT) if(NOT APPLE) target_link_libraries(opentrack-qxt-mini X11) else() diff --git a/qxt-mini/qxtglobal.h b/qxt-mini/qxtglobal.h index 574482ae..64fd35dc 100644 --- a/qxt-mini/qxtglobal.h +++ b/qxt-mini/qxtglobal.h @@ -51,6 +51,12 @@ #define QXT_DLLEXPORT DO_NOT_USE_THIS_ANYMORE +#ifdef BUILD_opentrack_qxt_mini +# define QXT_BUILD +# define BUILD_QXT_GUI +# define BUILD_QXT +#endif + #ifdef QXT_BUILD # if defined(BUILD_QXT_CORE) # define QXT_CORE_EXPORT Q_DECL_EXPORT diff --git a/spline-widget/functionconfig.h b/spline-widget/functionconfig.h index 6d76d0de..3d2fc23c 100644 --- a/spline-widget/functionconfig.h +++ b/spline-widget/functionconfig.h @@ -8,6 +8,7 @@ #pragma once +#include #include #include #include @@ -17,7 +18,13 @@ #include #include "opentrack-compat/qcopyable-mutex.hpp" -class Map { +#ifdef BUILD_opentrack_spline_widget +# define SPLINE_WIDGET_EXPORT Q_DECL_EXPORT +#else +# define SPLINE_WIDGET_EXPORT Q_DECL_IMPORT +#endif + +class SPLINE_WIDGET_EXPORT Map { private: static constexpr int value_count = 10000; diff --git a/spline-widget/qfunctionconfigurator.h b/spline-widget/qfunctionconfigurator.h index baea9e34..4a9cb5f1 100644 --- a/spline-widget/qfunctionconfigurator.h +++ b/spline-widget/qfunctionconfigurator.h @@ -12,10 +12,10 @@ #include #include #include -#include "spline-widget/functionconfig.h" +#include "functionconfig.h" #include "opentrack/plugin-api.hpp" -class QFunctionConfigurator : public QWidget +class SPLINE_WIDGET_EXPORT QFunctionConfigurator : public QWidget { Q_OBJECT Q_PROPERTY(QColor colorBezier READ colorBezier WRITE setColorBezier) -- cgit v1.2.3 From e04fe7d7b412c502c30c3eaf9d54b0eebf708d2b Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 1 Nov 2015 08:39:46 +0100 Subject: cmake: less boilerplate, link dynamically --- csv/CMakeLists.txt | 5 +---- gui/CMakeLists.txt | 15 ++++++++++----- opentrack-compat/CMakeLists.txt | 2 +- opentrack/CMakeLists.txt | 8 ++------ pose-widget/CMakeLists.txt | 7 +------ spline-widget/CMakeLists.txt | 7 +------ spline-widget/functionconfig.cpp | 2 +- 7 files changed, 17 insertions(+), 29 deletions(-) diff --git a/csv/CMakeLists.txt b/csv/CMakeLists.txt index 07dae55c..7e80317c 100644 --- a/csv/CMakeLists.txt +++ b/csv/CMakeLists.txt @@ -1,4 +1 @@ -opentrack_boilerplate(opentrack-csv NO-LIBRARY) -add_library(opentrack-csv STATIC ${opentrack-csv-c}) -opentrack_compat(opentrack-csv) -target_link_libraries(opentrack-csv ${MY_QT_LIBS}) +opentrack_boilerplate(opentrack-csv NO-LINKER-SCRIPT) diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index f483f695..158804c2 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -17,12 +17,16 @@ opentrack_compat(opentrack) if(NOT WIN32) set_target_properties(opentrack PROPERTIES SUFFIX ".bin") endif() -target_link_libraries(opentrack opentrack-api opentrack-version opentrack-pose-widget opentrack-spline-widget) -if(UNIX OR APPLE) - target_link_libraries(opentrack opentrack-qxt-mini) -endif() + +target_link_libraries(opentrack + opentrack-spline-widget + opentrack-pose-widget + opentrack-api + opentrack-compat + opentrack-version +) + link_with_dinput8(opentrack) -target_link_libraries(opentrack ${MY_QT_LIBS}) if(APPLE) # for process detector @@ -30,6 +34,7 @@ if(APPLE) endif() if(LINUX) + target_link_libraries(opentrack dl) # for process detector target_link_libraries(opentrack procps) endif() diff --git a/opentrack-compat/CMakeLists.txt b/opentrack-compat/CMakeLists.txt index 4f5fd724..a92f4f31 100644 --- a/opentrack-compat/CMakeLists.txt +++ b/opentrack-compat/CMakeLists.txt @@ -1,4 +1,4 @@ -opentrack_boilerplate(opentrack-compat STATIC NO-COMPAT) +opentrack_boilerplate(opentrack-compat NO-COMPAT NO-LINKER-SCRIPT) if(NOT WIN32 AND NOT APPLE) target_link_libraries(opentrack-compat rt) endif() diff --git a/opentrack/CMakeLists.txt b/opentrack/CMakeLists.txt index 4581f394..590eaca5 100644 --- a/opentrack/CMakeLists.txt +++ b/opentrack/CMakeLists.txt @@ -1,10 +1,6 @@ -opentrack_boilerplate(opentrack-api NO-LIBRARY) -opentrack_qt(opentrack-api) -add_library(opentrack-api STATIC ${opentrack-api-all}) -opentrack_compat(opentrack-api) -target_link_libraries(opentrack-api ${MY_QT_LIBS}) +opentrack_boilerplate(opentrack-api NO-LINKER-SCRIPT NO-COMPAT) if(NOT WIN32) - target_link_libraries(opentrack-api dl) + target_link_libraries(opentrack-api opentrack-qxt-mini opentrack-compat dl) else() target_link_libraries(opentrack-api winmm) endif() diff --git a/pose-widget/CMakeLists.txt b/pose-widget/CMakeLists.txt index 66891c21..66cafef7 100644 --- a/pose-widget/CMakeLists.txt +++ b/pose-widget/CMakeLists.txt @@ -1,6 +1 @@ -opentrack_boilerplate(opentrack-pose-widget NO-LIBRARY) -opentrack_qt(opentrack-pose-widget) -add_library(opentrack-pose-widget STATIC ${opentrack-pose-widget-all}) -opentrack_compat(opentrack-pose-widget) -target_include_directories(opentrack-pose-widget PUBLIC pose-widget/) # else Qt moc breaks -target_link_libraries(opentrack-pose-widget ${MY_QT_LIBS}) +opentrack_boilerplate(opentrack-pose-widget NO-LINKER-SCRIPT) diff --git a/spline-widget/CMakeLists.txt b/spline-widget/CMakeLists.txt index 522491ea..03706d91 100644 --- a/spline-widget/CMakeLists.txt +++ b/spline-widget/CMakeLists.txt @@ -1,6 +1 @@ -opentrack_boilerplate(opentrack-spline-widget NO-LIBRARY) -opentrack_qt(opentrack-spline-widget) -add_library(opentrack-spline-widget STATIC ${opentrack-spline-widget-all}) -opentrack_compat(opentrack-spline-widget) -target_include_directories(opentrack-spline-widget PUBLIC qfunctionconfigurator/) -target_link_libraries(opentrack-spline-widget ${MY_QT_LIBS}) +opentrack_boilerplate(opentrack-spline-widget NO-LINKER-SCRIPT) diff --git a/spline-widget/functionconfig.cpp b/spline-widget/functionconfig.cpp index 27f3bf40..dcc9ca65 100644 --- a/spline-widget/functionconfig.cpp +++ b/spline-widget/functionconfig.cpp @@ -6,11 +6,11 @@ * notice appear in all copies. */ +#include "functionconfig.h" #include #include #include #include -#include "functionconfig.h" #include #include #include -- cgit v1.2.3 From add27db4e53a9e5cf6580378230b57f81d47284e Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 1 Nov 2015 08:45:50 +0100 Subject: compat: we can't use Qt here --- opentrack-compat/shm.h | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/opentrack-compat/shm.h b/opentrack-compat/shm.h index 7c8a66a9..53248ac6 100644 --- a/opentrack-compat/shm.h +++ b/opentrack-compat/shm.h @@ -18,14 +18,29 @@ #include #include #endif -#include + +#ifdef __GNUC__ +# define COMPAT_GNUC_VISIBILITY __attribute__ ((visibility ("default"))) +#else +# define COMPAT_GNUC_VISIBILITY +#endif #ifdef BUILD_opentrack_compat -# define COMPAT_EXPORT Q_DECL_EXPORT +# ifdef _WIN32 +# define COMPAT_WIN32_EXPORT __declspec(dllexport) +# else +# define COMPAT_WIN32_EXPORT +# endif #else -# define COMPAT_EXPORT Q_DECL_IMPORT +# ifdef _WIN32 +# define COMPAT_WIN32_EXPORT __declspec(dllimport) +# else +# define COMPAT_WIN32_EXPORT +# endif #endif +#define COMPAT_EXPORT COMPAT_WIN32_EXPORT COMPAT_GNUC_VISIBILITY + class COMPAT_EXPORT PortableLockedShm { public: PortableLockedShm(const char *shmName, const char *mutexName, int mapSize); -- cgit v1.2.3 From 4bbfd73825b1cb6a27e19ea518ad0bed7c806b6c Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 1 Nov 2015 08:47:42 +0100 Subject: shm: ignore diagnostic for Wine build --- opentrack-compat/shm.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/opentrack-compat/shm.h b/opentrack-compat/shm.h index 53248ac6..c74534e7 100644 --- a/opentrack-compat/shm.h +++ b/opentrack-compat/shm.h @@ -19,6 +19,9 @@ #include #endif +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wattributes" + #ifdef __GNUC__ # define COMPAT_GNUC_VISIBILITY __attribute__ ((visibility ("default"))) #else @@ -57,3 +60,5 @@ private: int fd, size; #endif }; + +#pragma GCC diagnostic pop -- cgit v1.2.3 From 6936416b6e1905135be9b4cd35ad22affc47cc5b Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 1 Nov 2015 08:52:38 +0100 Subject: resize dialogs for better visibility on Linux --- filter-accela/ftnoir_accela_filtercontrols.ui | 4 ++-- gui/main.ui | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/filter-accela/ftnoir_accela_filtercontrols.ui b/filter-accela/ftnoir_accela_filtercontrols.ui index 6ec6e751..1b47ddbd 100644 --- a/filter-accela/ftnoir_accela_filtercontrols.ui +++ b/filter-accela/ftnoir_accela_filtercontrols.ui @@ -9,8 +9,8 @@ 0 0 - 501 - 359 + 557 + 338 diff --git a/gui/main.ui b/gui/main.ui index ab63e832..5b276dbb 100644 --- a/gui/main.ui +++ b/gui/main.ui @@ -7,8 +7,8 @@ 0 0 - 707 - 494 + 716 + 537 -- cgit v1.2.3 From 0ff658f908bc3e07bca9987dfd5b7c365b7d8353 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 1 Nov 2015 08:54:32 +0100 Subject: adjust accela dialog for dpi fuckup --- filter-accela/ftnoir_accela_filtercontrols.ui | 110 ++++++++++---------------- 1 file changed, 43 insertions(+), 67 deletions(-) diff --git a/filter-accela/ftnoir_accela_filtercontrols.ui b/filter-accela/ftnoir_accela_filtercontrols.ui index 1b47ddbd..1066cd88 100644 --- a/filter-accela/ftnoir_accela_filtercontrols.ui +++ b/filter-accela/ftnoir_accela_filtercontrols.ui @@ -9,8 +9,8 @@ 0 0 - 557 - 338 + 521 + 317 @@ -215,72 +215,48 @@ - - - + + + + 0 + 0 + + + + + 7 + + + + QFrame::NoFrame + + + <html><head/><body><p align="right"><br/><span style=" font-size:10pt;">Accela by </span><a href="https://github.com/sthalik"><span style=" font-size:10pt; text-decoration: underline; color:#0057ae;">Stanisław Halik</span></a><span style=" font-size:10pt;"><br/>Thanks to </span><a href="https://github.com/dbaarda"><span style=" font-size:10pt; text-decoration: underline; color:#0057ae;">Donovan Baarda</span></a></p><p align="right"><span style=" font-size:10pt;">2012-2015</span></p><p align="right"><br/><span style=" font-size:8pt;">Visit </span><a href="https://github.com/opentrack/opentrack/wiki/Accela-in-opentrack-2.3"><span style=" font-size:8pt; text-decoration: underline; color:#0000ff;">our wiki</span></a><span style=" font-size:8pt;"> for description of the settings.</span></p></body></html> + + + Qt::RichText + + + false + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + true + + + 0 + + + 0 + + + true + + + Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - - - 0 - 0 - - - - - 7 - - - - QFrame::NoFrame - - - <html><head/><body><p align="justify"><br/><span style=" font-size:10pt;">Accela by </span><a href="https://github.com/sthalik"><span style=" font-size:10pt; text-decoration: underline; color:#0057ae;">Stanisław Halik</span></a><span style=" font-size:10pt;"><br/>Thanks to </span><a href="https://github.com/dbaarda"><span style=" font-size:10pt; text-decoration: underline; color:#0057ae;">Donovan Baarda</span></a></p><p align="right"><span style=" font-size:10pt;">2012-2015</span></p><p align="right"><br/></p></body></html> - - - Qt::RichText - - - false - - - Qt::AlignCenter - - - true - - - 0 - - - 0 - - - true - - - Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - - - - - 10 - - - - <html><head/><body><p>Visit <a href="https://github.com/opentrack/opentrack/wiki/Accela-in-opentrack-2.3"><span style=" text-decoration: underline; color:#0000ff;">our wiki</span></a> for description of the settings.</p></body></html> - - - true - - - - -- cgit v1.2.3