summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorkocsv <kocsv@local>2017-05-16 10:18:46 +0200
committerkocsv <kocsv@local>2017-05-16 10:18:46 +0200
commit82e4dc80f5838efcb08ac1c89f58a324b2a26409 (patch)
treef1f28bf0e1ad1fdcee4b2f87f34d9aa169080a5a
parentaacc3bb2b563cd172e340365b8f14ec8fae32d9d (diff)
parenta9ddb1242181032c549bcac7341e38cb2ee0bb73 (diff)
Merge https://github.com/opentrack/opentrack into unstable
merge from upstream
-rw-r--r--.gitignore2
-rw-r--r--bin/build-msvc.cmd26
-rw-r--r--cmake/mingw-w64.cmake8
-rw-r--r--cmake/opentrack-boilerplate.cmake82
-rw-r--r--cmake/opentrack-install.cmake15
-rw-r--r--cmake/opentrack-platform.cmake1
-rw-r--r--cmake/opentrack-version.cmake13
-rw-r--r--compat/CMakeLists.txt2
-rw-r--r--compat/euler.cpp68
-rw-r--r--compat/simple-mat.hpp9
-rw-r--r--compat/time.hpp1
-rw-r--r--compat/timer.cpp3
-rw-r--r--compat/timer.hpp1
-rw-r--r--csv/csv.h1
-rw-r--r--filter-accela/ftnoir_filter_accela.cpp2
-rw-r--r--logic/tracker.cpp5
-rw-r--r--options/tie.hpp2
-rw-r--r--proto-fsuipc/CMakeLists.txt2
-rw-r--r--qxt-mini/CMakeLists.txt2
-rw-r--r--x-plane-plugin/CMakeLists.txt12
20 files changed, 186 insertions, 71 deletions
diff --git a/.gitignore b/.gitignore
index dcc05569..cf0abe36 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,4 +8,4 @@
*.obj
*.exp
*.pdb
-
+/.idea/
diff --git a/bin/build-msvc.cmd b/bin/build-msvc.cmd
new file mode 100644
index 00000000..4adad019
--- /dev/null
+++ b/bin/build-msvc.cmd
@@ -0,0 +1,26 @@
+@setlocal ENABLEDELAYEDEXPANSION
+@echo off
+
+call msvc
+
+taskkill -f -im trackir.exe 2>%SystemDrive%\NUL
+
+call:check cmake .
+call:check ninja i18n
+call:check "d:/cygwin64/bin/dash.exe" -c "git checkout -f -- ../*/lang/ ../*/*/lang/"
+call:check ninja -j6 install
+call:check "d:/cygwin64/bin/dash.exe" -c "git checkout -f -- ../*/lang/ ../*/*/lang/"
+
+exit /b 0
+
+:check
+
+cmd /c "msvc d:/cygwin64/bin/nice.exe -n 20 -- %*"
+
+if %ERRORLEVEL% EQU 0 (
+ GOTO:EOF
+)
+
+rem echo error %ERRORLEVEL%
+exit %ERRORLEVEL%
+
diff --git a/cmake/mingw-w64.cmake b/cmake/mingw-w64.cmake
index a0dc4e7f..b1d6ff2a 100644
--- a/cmake/mingw-w64.cmake
+++ b/cmake/mingw-w64.cmake
@@ -16,7 +16,7 @@ unset(c)
unset(e)
# specify the cross compiler
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
- set(p C:/msys64/mingw32/bin/)
+ set(p D:/cygwin64/opt/bin/)
set(e .exe)
endif()
#set(c ${p}i686-w64-mingw32-)
@@ -44,7 +44,7 @@ SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
# oldest CPU supported here is Northwood-based Pentium 4. -sh 20150811
set(fpu "-ffast-math -mfpmath=both -mstackrealign -falign-functions=16 -falign-loops=16")
-set(cpu "-O3 -march=pentium4 -mtune=skylake -msse -msse2 -mno-sse3 -mno-avx -frename-registers")
+set(cpu "-O3 -march=pentium4 -mtune=corei7-avx -msse -msse2 -mno-sse3 -mno-avx -frename-registers")
set(lto "-fno-lto -fuse-linker-plugin -flto-compression-level=9 -flto-partition=balanced -fno-ipa-pta -fno-lto-odr-type-merging")
set(bloat "")
set(sections "-ffunction-sections -fdata-sections")
@@ -115,3 +115,7 @@ foreach(j "" _DEBUG _RELEASE)
set(CMAKE_${i}_LINKER_FLAGS${j} "${_LDFLAGS${j}} ${CMAKE_${i}_LINKER_FLAGS${j}}")
endforeach()
endforeach()
+
+if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+ set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "" FORCE)
+endif() \ No newline at end of file
diff --git a/cmake/opentrack-boilerplate.cmake b/cmake/opentrack-boilerplate.cmake
index 3c5bd90a..ec1946f0 100644
--- a/cmake/opentrack-boilerplate.cmake
+++ b/cmake/opentrack-boilerplate.cmake
@@ -75,7 +75,7 @@ endfunction()
function(otr_compat target)
if(NOT MSVC)
- set_property(SOURCE ${${target}-moc} APPEND_STRING PROPERTY COMPILE_FLAGS " -w -Wno-error")
+ otr_prop(SOURCE ${${target}-moc} COMPILE_FLAGS "-w -Wno-error")
endif()
if(WIN32)
target_link_libraries(${target} dinput8 dxguid strmiids)
@@ -97,8 +97,8 @@ function(otr_compat target)
set(l-props "-Wl,--as-needed")
endif()
- set_property(TARGET ${target} APPEND_STRING PROPERTY COMPILE_FLAGS " ${c-props} ${arg_COMPILE}")
- set_property(TARGET ${target} APPEND_STRING PROPERTY LINK_FLAGS " ${l-props} ${arg_LINK}")
+ otr_prop(TARGET ${target} COMPILE_FLAGS "${c-props} ${arg_COMPILE}"
+ LINK_FLAGS "${l-props} ${arg_LINK}")
endfunction()
include(CMakeParseArguments)
@@ -110,17 +110,17 @@ function(otr_install_pdb_current_project target)
endfunction()
function(otr_i18n_for_target_directory n)
+ set(k "opentrack-${n}")
foreach(i ${opentrack-all-translations})
set(t "${CMAKE_CURRENT_SOURCE_DIR}/lang/${i}.ts")
add_custom_command(OUTPUT "${t}"
COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_SOURCE_DIR}/lang"
COMMAND "${Qt5_DIR}/../../../bin/lupdate" -silent -recursive -no-obsolete -locations relative . -ts "${t}"
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
- DEPENDS ${${n}-cc} ${${n}-hh} ${${n}-ui} ${${n}-rc}
+ DEPENDS ${${k}-cc} ${${k}-hh} ${${k}-ui} ${${k}-rc}
COMMENT "Running lupdate for ${n}/${i}")
set(target-name "i18n-lang-${i}-module-${n}")
add_custom_target(${target-name} DEPENDS "${t}")
- set_property(GLOBAL APPEND PROPERTY "opentrack-ts-targets-${i}" "${target-name}")
set_property(GLOBAL APPEND PROPERTY "opentrack-ts-files-${i}" "${t}")
endforeach()
endfunction()
@@ -208,3 +208,75 @@ function(otr_module n_)
set_property(GLOBAL APPEND PROPERTY opentrack-all-source-dirs "${CMAKE_CURRENT_SOURCE_DIR}")
endfunction()
+function(otr_prop type)
+ set(files "")
+ set(opts ${ARGN})
+ # only SOURCE allows for multiple files
+ if(".${type}" STREQUAL ".SOURCE")
+ while(TRUE)
+ # keep popping first element off `opts' and adding to `files`
+ list(LENGTH opts len)
+ if(NOT "${len}" GREATER 0)
+ break()
+ endif()
+ list(GET opts 0 k)
+ string(FIND "${k}" "." idx1)
+ string(FIND "${k}" "/" idx2)
+ if("${idx1}" GREATER -1 AND "${idx2}" GREATER -1)
+ list(REMOVE_AT opts 0)
+ list(APPEND files "${k}")
+ else()
+ # not a pathname
+ break()
+ endif()
+ endwhile()
+ # no files, break early
+ # happens a few in the codebase
+ list(LENGTH files len)
+ if(len EQUAL 0)
+ return()
+ endif()
+ else()
+ # single file argument
+ set(opts "${ARGN}")
+ list(GET opts 0 files)
+ list(REMOVE_AT opts 0)
+ endif()
+ # must pass some properties at least
+ list(LENGTH opts len)
+ if(NOT "${len}" GREATER 0)
+ message(FATAL_ERROR "no properties given")
+ endif()
+
+ # prop name but no value
+ list(LENGTH opts len)
+ math(EXPR mod "${len} % 2")
+ if(NOT "${mod}" EQUAL 0)
+ message(FATAL_ERROR "must specify parameter for each property")
+ endif()
+
+ foreach(f ${files})
+ set(opts-copy "${opts}")
+
+ while(TRUE)
+ list(LENGTH opts-copy len)
+ if ("${len}" LESS 2)
+ break()
+ endif()
+
+ # pop off two elements, set property
+ list(GET opts-copy 0 name)
+ list(GET opts-copy 1 value)
+ list(REMOVE_AT opts-copy 1 0)
+
+ get_property(old "${type}" "${f}" PROPERTY "${name}")
+ if(".${old}" STREQUAL ".")
+ set(spc "")
+ else()
+ set(spc " ")
+ endif()
+
+ set_property("${type}" "${f}" APPEND_STRING PROPERTY "${name}" "${spc}${value}")
+ endwhile()
+ endforeach()
+endfunction()
diff --git a/cmake/opentrack-install.cmake b/cmake/opentrack-install.cmake
index e0d73d5f..2f91ab55 100644
--- a/cmake/opentrack-install.cmake
+++ b/cmake/opentrack-install.cmake
@@ -50,12 +50,10 @@ otr_inst2("${opentrack-doc-src-pfx}" FILES "${CMAKE_SOURCE_DIR}/AUTHORS.md")
function(merge_translations)
install(CODE "file(REMOVE_RECURSE \"\${CMAKE_INSTALL_PREFIX}/i18n\")")
- set(all-ts-files "")
set(all-qm-files "")
foreach(i ${opentrack-all-translations})
get_property(ts-files GLOBAL PROPERTY "opentrack-ts-files-${i}")
- #get_property(ts-deps GLOBAL PROPERTY "opentrack-ts-targets-${i}")
set(ts-files_ "")
@@ -67,25 +65,20 @@ function(merge_translations)
set(ts-files "${ts-files_}")
- foreach(k ${ts-files})
- list(APPEND all-ts-files "${k}")
- endforeach()
-
if(NOT ".${ts-files}" STREQUAL ".")
- set(lrelease-deps "${ts-files}")
-
set(qm-output "${CMAKE_CURRENT_BINARY_DIR}/${i}.qm")
list(APPEND all-qm-files "${qm-output}")
add_custom_command(OUTPUT "${qm-output}"
COMMAND "${Qt5_DIR}/../../../bin/lrelease" -nounfinished -silent ${ts-files} -qm "${qm-output}"
- DEPENDS ${lrelease-deps}
- COMMENT "Running lrelease for ${i}")
+ DEPENDS ${ts-files}
+ COMMENT "Running lrelease for ${i}"
+ )
set(lang-target "i18n-lang-${i}")
+ add_custom_target("${lang-target}" DEPENDS "${qm-output}")
install(FILES "${qm-output}" DESTINATION "${opentrack-i18n-pfx}" RENAME "${i}.qm" ${opentrack-perms})
endif()
endforeach()
add_custom_target(i18n ALL DEPENDS ${all-qm-files})
- add_custom_target(force-i18n DEPENDS ${all-ts-files} ${all-qm-files} i18n)
endfunction()
diff --git a/cmake/opentrack-platform.cmake b/cmake/opentrack-platform.cmake
index 3e0319ac..27d38d88 100644
--- a/cmake/opentrack-platform.cmake
+++ b/cmake/opentrack-platform.cmake
@@ -49,7 +49,6 @@ if(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Zi")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Zi")
endif()
- #set(CMAKE_C_FLAGS " -DNOMINMAX -D_CRT_SECURE_NO_WARNINGS ${CMAKE_C_FLAGS}")
foreach (i SHARED MODULE EXE)
set(CMAKE_${i}_LINKER_FLAGS "${CMAKE_${i}_LINKER_FLAGS} -DYNAMICBASE -NXCOMPAT")
diff --git a/cmake/opentrack-version.cmake b/cmake/opentrack-version.cmake
index 00a5df1d..181fc613 100644
--- a/cmake/opentrack-version.cmake
+++ b/cmake/opentrack-version.cmake
@@ -29,17 +29,18 @@ const char* opentrack_version;
const char* opentrack_version = \"${OPENTRACK_COMMIT}${_build_type}\";
")
+set(file "${CMAKE_CURRENT_BINARY_DIR}/version.cpp")
set(crapola-ver)
-if(EXISTS ${CMAKE_BINARY_DIR}/version.c)
- file(READ ${CMAKE_BINARY_DIR}/version.c crapola-ver)
+if(EXISTS "${file}")
+ file(READ "${file}" crapola-ver)
endif()
if(NOT (crapola-ver STREQUAL version-string))
- file(WRITE ${CMAKE_BINARY_DIR}/version.c "${version-string}")
+ file(WRITE "${file}" "${version-string}")
endif()
-add_library(opentrack-version STATIC ${CMAKE_BINARY_DIR}/version.c)
+add_library(opentrack-version STATIC "${file}")
+
if(NOT MSVC)
- set_property(TARGET opentrack-version APPEND_STRING PROPERTY COMPILE_FLAGS " -fno-lto")
+ otr_prop(TARGET opentrack-version COMPILE_FLAGS "-fno-lto")
endif()
-otr_compat(opentrack-version)
diff --git a/compat/CMakeLists.txt b/compat/CMakeLists.txt
index 7655a223..33cb02bd 100644
--- a/compat/CMakeLists.txt
+++ b/compat/CMakeLists.txt
@@ -5,5 +5,5 @@ if(NOT WIN32 AND NOT APPLE)
endif()
if(CMAKE_COMPILER_IS_GNUCXX)
- set_property(SOURCE nan.cpp APPEND_STRING PROPERTY COMPILE_FLAGS " -fno-lto -fno-fast-math -fno-finite-math-only -O0")
+ otr_prop(SOURCE nan.cpp COMPILE_FLAGS "-fno-lto -fno-fast-math -fno-finite-math-only -O0")
endif()
diff --git a/compat/euler.cpp b/compat/euler.cpp
index ab119d3e..f02365c9 100644
--- a/compat/euler.cpp
+++ b/compat/euler.cpp
@@ -11,13 +11,17 @@ euler_t OTR_COMPAT_EXPORT rmat_to_euler(const rmat& R)
const double cy = sqrt(R(2,2)*R(2, 2) + R(2, 1)*R(2, 1));
const bool large_enough = cy > 1e-10;
if (large_enough)
- return euler_t(atan2(-R(1, 0), R(0, 0)),
- atan2(R(2, 0), cy),
- atan2(-R(2, 1), R(2, 2)));
+ return {
+ atan2(-R(1, 0), R(0, 0)),
+ atan2(R(2, 0), cy),
+ atan2(-R(2, 1), R(2, 2))
+ };
else
- return euler_t(atan2(R(0, 1), R(1, 1)),
- atan2(R(2, 0), cy),
- 0);
+ return {
+ atan2(R(0, 1), R(1, 1)),
+ atan2(R(2, 0), cy),
+ 0
+ };
}
// tait-bryan angles, not euler
@@ -37,20 +41,20 @@ rmat OTR_COMPAT_EXPORT euler_to_rmat(const euler_t& input)
const auto c3 = cos(B);
const auto s3 = sin(B);
- return rmat(
- // z
- c1 * c2,
- c1 * s2 * s3 - c3 * s1,
- s1 * s3 + c1 * c3 * s2,
- // y
- c2 * s1,
- c1 * c3 + s1 * s2 * s3,
- c3 * s1 * s2 - c1 * s3,
- // x
- -s2,
- c2 * s3,
- c2 * c3
- );
+ return {
+ // z
+ c1*c2,
+ c1*s2*s3 - c3*s1,
+ s1*s3 + c1*c3*s2,
+ // y
+ c2*s1,
+ c1*c3 + s1*s2*s3,
+ c3*s1*s2 - c1*s3,
+ // x
+ -s2,
+ c2*s3,
+ c2*c3
+ };
}
// https://en.wikipedia.org/wiki/Davenport_chained_rotations#Tait.E2.80.93Bryan_chained_rotations
@@ -67,9 +71,11 @@ void OTR_COMPAT_EXPORT tait_bryan_to_matrices(const euler_t& input,
const double sin_phi = sin(phi);
const double cos_phi = cos(phi);
- r_roll = rmat(1, 0, 0,
- 0, cos_phi, -sin_phi,
- 0, sin_phi, cos_phi);
+ r_roll = {
+ 1, 0, 0,
+ 0, cos_phi, -sin_phi,
+ 0, sin_phi, cos_phi
+ };
}
{
@@ -77,9 +83,11 @@ void OTR_COMPAT_EXPORT tait_bryan_to_matrices(const euler_t& input,
const double sin_theta = sin(theta);
const double cos_theta = cos(theta);
- r_pitch = rmat(cos_theta, 0, -sin_theta,
- 0, 1, 0,
- sin_theta, 0, cos_theta);
+ r_pitch = {
+ cos_theta, 0, -sin_theta,
+ 0, 1, 0,
+ sin_theta, 0, cos_theta
+ };
}
{
@@ -87,9 +95,11 @@ void OTR_COMPAT_EXPORT tait_bryan_to_matrices(const euler_t& input,
const double sin_psi = sin(psi);
const double cos_psi = cos(psi);
- r_yaw = rmat(cos_psi, -sin_psi, 0,
- sin_psi, cos_psi, 0,
- 0, 0, 1);
+ r_yaw = {
+ cos_psi, -sin_psi, 0,
+ sin_psi, cos_psi, 0,
+ 0, 0, 1
+ };
}
}
diff --git a/compat/simple-mat.hpp b/compat/simple-mat.hpp
index a909e40b..11bb191f 100644
--- a/compat/simple-mat.hpp
+++ b/compat/simple-mat.hpp
@@ -206,6 +206,11 @@ public:
inline num operator()(unsigned j, unsigned i) const { return data[j][i]; }
inline num& operator()(unsigned j, unsigned i) { return data[j][i]; }
+#ifdef __GNUG__
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wmissing-braces"
+#endif
+
template<typename... ts, int h__ = h_, int w__ = w_,
typename = typename std::enable_if<is_arglist_correct<num, h__, w__, ts...>::value>::type>
Mat(const ts... xs) : data{static_cast<num>(xs)...}
@@ -213,6 +218,10 @@ public:
static_assert(h__ == h_ && w__ == w_, "");
}
+#ifdef __GNUG__
+# pragma GCC diagnostic pop
+#endif
+
Mat()
{
for (int j = 0; j < h_; j++)
diff --git a/compat/time.hpp b/compat/time.hpp
index fbe7469a..b560da70 100644
--- a/compat/time.hpp
+++ b/compat/time.hpp
@@ -1,7 +1,6 @@
#pragma once
#include <chrono>
-#include <type_traits>
namespace time_units {
diff --git a/compat/timer.cpp b/compat/timer.cpp
index 3ecdf528..ca22fa10 100644
--- a/compat/timer.cpp
+++ b/compat/timer.cpp
@@ -6,6 +6,9 @@
* notice appear in all copies.
*/
+#include "ndebug-guard.hpp"
+#include <cassert>
+
#include "timer.hpp"
#include <cmath>
diff --git a/compat/timer.hpp b/compat/timer.hpp
index 58e1c7d6..6af7430d 100644
--- a/compat/timer.hpp
+++ b/compat/timer.hpp
@@ -18,7 +18,6 @@
#endif
#include <ctime>
-#include <tuple>
#include "time.hpp"
diff --git a/csv/csv.h b/csv/csv.h
index e88a10b2..b8c40e27 100644
--- a/csv/csv.h
+++ b/csv/csv.h
@@ -15,7 +15,6 @@ public:
QString readLine();
bool parseLine(QStringList& ret);
- void setCodec(const char* codecName);
static bool getGameData(int gameID, unsigned char* table, QString& gamename);
private:
CSV(QIODevice* device);
diff --git a/filter-accela/ftnoir_filter_accela.cpp b/filter-accela/ftnoir_filter_accela.cpp
index b8a0ac77..b95de697 100644
--- a/filter-accela/ftnoir_filter_accela.cpp
+++ b/filter-accela/ftnoir_filter_accela.cpp
@@ -154,7 +154,7 @@ void accela::filter(const double* input, double *output)
output[k] *= dt;
output[k] += last_output[k];
- if (signum(last_output[k] - output[k]) < 0)
+ if (signum(last_output[k] - output[k]) >= 0)
output[k] = std::fmax(input[k], output[k]);
else
output[k] = std::fmin(input[k], output[k]);
diff --git a/logic/tracker.cpp b/logic/tracker.cpp
index 8367ee2f..48a50d80 100644
--- a/logic/tracker.cpp
+++ b/logic/tracker.cpp
@@ -416,8 +416,9 @@ void Tracker::run()
backlog_time = backlog_time.zero();
}
- const int sleep_time_ms = iround(clamp(const_sleep_ms - backlog_time,
- ns(0), ms(50)).count());
+ const int sleep_time_ms = iround(time_cast<ms>(clamp(const_sleep_ms - backlog_time,
+ ns(0), ms(50)))
+ .count());
portable::sleep(sleep_time_ms);
}
diff --git a/options/tie.hpp b/options/tie.hpp
index 94fe5d49..16bf51d4 100644
--- a/options/tie.hpp
+++ b/options/tie.hpp
@@ -65,7 +65,7 @@ void tie_setting(value<t>& v, QLabel* lb, const QString& format, const xs&... ar
template<typename t, typename F, typename... xs>
decltype((void)((std::declval<F>())(std::declval<const t&>())))
-tie_setting(value<t>& v, QLabel* lb, F&& fun, const QString& fmt = QStringLiteral("%1"), const xs&... args)
+tie_setting(value<t>& v, QLabel* lb, F&& fun, const QString& fmt, const xs&... args)
{
auto closure = [=](const t& x) { lb->setText(fmt.arg(fun(x), args...)); };
diff --git a/proto-fsuipc/CMakeLists.txt b/proto-fsuipc/CMakeLists.txt
index 24006644..99e362aa 100644
--- a/proto-fsuipc/CMakeLists.txt
+++ b/proto-fsuipc/CMakeLists.txt
@@ -5,7 +5,7 @@ if(WIN32)
target_link_libraries(opentrack-proto-fsuipc ${SDK_FSUIPC}/FSUIPC_User.lib)
target_include_directories(opentrack-proto-fsuipc SYSTEM PUBLIC ${SDK_FSUIPC})
if(MSVC)
- set_property(TARGET opentrack-proto-fsuipc APPEND_STRING PROPERTY LINK_FLAGS " /NODEFAULTLIB:LIBC.lib")
+ otr_prop(TARGET opentrack-proto-fsuipc LINK_FLAGS "/NODEFAULTLIB:LIBC.lib")
endif()
endif()
endif()
diff --git a/qxt-mini/CMakeLists.txt b/qxt-mini/CMakeLists.txt
index bf8a30f9..a6c2908e 100644
--- a/qxt-mini/CMakeLists.txt
+++ b/qxt-mini/CMakeLists.txt
@@ -3,6 +3,6 @@ if(UNIX OR APPLE)
if(NOT APPLE)
target_link_libraries(opentrack-qxt-mini X11)
else()
- set_property(TARGET opentrack-qxt-mini APPEND_STRING PROPERTY LINK_FLAGS " -framework Carbon -framework CoreFoundation")
+ otr_prop(TARGET opentrack-qxt-mini LINK_FLAGS "-framework Carbon -framework CoreFoundation")
endif()
endif()
diff --git a/x-plane-plugin/CMakeLists.txt b/x-plane-plugin/CMakeLists.txt
index abca2d68..db712590 100644
--- a/x-plane-plugin/CMakeLists.txt
+++ b/x-plane-plugin/CMakeLists.txt
@@ -7,18 +7,18 @@ if(LINUX OR APPLE)
install(FILES ${opentrack-xplane-plugin-c} DESTINATION "${opentrack-doc-src-pfx}/opentrack-xplane-plugin")
target_include_directories(opentrack-xplane-plugin SYSTEM PUBLIC ${SDK_XPLANE}/CHeaders ${SDK_XPLANE}/CHeaders/XPLM)
- set(begin TARGET opentrack-xplane-plugin APPEND_STRING PROPERTY)
+ set(begin TARGET opentrack-xplane-plugin)
if(APPLE)
- set_property(${begin} COMPILE_FLAGS "-iframework ${SDK_XPLANE}/Libraries/Mac/ -DAPL -DXPLM200 -DXPLM210 -framework XPLM -framework XPWidgets")
- set_property(${begin} LINK_FLAGS "-F${SDK_XPLANE}/Libraries/Mac/ -framework XPLM -framework XPWidgets")
+ otr_prop(${begin} COMPILE_FLAGS "-iframework ${SDK_XPLANE}/Libraries/Mac/ -DAPL -DXPLM200 -DXPLM210 -framework XPLM -framework XPWidgets"
+ LINK_FLAGS "-F${SDK_XPLANE}/Libraries/Mac/ -framework XPLM -framework XPWidgets")
elseif(CMAKE_COMPILER_IS_GNUCXX)
- set_property(${begin} COMPILE_FLAGS "-fPIC -DLIN -DXPLM200 -DXPLM210")
- set_property(${begin} LINK_FLAGS "-rdynamic -nodefaultlibs -fPIC")
+ otr_prop(${begin} COMPILE_FLAGS "-fPIC -DLIN -DXPLM200 -DXPLM210"
+ LINK_FLAGS "-rdynamic -nodefaultlibs -fPIC")
endif()
if(CMAKE_COMPILER_IS_GNUCXX AND NOT CMAKE_COMPILER_IS_CLANG)
- set_property(${begin} LINK_FLAGS "-undefined_warning")
+ otr_prop(${begin} LINK_FLAGS "-undefined_warning")
endif()
set_target_properties(opentrack-xplane-plugin PROPERTIES