chore(cpn): cmake use automoc and autouic (#4258)
This commit is contained in:
@@ -130,3 +130,19 @@ function(AddHWGenTarget input template output)
|
|||||||
DEPENDS ${INPUT_JSON} ${LEGACY_JSON} ${TEMPLATE}
|
DEPENDS ${INPUT_JSON} ${LEGACY_JSON} ${TEMPLATE}
|
||||||
)
|
)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
macro(AddHeadersSources)
|
||||||
|
foreach(name
|
||||||
|
${${PROJECT_NAME}_NAMES})
|
||||||
|
|
||||||
|
set(${PROJECT_NAME}_SRCS
|
||||||
|
${${PROJECT_NAME}_SRCS}
|
||||||
|
${name}.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
set(${PROJECT_NAME}_HDRS
|
||||||
|
${${PROJECT_NAME}_HDRS}
|
||||||
|
${name}.h
|
||||||
|
)
|
||||||
|
endforeach()
|
||||||
|
endmacro()
|
||||||
|
|||||||
@@ -5,6 +5,9 @@ if(APPLE AND EXISTS /usr/local/opt/qt5)
|
|||||||
list(APPEND CMAKE_PREFIX_PATH "/usr/local/opt/qt5")
|
list(APPEND CMAKE_PREFIX_PATH "/usr/local/opt/qt5")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(CMAKE_AUTOMOC ON)
|
||||||
|
set(CMAKE_AUTOUIC ON)
|
||||||
|
|
||||||
find_package(Qt5Core)
|
find_package(Qt5Core)
|
||||||
find_package(Qt5Widgets)
|
find_package(Qt5Widgets)
|
||||||
find_package(Qt5Xml)
|
find_package(Qt5Xml)
|
||||||
|
|||||||
@@ -165,9 +165,11 @@ qt5_add_resources(common_RCC ${common_RESOURCES})
|
|||||||
add_library(common ${common_SRCS} ${common_RCC})
|
add_library(common ${common_SRCS} ${common_RCC})
|
||||||
|
|
||||||
target_link_libraries(common
|
target_link_libraries(common
|
||||||
|
datamodels
|
||||||
firmwares
|
firmwares
|
||||||
storage
|
shared
|
||||||
simulation
|
simulation
|
||||||
|
storage
|
||||||
maxLibQt
|
maxLibQt
|
||||||
Qt5::Core
|
Qt5::Core
|
||||||
Qt5::Xml
|
Qt5::Xml
|
||||||
@@ -188,9 +190,9 @@ include(FetchMaxLibQt)
|
|||||||
|
|
||||||
add_subdirectory(datamodels)
|
add_subdirectory(datamodels)
|
||||||
add_subdirectory(firmwares)
|
add_subdirectory(firmwares)
|
||||||
add_subdirectory(shared)
|
|
||||||
add_subdirectory(modeledit)
|
|
||||||
add_subdirectory(generaledit)
|
add_subdirectory(generaledit)
|
||||||
|
add_subdirectory(modeledit)
|
||||||
|
add_subdirectory(shared)
|
||||||
add_subdirectory(simulation)
|
add_subdirectory(simulation)
|
||||||
add_subdirectory(storage)
|
add_subdirectory(storage)
|
||||||
add_subdirectory(thirdparty/qcustomplot)
|
add_subdirectory(thirdparty/qcustomplot)
|
||||||
@@ -200,96 +202,65 @@ add_subdirectory(updates)
|
|||||||
|
|
||||||
include_directories(${maxLibQt_SOURCE_DIR}/widgets)
|
include_directories(${maxLibQt_SOURCE_DIR}/widgets)
|
||||||
|
|
||||||
|
set(companion_NAMES
|
||||||
|
apppreferencesdialog
|
||||||
|
burnconfigdialog
|
||||||
|
comparedialog
|
||||||
|
customizesplashdialog
|
||||||
|
flasheepromdialog
|
||||||
|
flashfirmwaredialog
|
||||||
|
helpers_html
|
||||||
|
labels
|
||||||
|
logsdialog
|
||||||
|
mainwindow
|
||||||
|
mdichild
|
||||||
|
modelprinter
|
||||||
|
modelslist
|
||||||
|
multimodelprinter
|
||||||
|
printdialog
|
||||||
|
process_copy
|
||||||
|
process_flash
|
||||||
|
process_sync
|
||||||
|
profilechooser
|
||||||
|
progressdialog
|
||||||
|
progresswidget
|
||||||
|
radiointerface
|
||||||
|
radionotfound
|
||||||
|
splashlibrarydialog
|
||||||
|
styleeditdialog
|
||||||
|
wizarddata
|
||||||
|
wizarddialog
|
||||||
|
dialogs/filesyncdialog
|
||||||
|
)
|
||||||
|
|
||||||
|
foreach(name ${companion_NAMES})
|
||||||
|
set(companion_SRCS
|
||||||
|
${companion_SRCS}
|
||||||
|
${name}.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
set(companion_HDRS
|
||||||
|
${companion_HDRS}
|
||||||
|
${name}.h
|
||||||
|
)
|
||||||
|
endforeach()
|
||||||
|
|
||||||
set(companion_SRCS
|
set(companion_SRCS
|
||||||
helpers_html.cpp
|
${companion_SRCS}
|
||||||
mdichild.cpp
|
|
||||||
modelslist.cpp
|
|
||||||
labels.cpp
|
|
||||||
apppreferencesdialog.cpp
|
|
||||||
burnconfigdialog.cpp
|
|
||||||
multimodelprinter.cpp
|
|
||||||
comparedialog.cpp
|
|
||||||
customizesplashdialog.cpp
|
|
||||||
radiointerface.cpp
|
|
||||||
progresswidget.cpp
|
|
||||||
progressdialog.cpp
|
|
||||||
process_copy.cpp
|
|
||||||
process_flash.cpp
|
|
||||||
process_sync.cpp
|
|
||||||
flashfirmwaredialog.cpp
|
|
||||||
flasheepromdialog.cpp
|
|
||||||
printdialog.cpp
|
|
||||||
modelprinter.cpp
|
|
||||||
logsdialog.cpp
|
|
||||||
splashlibrarydialog.cpp
|
|
||||||
mainwindow.cpp
|
|
||||||
companion.cpp
|
companion.cpp
|
||||||
radionotfound.cpp
|
)
|
||||||
wizarddata.cpp
|
|
||||||
wizarddialog.cpp
|
|
||||||
styleeditdialog.cpp
|
|
||||||
dialogs/filesyncdialog.cpp # TODO move to own lib with other dialogs
|
|
||||||
profilechooser.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
set(companion_MOC_HDRS
|
set(companion_HDRS
|
||||||
apppreferencesdialog.h
|
${companion_HDRS}
|
||||||
burnconfigdialog.h
|
|
||||||
comparedialog.h
|
|
||||||
printdialog.h
|
|
||||||
logsdialog.h
|
|
||||||
customizesplashdialog.h
|
|
||||||
splashlibrarydialog.h
|
|
||||||
splashlabel.h
|
splashlabel.h
|
||||||
progresswidget.h
|
)
|
||||||
progressdialog.h
|
|
||||||
process_copy.h
|
|
||||||
process_flash.h
|
|
||||||
process_sync.h
|
|
||||||
flashfirmwaredialog.h
|
|
||||||
flasheepromdialog.h
|
|
||||||
mdichild.h
|
|
||||||
mainwindow.h
|
|
||||||
radionotfound.h
|
|
||||||
wizarddialog.h
|
|
||||||
modelprinter.h
|
|
||||||
multimodelprinter.h
|
|
||||||
modelslist.h
|
|
||||||
labels.h
|
|
||||||
styleeditdialog.h
|
|
||||||
helpers_html.h
|
|
||||||
dialogs/filesyncdialog.h
|
|
||||||
profilechooser.h
|
|
||||||
)
|
|
||||||
|
|
||||||
set(companion_UIS
|
|
||||||
mdichild.ui
|
|
||||||
comparedialog.ui
|
|
||||||
logsdialog.ui
|
|
||||||
apppreferencesdialog.ui
|
|
||||||
burnconfigdialog.ui
|
|
||||||
printdialog.ui
|
|
||||||
htmldialog.ui
|
|
||||||
customizesplashdialog.ui
|
|
||||||
splashlibrarydialog.ui
|
|
||||||
progresswidget.ui
|
|
||||||
progressdialog.ui
|
|
||||||
flashfirmwaredialog.ui
|
|
||||||
flasheepromdialog.ui
|
|
||||||
radionotfound.ui
|
|
||||||
styleeditdialog.ui
|
|
||||||
profilechooser.ui
|
|
||||||
)
|
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set(icon_RC images/winicons/icon.rc)
|
set(icon_RC images/winicons/icon.rc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
qt5_wrap_ui(companion_SRCS ${companion_UIS})
|
add_executable(${COMPANION_NAME} MACOSX_BUNDLE ${WIN_EXECUTABLE_TYPE} ${companion_SRCS} ${companion_HDRS} ${icon_RC})
|
||||||
qt5_wrap_cpp(companion_SRCS ${companion_MOC_HDRS})
|
target_link_libraries(${COMPANION_NAME} PRIVATE ${CPN_COMMON_LIB} generaledit modeledit qcustomplot miniz updates)
|
||||||
|
|
||||||
add_executable(${COMPANION_NAME} MACOSX_BUNDLE ${WIN_EXECUTABLE_TYPE} ${companion_SRCS} ${icon_RC})
|
|
||||||
target_link_libraries(${COMPANION_NAME} PRIVATE generaledit modeledit qcustomplot miniz shared updates ${CPN_COMMON_LIB})
|
|
||||||
|
|
||||||
PrintTargetReport("${COMPANION_NAME}")
|
PrintTargetReport("${COMPANION_NAME}")
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +1,24 @@
|
|||||||
|
|
||||||
set(datamodels_SRCS
|
project(datamodels)
|
||||||
compounditemmodels.cpp
|
|
||||||
filtereditemmodels.cpp
|
set(${PROJECT_NAME}_NAMES
|
||||||
|
compounditemmodels
|
||||||
|
filtereditemmodels
|
||||||
)
|
)
|
||||||
|
|
||||||
set(datamodels_HDRS
|
AddHeadersSources()
|
||||||
compounditemmodels.h
|
|
||||||
filtereditemmodels.h
|
add_library(${PROJECT_NAME}
|
||||||
|
${${PROJECT_NAME}_HDRS}
|
||||||
|
${${PROJECT_NAME}_SRCS}
|
||||||
)
|
)
|
||||||
|
|
||||||
qt5_wrap_cpp(datamodels_SRCS ${datamodels_HDRS})
|
target_link_libraries(${PROJECT_NAME}
|
||||||
|
PRIVATE
|
||||||
|
${CPN_COMMON_LIB}
|
||||||
|
)
|
||||||
|
|
||||||
add_library(datamodels ${datamodels_SRCS} ${datamodels_HDRS})
|
target_include_directories(${PROJECT_NAME}
|
||||||
target_link_libraries(datamodels PRIVATE ${CPN_COMMON_LIB})
|
|
||||||
|
|
||||||
target_include_directories(datamodels
|
|
||||||
PRIVATE
|
PRIVATE
|
||||||
"${CMAKE_SOURCE_DIR}"
|
"${CMAKE_SOURCE_DIR}"
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}"
|
"${CMAKE_CURRENT_BINARY_DIR}"
|
||||||
|
|||||||
@@ -1,75 +1,70 @@
|
|||||||
|
|
||||||
set(firmwares_SRCS
|
project(firmwares)
|
||||||
adjustmentreference.cpp
|
|
||||||
boards.cpp
|
|
||||||
curvedata.cpp
|
|
||||||
curvereference.cpp
|
|
||||||
customfunctiondata.cpp
|
|
||||||
eeprominterface.cpp
|
|
||||||
generalsettings.cpp
|
|
||||||
gvardata.cpp
|
|
||||||
input_data.cpp
|
|
||||||
flightmodedata.cpp
|
|
||||||
heli_data.cpp
|
|
||||||
logicalswitchdata.cpp
|
|
||||||
mixdata.cpp
|
|
||||||
modeldata.cpp
|
|
||||||
moduledata.cpp
|
|
||||||
multiprotocols.cpp
|
|
||||||
output_data.cpp
|
|
||||||
radiodata.cpp
|
|
||||||
radiodataconversionstate.cpp
|
|
||||||
rawsource.cpp
|
|
||||||
rawswitch.cpp
|
|
||||||
sensordata.cpp
|
|
||||||
telem_data.cpp
|
|
||||||
timerdata.cpp
|
|
||||||
ersky9x/ersky9xeeprom.cpp
|
|
||||||
ersky9x/ersky9xinterface.cpp
|
|
||||||
opentx/opentxeeprom.cpp
|
|
||||||
opentx/opentxinterface.cpp
|
|
||||||
edgetx/edgetxinterface.cpp
|
|
||||||
edgetx/yaml_ops.cpp
|
|
||||||
edgetx/yaml_generalsettings.cpp
|
|
||||||
edgetx/yaml_calibdata.cpp
|
|
||||||
edgetx/yaml_trainerdata.cpp
|
|
||||||
edgetx/yaml_switchconfig.cpp
|
|
||||||
edgetx/yaml_modeldata.cpp
|
|
||||||
edgetx/yaml_rawswitch.cpp
|
|
||||||
edgetx/yaml_rawsource.cpp
|
|
||||||
edgetx/yaml_mixdata.cpp
|
|
||||||
edgetx/yaml_expodata.cpp
|
|
||||||
edgetx/yaml_curvedata.cpp
|
|
||||||
edgetx/yaml_moduledata.cpp
|
|
||||||
edgetx/yaml_logicalswitchdata.cpp
|
|
||||||
edgetx/yaml_customfunctiondata.cpp
|
|
||||||
edgetx/yaml_sensordata.cpp
|
|
||||||
edgetx/yaml_screendata.cpp
|
|
||||||
edgetx/yaml_usbjoystickdata.cpp
|
|
||||||
datahelpers.cpp
|
|
||||||
customisation_data.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
string(REPLACE ".cpp" ".h" firmwares_HDRS "${firmwares_SRCS}")
|
set(${PROJECT_NAME}_NAMES
|
||||||
|
adjustmentreference
|
||||||
|
boards
|
||||||
|
curvedata
|
||||||
|
curvereference
|
||||||
|
customfunctiondata
|
||||||
|
customisation_data
|
||||||
|
datahelpers
|
||||||
|
eeprominterface
|
||||||
|
generalsettings
|
||||||
|
gvardata
|
||||||
|
input_data
|
||||||
|
flightmodedata
|
||||||
|
heli_data
|
||||||
|
logicalswitchdata
|
||||||
|
mixdata
|
||||||
|
modeldata
|
||||||
|
moduledata
|
||||||
|
multiprotocols
|
||||||
|
output_data
|
||||||
|
radiodata
|
||||||
|
radiodataconversionstate
|
||||||
|
rawsource
|
||||||
|
rawswitch
|
||||||
|
sensordata
|
||||||
|
telem_data
|
||||||
|
timerdata
|
||||||
|
ersky9x/ersky9xeeprom
|
||||||
|
ersky9x/ersky9xinterface
|
||||||
|
opentx/opentxeeprom
|
||||||
|
opentx/opentxinterface
|
||||||
|
edgetx/edgetxinterface
|
||||||
|
edgetx/yaml_calibdata
|
||||||
|
edgetx/yaml_curvedata
|
||||||
|
edgetx/yaml_customfunctiondata
|
||||||
|
edgetx/yaml_expodata
|
||||||
|
edgetx/yaml_generalsettings
|
||||||
|
edgetx/yaml_logicalswitchdata
|
||||||
|
edgetx/yaml_mixdata
|
||||||
|
edgetx/yaml_modeldata
|
||||||
|
edgetx/yaml_moduledata
|
||||||
|
edgetx/yaml_ops
|
||||||
|
edgetx/yaml_rawsource
|
||||||
|
edgetx/yaml_rawswitch
|
||||||
|
edgetx/yaml_screendata
|
||||||
|
edgetx/yaml_sensordata
|
||||||
|
edgetx/yaml_switchconfig
|
||||||
|
edgetx/yaml_trainerdata
|
||||||
|
edgetx/yaml_usbjoystickdata
|
||||||
|
)
|
||||||
|
|
||||||
list(APPEND firmwares_HDRS
|
AddHeadersSources()
|
||||||
eepromimportexport.h
|
|
||||||
moduledata.h
|
|
||||||
customisation_data.h
|
|
||||||
)
|
|
||||||
|
|
||||||
set(firmwares_QT
|
add_library(${PROJECT_NAME}
|
||||||
curvereference.h
|
${${PROJECT_NAME}_HDRS}
|
||||||
)
|
${${PROJECT_NAME}_SRCS}
|
||||||
|
)
|
||||||
|
|
||||||
qt5_wrap_cpp(firmwares_SRCS ${firmwares_QT})
|
target_link_libraries(${PROJECT_NAME}
|
||||||
|
${CPN_COMMON_LIB}
|
||||||
|
yaml-cpp
|
||||||
|
)
|
||||||
|
|
||||||
add_library(firmwares ${firmwares_SRCS} ${firmwares_HDRS})
|
target_include_directories(${PROJECT_NAME}
|
||||||
|
|
||||||
target_link_libraries(firmwares ${CPN_COMMON_LIB} datamodels shared Qt5::Core Qt5::Xml Qt5::Widgets)
|
|
||||||
target_link_libraries(firmwares yaml-cpp)
|
|
||||||
|
|
||||||
target_include_directories(firmwares
|
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${CMAKE_SOURCE_DIR}
|
${CMAKE_SOURCE_DIR}
|
||||||
${CMAKE_CURRENT_BINARY_DIR}
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
@@ -79,4 +74,4 @@ target_include_directories(firmwares
|
|||||||
"${CMAKE_CURRENT_LIST_DIR}/ersky9x"
|
"${CMAKE_CURRENT_LIST_DIR}/ersky9x"
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/opentx"
|
"${CMAKE_CURRENT_LIST_DIR}/opentx"
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/edgetx"
|
"${CMAKE_CURRENT_LIST_DIR}/edgetx"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,37 +1,34 @@
|
|||||||
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${maxLibQt_SOURCE_DIR}/widgets)
|
|
||||||
|
|
||||||
set(generaledit_NAMES
|
project(generaledit)
|
||||||
|
|
||||||
|
set(${PROJECT_NAME}_NAMES
|
||||||
|
calibration
|
||||||
generaledit
|
generaledit
|
||||||
|
generaloptions
|
||||||
generalsetup
|
generalsetup
|
||||||
|
hardware
|
||||||
|
timezoneedit
|
||||||
|
trainer
|
||||||
)
|
)
|
||||||
|
|
||||||
set(generaledit_SRCS
|
AddHeadersSources()
|
||||||
calibration.cpp
|
|
||||||
hardware.cpp
|
add_library(${PROJECT_NAME}
|
||||||
trainer.cpp
|
${${PROJECT_NAME}_HDRS}
|
||||||
generaloptions.cpp
|
${${PROJECT_NAME}_SRCS}
|
||||||
timezoneedit.cpp
|
|
||||||
)
|
)
|
||||||
|
|
||||||
set(generaledit_HDRS
|
target_link_libraries(${PROJECT_NAME}
|
||||||
calibration.h
|
PRIVATE
|
||||||
hardware.h
|
${CPN_COMMON_LIB}
|
||||||
trainer.h
|
Qt5::Multimedia
|
||||||
generaloptions.h
|
|
||||||
timezoneedit.h
|
|
||||||
)
|
)
|
||||||
|
|
||||||
set(generaledit_UIS
|
target_include_directories(${PROJECT_NAME}
|
||||||
|
PRIVATE
|
||||||
|
"${CMAKE_SOURCE_DIR}"
|
||||||
|
"${CMAKE_CURRENT_BINARY_DIR}"
|
||||||
|
"${maxLibQt_SOURCE_DIR}/widgets"
|
||||||
|
PUBLIC
|
||||||
|
"${CMAKE_CURRENT_LIST_DIR}"
|
||||||
)
|
)
|
||||||
|
|
||||||
foreach(name ${generaledit_NAMES})
|
|
||||||
set(generaledit_SRCS ${generaledit_SRCS} ${name}.cpp)
|
|
||||||
set(generaledit_HDRS ${generaledit_HDRS} ${name}.h)
|
|
||||||
set(generaledit_UIS ${generaledit_UIS} ${name}.ui)
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
qt5_wrap_ui(generaledit_SRCS ${generaledit_UIS})
|
|
||||||
qt5_wrap_cpp(generaledit_SRCS ${generaledit_HDRS})
|
|
||||||
|
|
||||||
add_library(generaledit ${generaledit_SRCS})
|
|
||||||
target_link_libraries(generaledit PRIVATE datamodels ${CPN_COMMON_LIB} Qt5::Multimedia)
|
|
||||||
|
|||||||
@@ -1,68 +1,49 @@
|
|||||||
include_directories(
|
|
||||||
${CMAKE_SOURCE_DIR}
|
|
||||||
${COMPANION_SRC_DIRECTORY}
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}
|
|
||||||
${maxLibQt_SOURCE_DIR}/widgets
|
|
||||||
)
|
|
||||||
|
|
||||||
set(modeledit_NAMES
|
project(modeledit)
|
||||||
modeledit
|
|
||||||
setup
|
set(${PROJECT_NAME}_NAMES
|
||||||
heli
|
channels
|
||||||
telemetry
|
|
||||||
expodialog
|
|
||||||
mixerdialog
|
|
||||||
checklistdialog
|
checklistdialog
|
||||||
|
colorcustomscreens
|
||||||
|
curves
|
||||||
|
customfunctions
|
||||||
|
expodialog
|
||||||
|
flightmodes
|
||||||
|
inputs
|
||||||
|
heli
|
||||||
|
logicalswitches
|
||||||
|
mixerdialog
|
||||||
|
mixes
|
||||||
|
mixerslistwidget
|
||||||
|
modeledit
|
||||||
|
modeloptions
|
||||||
|
setup
|
||||||
|
telemetry
|
||||||
|
telemetry_customscreens
|
||||||
)
|
)
|
||||||
|
|
||||||
set(modeledit_SRCS
|
AddHeadersSources()
|
||||||
flightmodes.cpp
|
|
||||||
inputs.cpp
|
# AUTOMOC does not detect so manually process
|
||||||
mixes.cpp
|
qt5_wrap_cpp(${PROJECT_NAME}_SRCS
|
||||||
channels.cpp
|
${${PROJECT_NAME}_HDRS}
|
||||||
logicalswitches.cpp
|
|
||||||
customfunctions.cpp
|
|
||||||
mixerslistwidget.cpp
|
|
||||||
# node.cpp ## node and edge are built in common lib because also used by simulator
|
|
||||||
# edge.cpp ## commenting them here avoids a "duplicate target" warning eg. from ninja
|
|
||||||
colorcustomscreens.cpp
|
|
||||||
telemetry_customscreens.cpp
|
|
||||||
curves.cpp
|
|
||||||
modeloptions.cpp
|
|
||||||
)
|
)
|
||||||
|
|
||||||
set(modeledit_HDRS
|
add_library(${PROJECT_NAME}
|
||||||
flightmodes.h
|
${${PROJECT_NAME}_SRCS}
|
||||||
inputs.h
|
|
||||||
mixes.h
|
|
||||||
channels.h
|
|
||||||
logicalswitches.h
|
|
||||||
customfunctions.h
|
|
||||||
mixerslistwidget.h
|
|
||||||
# node.h
|
|
||||||
colorcustomscreens.h
|
|
||||||
telemetry_customscreens.h
|
|
||||||
curves.h
|
|
||||||
modeloptions.h
|
|
||||||
)
|
)
|
||||||
|
|
||||||
set(modeledit_UIS
|
target_link_libraries(${PROJECT_NAME}
|
||||||
setup_timer.ui
|
PRIVATE
|
||||||
setup_module.ui
|
${CPN_COMMON_LIB}
|
||||||
setup_function_switches.ui
|
Qt5::Multimedia
|
||||||
flightmode.ui
|
|
||||||
telemetry_customscreen.ui
|
|
||||||
telemetry_sensor.ui
|
|
||||||
)
|
)
|
||||||
|
|
||||||
foreach(name ${modeledit_NAMES})
|
target_include_directories(${PROJECT_NAME}
|
||||||
set(modeledit_SRCS ${modeledit_SRCS} ${name}.cpp)
|
PRIVATE
|
||||||
set(modeledit_HDRS ${modeledit_HDRS} ${name}.h)
|
"${CMAKE_SOURCE_DIR}"
|
||||||
set(modeledit_UIS ${modeledit_UIS} ${name}.ui)
|
"${CMAKE_CURRENT_BINARY_DIR}"
|
||||||
endforeach()
|
"${maxLibQt_SOURCE_DIR}/widgets"
|
||||||
|
PUBLIC
|
||||||
qt5_wrap_ui(modeledit_SRCS ${modeledit_UIS})
|
"${CMAKE_CURRENT_LIST_DIR}"
|
||||||
qt5_wrap_cpp(modeledit_SRCS ${modeledit_HDRS})
|
)
|
||||||
|
|
||||||
add_library(modeledit ${modeledit_SRCS})
|
|
||||||
target_link_libraries(modeledit PRIVATE datamodels ${CPN_COMMON_LIB} Qt5::Multimedia)
|
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${maxLibQt_SOURCE_DIR}/widgets)
|
|
||||||
|
|
||||||
set(shared_NAMES
|
project(shared)
|
||||||
genericpanel
|
|
||||||
verticalscrollarea
|
set(${PROJECT_NAME}_NAMES
|
||||||
autobitsetcheckbox
|
autobitsetcheckbox
|
||||||
autocheckbox
|
autocheckbox
|
||||||
autocombobox
|
autocombobox
|
||||||
@@ -16,27 +15,40 @@ set(shared_NAMES
|
|||||||
autotimeedit
|
autotimeedit
|
||||||
curveimagewidget
|
curveimagewidget
|
||||||
curvedialog
|
curvedialog
|
||||||
|
genericpanel
|
||||||
|
verticalscrollarea
|
||||||
)
|
)
|
||||||
|
|
||||||
set(shared_UIS
|
AddHeadersSources()
|
||||||
curvedialog.ui
|
|
||||||
|
# AUTOMOC does not detect so manually process
|
||||||
|
qt5_wrap_cpp(${PROJECT_NAME}_SRCS
|
||||||
|
${${PROJECT_NAME}_HDRS}
|
||||||
)
|
)
|
||||||
|
|
||||||
foreach(name ${shared_NAMES})
|
|
||||||
set(shared_SRCS ${shared_SRCS} ${name}.cpp)
|
|
||||||
set(shared_HDRS ${shared_HDRS} ${name}.h)
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
qt5_wrap_ui(shared_SRCS ${shared_UIS})
|
|
||||||
qt5_wrap_cpp(shared_SRCS ${shared_HDRS})
|
|
||||||
|
|
||||||
# add after moc generation to stop warnings
|
# add after moc generation to stop warnings
|
||||||
set(shared_SRCS ${shared_SRCS}
|
set(${PROJECT_NAME}_SRCS
|
||||||
|
${${PROJECT_NAME}_SRCS}
|
||||||
autowidget.h
|
autowidget.h
|
||||||
autowidget.cpp
|
autowidget.cpp
|
||||||
curveimage.h
|
curveimage.h
|
||||||
curveimage.cpp
|
curveimage.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(shared ${shared_SRCS})
|
add_library(${PROJECT_NAME}
|
||||||
target_link_libraries(shared PRIVATE datamodels Qt5::Widgets ${CPN_COMMON_LIB})
|
${${PROJECT_NAME}_SRCS}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(${PROJECT_NAME}
|
||||||
|
PRIVATE
|
||||||
|
${CPN_COMMON_LIB}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_include_directories(${PROJECT_NAME}
|
||||||
|
PRIVATE
|
||||||
|
"${CMAKE_SOURCE_DIR}"
|
||||||
|
"${CMAKE_CURRENT_BINARY_DIR}"
|
||||||
|
"${maxLibQt_SOURCE_DIR}/widgets"
|
||||||
|
PUBLIC
|
||||||
|
"${CMAKE_CURRENT_LIST_DIR}"
|
||||||
|
)
|
||||||
|
|||||||
@@ -1,130 +1,92 @@
|
|||||||
set(simulation_SRCS
|
|
||||||
debugoutput.cpp
|
project(simulation)
|
||||||
filteredtextbuffer.cpp
|
|
||||||
radiooutputswidget.cpp
|
set(${PROJECT_NAME}_NAMES
|
||||||
simulateduiwidget.cpp
|
debugoutput
|
||||||
|
filteredtextbuffer
|
||||||
|
radiooutputswidget
|
||||||
|
simulateduiwidget
|
||||||
|
simulatorinterface
|
||||||
|
simulatormainwindow
|
||||||
|
simulatorstartupdialog
|
||||||
|
simulatorwidget
|
||||||
|
telemetrysimu
|
||||||
|
trainersimu
|
||||||
|
widgets/lcdwidget
|
||||||
|
widgets/radiowidget
|
||||||
|
widgets/virtualjoystickwidget
|
||||||
|
)
|
||||||
|
|
||||||
|
if(SDL2_FOUND)
|
||||||
|
set(${PROJECT_NAME}_NAMES
|
||||||
|
${${PROJECT_NAME}_NAMES}
|
||||||
|
joystick
|
||||||
|
joystickdialog
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
AddHeadersSources()
|
||||||
|
|
||||||
|
set(${PROJECT_NAME}_SRCS
|
||||||
|
${${PROJECT_NAME}_SRCS}
|
||||||
simulateduiwidget9X.cpp
|
simulateduiwidget9X.cpp
|
||||||
simulateduiwidgetX9LITE.cpp
|
simulateduiwidgetBoxer.cpp
|
||||||
simulateduiwidgetX7.cpp
|
|
||||||
simulateduiwidgetX9.cpp
|
|
||||||
simulateduiwidgetXLITE.cpp
|
|
||||||
simulateduiwidgetX9E.cpp
|
|
||||||
simulateduiwidgetX9D2019.cpp
|
|
||||||
simulateduiwidgetX10.cpp
|
|
||||||
simulateduiwidgetX12.cpp
|
|
||||||
simulateduiwidgetLR3PRO.cpp
|
|
||||||
simulateduiwidgetCommando8.cpp
|
simulateduiwidgetCommando8.cpp
|
||||||
|
simulateduiwidgetEL18.cpp
|
||||||
simulateduiwidgetJumperT12.cpp
|
simulateduiwidgetJumperT12.cpp
|
||||||
simulateduiwidgetJumperTLITE.cpp
|
|
||||||
simulateduiwidgetJumperTPRO.cpp
|
|
||||||
simulateduiwidgetJumperT16.cpp
|
simulateduiwidgetJumperT16.cpp
|
||||||
simulateduiwidgetJumperT18.cpp
|
simulateduiwidgetJumperT18.cpp
|
||||||
simulateduiwidgetTX12.cpp
|
simulateduiwidgetJumperTLITE.cpp
|
||||||
simulateduiwidgetZorro.cpp
|
simulateduiwidgetJumperTPRO.cpp
|
||||||
simulateduiwidgetBoxer.cpp
|
simulateduiwidgetLR3PRO.cpp
|
||||||
simulateduiwidgetT8.cpp
|
|
||||||
simulateduiwidgetTX16S.cpp
|
|
||||||
simulateduiwidgetNV14.cpp
|
simulateduiwidgetNV14.cpp
|
||||||
simulateduiwidgetEL18.cpp
|
simulateduiwidgetT8.cpp
|
||||||
simulatorinterface.cpp
|
simulateduiwidgetTX12.cpp
|
||||||
simulatormainwindow.cpp
|
simulateduiwidgetTX16S.cpp
|
||||||
simulatorstartupdialog.cpp
|
simulateduiwidgetX10.cpp
|
||||||
simulatorwidget.cpp
|
simulateduiwidgetX12.cpp
|
||||||
telemetrysimu.cpp
|
simulateduiwidgetX7.cpp
|
||||||
trainersimu.cpp
|
simulateduiwidgetX9.cpp
|
||||||
widgets/radiowidget.cpp
|
simulateduiwidgetX9D2019.cpp
|
||||||
widgets/virtualjoystickwidget.cpp
|
simulateduiwidgetX9E.cpp
|
||||||
widgets/lcdwidget.cpp
|
simulateduiwidgetX9LITE.cpp
|
||||||
|
simulateduiwidgetXLITE.cpp
|
||||||
|
simulateduiwidgetZorro.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
set(simulation_UIS
|
set(${PROJECT_NAME}_HDRS
|
||||||
debugoutput.ui
|
${${PROJECT_NAME}_HDRS}
|
||||||
radiooutputswidget.ui
|
|
||||||
simulateduiwidget9X.ui
|
|
||||||
simulateduiwidgetX9LITE.ui
|
|
||||||
simulateduiwidgetX7.ui
|
|
||||||
simulateduiwidgetX9.ui
|
|
||||||
simulateduiwidgetXLITE.ui
|
|
||||||
simulateduiwidgetX9E.ui
|
|
||||||
simulateduiwidgetX9D2019.ui
|
|
||||||
simulateduiwidgetX10.ui
|
|
||||||
simulateduiwidgetX12.ui
|
|
||||||
simulateduiwidgetLR3PRO.ui
|
|
||||||
simulateduiwidgetCommando8.ui
|
|
||||||
simulateduiwidgetJumperT12.ui
|
|
||||||
simulateduiwidgetJumperTLITE.ui
|
|
||||||
simulateduiwidgetJumperTPRO.ui
|
|
||||||
simulateduiwidgetJumperT16.ui
|
|
||||||
simulateduiwidgetJumperT18.ui
|
|
||||||
simulateduiwidgetTX12.ui
|
|
||||||
simulateduiwidgetZorro.ui
|
|
||||||
simulateduiwidgetBoxer.ui
|
|
||||||
simulateduiwidgetT8.ui
|
|
||||||
simulateduiwidgetTX16S.ui
|
|
||||||
simulateduiwidgetNV14.ui
|
|
||||||
simulateduiwidgetEL18.ui
|
|
||||||
simulatormainwindow.ui
|
|
||||||
simulatorstartupdialog.ui
|
|
||||||
simulatorwidget.ui
|
|
||||||
telemetrysimu.ui
|
|
||||||
trainersimu.ui
|
|
||||||
)
|
|
||||||
|
|
||||||
set(simulation_HDRS
|
|
||||||
debugoutput.h
|
|
||||||
filteredtextbuffer.h
|
|
||||||
radiooutputswidget.h
|
|
||||||
radiouiaction.h
|
radiouiaction.h
|
||||||
simulateduiwidget.h
|
|
||||||
# simulator.h
|
|
||||||
simulatorinterface.h
|
|
||||||
simulatormainwindow.h
|
|
||||||
simulatorstartupdialog.h
|
|
||||||
simulatorwidget.h
|
|
||||||
telemetrysimu.h
|
|
||||||
trainersimu.h
|
|
||||||
widgets/buttonswidget.h
|
widgets/buttonswidget.h
|
||||||
widgets/lcdwidget.h
|
|
||||||
widgets/radiowidget.h
|
|
||||||
widgets/radiofaderwidget.h
|
widgets/radiofaderwidget.h
|
||||||
widgets/radiokeywidget.h
|
widgets/radiokeywidget.h
|
||||||
widgets/radioknobwidget.h
|
widgets/radioknobwidget.h
|
||||||
widgets/radioswitchwidget.h
|
widgets/radioswitchwidget.h
|
||||||
widgets/radiotrimwidget.h
|
widgets/radiotrimwidget.h
|
||||||
widgets/sliderwidget.h
|
widgets/sliderwidget.h
|
||||||
widgets/virtualjoystickwidget.h
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if(SDL2_FOUND)
|
# AUTOMOC does not detect so manually process
|
||||||
set(simulation_SRCS
|
qt5_wrap_cpp(${PROJECT_NAME}_SRCS
|
||||||
${simulation_SRCS}
|
${${PROJECT_NAME}_HDRS}
|
||||||
joystick.cpp
|
|
||||||
joystickdialog.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
set(simulation_HDRS
|
|
||||||
${simulation_HDRS}
|
|
||||||
joystick.h
|
|
||||||
joystickdialog.h
|
|
||||||
)
|
|
||||||
|
|
||||||
set(simulation_UIS
|
|
||||||
${simulation_UIS}
|
|
||||||
joystickdialog.ui
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
include_directories(
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}
|
|
||||||
${PROJECT_SOURCE_DIR}
|
|
||||||
${COMPANION_SRC_DIRECTORY}
|
|
||||||
${COMPANION_SRC_DIRECTORY}/simulation
|
|
||||||
${COMPANION_SRC_DIRECTORY}/simulation/widgets
|
|
||||||
${RADIO_SRC_DIR}/fonts/std
|
|
||||||
)
|
)
|
||||||
|
|
||||||
qt5_wrap_ui(simulation_SRCS ${simulation_UIS})
|
add_library(${PROJECT_NAME}
|
||||||
qt5_wrap_cpp(simulation_SRCS ${simulation_HDRS})
|
${${PROJECT_NAME}_SRCS}
|
||||||
|
)
|
||||||
|
|
||||||
add_library(simulation ${simulation_SRCS} ${simulation_HDRS})
|
target_link_libraries(${PROJECT_NAME}
|
||||||
target_link_libraries(simulation PRIVATE ${CPN_COMMON_LIB} shared Qt5::Core Qt5::Widgets Qt5::Svg)
|
PRIVATE
|
||||||
|
${CPN_COMMON_LIB}
|
||||||
|
Qt5::Svg
|
||||||
|
)
|
||||||
|
|
||||||
|
target_include_directories(${PROJECT_NAME}
|
||||||
|
PRIVATE
|
||||||
|
"${CMAKE_SOURCE_DIR}"
|
||||||
|
"${CMAKE_CURRENT_BINARY_DIR}"
|
||||||
|
"${CMAKE_CURRENT_LIST_DIR}/widgets"
|
||||||
|
"${RADIO_SRC_DIR}/fonts/std"
|
||||||
|
PUBLIC
|
||||||
|
"${CMAKE_CURRENT_LIST_DIR}"
|
||||||
|
)
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
|
||||||
|
|
||||||
set(storage_NAMES
|
project(storage)
|
||||||
|
|
||||||
|
set(${PROJECT_NAME}_NAMES
|
||||||
hexinterface
|
hexinterface
|
||||||
mountlist
|
mountlist
|
||||||
rlefile
|
rlefile
|
||||||
@@ -19,22 +20,30 @@ set(storage_NAMES
|
|||||||
minizinterface
|
minizinterface
|
||||||
)
|
)
|
||||||
|
|
||||||
set(storage_SRCS
|
AddHeadersSources()
|
||||||
)
|
|
||||||
|
|
||||||
set(storage_HDRS
|
# AUTOMOC does not detect so manually process
|
||||||
)
|
set(${PROJECT_NAME}_MOC
|
||||||
|
|
||||||
set(storage_MOC_HDRS
|
|
||||||
appdata.h
|
appdata.h
|
||||||
)
|
)
|
||||||
|
|
||||||
foreach(name ${storage_NAMES})
|
qt5_wrap_cpp(${PROJECT_NAME}_SRCS
|
||||||
set(storage_SRCS ${storage_SRCS} ${name}.cpp)
|
${${PROJECT_NAME}_MOC}
|
||||||
set(storage_HDRS ${storage_HDRS} ${name}.h)
|
)
|
||||||
endforeach()
|
|
||||||
|
|
||||||
qt5_wrap_cpp(storage_SRCS ${storage_MOC_HDRS})
|
add_library(${PROJECT_NAME}
|
||||||
|
${${PROJECT_NAME}_HDRS}
|
||||||
|
${${PROJECT_NAME}_SRCS}
|
||||||
|
)
|
||||||
|
|
||||||
add_library(storage ${storage_SRCS} ${storage_HDRS})
|
target_link_libraries(${PROJECT_NAME}
|
||||||
target_link_libraries(storage PRIVATE miniz ${CPN_COMMON_LIB})
|
PRIVATE
|
||||||
|
${CPN_COMMON_LIB}
|
||||||
|
miniz
|
||||||
|
)
|
||||||
|
|
||||||
|
target_include_directories(${PROJECT_NAME}
|
||||||
|
PRIVATE
|
||||||
|
"${CMAKE_SOURCE_DIR}"
|
||||||
|
"${CMAKE_CURRENT_BINARY_DIR}"
|
||||||
|
)
|
||||||
|
|||||||
@@ -1,57 +1,59 @@
|
|||||||
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
|
||||||
|
|
||||||
set(updates_NAMES
|
project(updates)
|
||||||
updates
|
|
||||||
updatesdialog
|
set(${PROJECT_NAME}_NAMES
|
||||||
updateoptionsdialog
|
chooserdialog
|
||||||
updatestatus
|
downloaddialog
|
||||||
updatenetwork
|
repo
|
||||||
|
repoassets
|
||||||
repodatamodels
|
repodatamodels
|
||||||
repometadata
|
repometadata
|
||||||
reporeleases
|
reporeleases
|
||||||
repoassets
|
|
||||||
repo
|
|
||||||
updateparameters
|
|
||||||
updateinterface
|
|
||||||
updatefirmware
|
|
||||||
updatecompanion
|
updatecompanion
|
||||||
updatesdcard
|
|
||||||
updatesounds
|
|
||||||
updatethemes
|
|
||||||
updatemultiprotocol
|
|
||||||
updatefactories
|
updatefactories
|
||||||
chooserdialog
|
updatefirmware
|
||||||
|
updateinterface
|
||||||
|
updatemultiprotocol
|
||||||
|
updatenetwork
|
||||||
|
updateoptionsdialog
|
||||||
|
updateparameters
|
||||||
|
updates
|
||||||
|
updatesdcard
|
||||||
|
updatesdialog
|
||||||
|
updatesounds
|
||||||
|
updatestatus
|
||||||
|
updatethemes
|
||||||
)
|
)
|
||||||
|
|
||||||
foreach(name ${updates_NAMES})
|
AddHeadersSources()
|
||||||
set(updates_SRCS ${updates_SRCS} ${name}.cpp)
|
|
||||||
set(updates_HDRS ${updates_HDRS} ${name}.h)
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
set(updates_UIS
|
# AUTOMOC does not detect so manually process
|
||||||
updatesdialog.ui
|
set(${PROJECT_NAME}_MOC
|
||||||
updateoptionsdialog.ui
|
chooserdialog.h
|
||||||
chooserdialog.ui
|
updateinterface.h
|
||||||
)
|
updateoptionsdialog.h
|
||||||
|
|
||||||
set(updates_QTS
|
|
||||||
updates.h
|
updates.h
|
||||||
updatesdialog.h
|
updatesdialog.h
|
||||||
updateoptionsdialog.h
|
|
||||||
updatestatus.h
|
|
||||||
updatenetwork.h
|
|
||||||
repodatamodels.h
|
|
||||||
reporeleases.h
|
|
||||||
repoassets.h
|
|
||||||
repo.h
|
|
||||||
updateparameters.h
|
|
||||||
updateinterface.h
|
|
||||||
updatefactories.h
|
|
||||||
chooserdialog.h
|
|
||||||
)
|
)
|
||||||
|
|
||||||
qt5_wrap_ui(updates_SRCS ${updates_UIS})
|
qt5_wrap_cpp(${PROJECT_NAME}_SRCS
|
||||||
qt5_wrap_cpp(updates_SRCS ${updates_QTS})
|
${${PROJECT_NAME}_MOC}
|
||||||
|
)
|
||||||
|
|
||||||
add_library(updates ${updates_SRCS} ${updates_HDRS})
|
add_library(${PROJECT_NAME}
|
||||||
target_link_libraries(updates PRIVATE ${CPN_COMMON_LIB})
|
${${PROJECT_NAME}_HDRS}
|
||||||
|
${${PROJECT_NAME}_SRCS}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(${PROJECT_NAME}
|
||||||
|
PRIVATE
|
||||||
|
${CPN_COMMON_LIB}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_include_directories(${PROJECT_NAME}
|
||||||
|
PRIVATE
|
||||||
|
"${CMAKE_SOURCE_DIR}"
|
||||||
|
"${CMAKE_CURRENT_BINARY_DIR}"
|
||||||
|
PUBLIC
|
||||||
|
"${CMAKE_CURRENT_LIST_DIR}"
|
||||||
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user