Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions pkgs/applications/misc/opentx/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ mkDerivation rec {
sha256 = "sha256-F3zykJhKuIpLQSTjn7mcdjEmgRAlwCZpkTaKQR9ve3g=";
};

patches = [
# fix error "The LOCATION property may not be read from target" and ensure proper linking of Qt modules so build don't fail
./fix-cmake-qt-linking-and-location.patch
];
nativeBuildInputs = [
cmake
gcc-arm-embedded
Expand All @@ -44,6 +48,12 @@ mkDerivation rec {
sed -i companion/src/burnconfigdialog.cpp \
-e 's|/usr/.*bin/dfu-util|${dfu-util}/bin/dfu-util|' \
-e 's|/usr/.*bin/avrdude|${avrdude}/bin/avrdude|'

substituteInPlace CMakeLists.txt \
--replace-fail "cmake_minimum_required(VERSION 2.8)" "cmake_minimum_required(VERSION 3.10)" \
--replace-fail "cmake_policy(SET CMP0023 OLD)" "cmake_policy(SET CMP0023 NEW)"
substituteInPlace companion/src/thirdparty/maxlibqt/src/widgets/CMakeLists.txt \
--replace-fail "cmake_minimum_required(VERSION 2.8.12)" "cmake_minimum_required(VERSION 3.10)"
'';

cmakeFlags = [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
--- a/companion/src/CMakeLists.txt
+++ b/companion/src/CMakeLists.txt
@@ -313,8 +313,8 @@
qt5_wrap_cpp(companion_SRCS ${companion_MOC_HDRS})

add_executable(${COMPANION_NAME} MACOSX_BUNDLE ${WIN_EXECUTABLE_TYPE} ${companion_SRCS} ${icon_RC})
-target_link_libraries(${COMPANION_NAME} PRIVATE generaledit modeledit qcustomplot shared ${CPN_COMMON_LIB})
-
+target_link_libraries(${COMPANION_NAME} PRIVATE generaledit modeledit qcustomplot shared ${CPN_COMMON_LIB}
+Qt5::Network Qt5::PrintSupport)
PrintTargetReport("${COMPANION_NAME}")

############# Standalone simulator ###############
@@ -371,11 +371,11 @@
string(TOLOWER ${PCB} FLAVOUR)
endif()
if(POLICY CMP0026)
- cmake_policy(SET CMP0026 OLD) # https://cmake.org/cmake/help/v3.0/policy/CMP0026.html
+ cmake_policy(SET CMP0026 NEW) # https://cmake.org/cmake/help/v3.0/policy/CMP0026.html
endif()

if(SIMU_TARGET)
- get_property(current_plugin TARGET opentx-${FLAVOUR}-simulator PROPERTY LOCATION)
+ set(current_plugin $<TARGET_FILE:opentx-${FLAVOUR}-simulator>)
list(APPEND simulator_plugins "${current_plugin}")
endif()

Loading