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}
|
||||
)
|
||||
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")
|
||||
endif()
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
find_package(Qt5Core)
|
||||
find_package(Qt5Widgets)
|
||||
find_package(Qt5Xml)
|
||||
|
||||
@@ -165,9 +165,11 @@ qt5_add_resources(common_RCC ${common_RESOURCES})
|
||||
add_library(common ${common_SRCS} ${common_RCC})
|
||||
|
||||
target_link_libraries(common
|
||||
datamodels
|
||||
firmwares
|
||||
storage
|
||||
shared
|
||||
simulation
|
||||
storage
|
||||
maxLibQt
|
||||
Qt5::Core
|
||||
Qt5::Xml
|
||||
@@ -188,9 +190,9 @@ include(FetchMaxLibQt)
|
||||
|
||||
add_subdirectory(datamodels)
|
||||
add_subdirectory(firmwares)
|
||||
add_subdirectory(shared)
|
||||
add_subdirectory(modeledit)
|
||||
add_subdirectory(generaledit)
|
||||
add_subdirectory(modeledit)
|
||||
add_subdirectory(shared)
|
||||
add_subdirectory(simulation)
|
||||
add_subdirectory(storage)
|
||||
add_subdirectory(thirdparty/qcustomplot)
|
||||
@@ -200,96 +202,65 @@ add_subdirectory(updates)
|
||||
|
||||
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
|
||||
helpers_html.cpp
|
||||
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_SRCS}
|
||||
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
|
||||
apppreferencesdialog.h
|
||||
burnconfigdialog.h
|
||||
comparedialog.h
|
||||
printdialog.h
|
||||
logsdialog.h
|
||||
customizesplashdialog.h
|
||||
splashlibrarydialog.h
|
||||
set(companion_HDRS
|
||||
${companion_HDRS}
|
||||
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)
|
||||
set(icon_RC images/winicons/icon.rc)
|
||||
endif()
|
||||
|
||||
qt5_wrap_ui(companion_SRCS ${companion_UIS})
|
||||
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 miniz shared updates ${CPN_COMMON_LIB})
|
||||
add_executable(${COMPANION_NAME} MACOSX_BUNDLE ${WIN_EXECUTABLE_TYPE} ${companion_SRCS} ${companion_HDRS} ${icon_RC})
|
||||
target_link_libraries(${COMPANION_NAME} PRIVATE ${CPN_COMMON_LIB} generaledit modeledit qcustomplot miniz updates)
|
||||
|
||||
PrintTargetReport("${COMPANION_NAME}")
|
||||
|
||||
|
||||
@@ -1,20 +1,24 @@
|
||||
|
||||
set(datamodels_SRCS
|
||||
compounditemmodels.cpp
|
||||
filtereditemmodels.cpp
|
||||
project(datamodels)
|
||||
|
||||
set(${PROJECT_NAME}_NAMES
|
||||
compounditemmodels
|
||||
filtereditemmodels
|
||||
)
|
||||
|
||||
set(datamodels_HDRS
|
||||
compounditemmodels.h
|
||||
filtereditemmodels.h
|
||||
AddHeadersSources()
|
||||
|
||||
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_link_libraries(datamodels PRIVATE ${CPN_COMMON_LIB})
|
||||
|
||||
target_include_directories(datamodels
|
||||
target_include_directories(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
"${CMAKE_SOURCE_DIR}"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}"
|
||||
|
||||
@@ -1,75 +1,70 @@
|
||||
|
||||
set(firmwares_SRCS
|
||||
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
|
||||
)
|
||||
project(firmwares)
|
||||
|
||||
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
|
||||
eepromimportexport.h
|
||||
moduledata.h
|
||||
customisation_data.h
|
||||
)
|
||||
AddHeadersSources()
|
||||
|
||||
set(firmwares_QT
|
||||
curvereference.h
|
||||
)
|
||||
add_library(${PROJECT_NAME}
|
||||
${${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_link_libraries(firmwares ${CPN_COMMON_LIB} datamodels shared Qt5::Core Qt5::Xml Qt5::Widgets)
|
||||
target_link_libraries(firmwares yaml-cpp)
|
||||
|
||||
target_include_directories(firmwares
|
||||
target_include_directories(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
${CMAKE_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
@@ -79,4 +74,4 @@ target_include_directories(firmwares
|
||||
"${CMAKE_CURRENT_LIST_DIR}/ersky9x"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/opentx"
|
||||
"${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
|
||||
generaloptions
|
||||
generalsetup
|
||||
hardware
|
||||
timezoneedit
|
||||
trainer
|
||||
)
|
||||
|
||||
set(generaledit_SRCS
|
||||
calibration.cpp
|
||||
hardware.cpp
|
||||
trainer.cpp
|
||||
generaloptions.cpp
|
||||
timezoneedit.cpp
|
||||
AddHeadersSources()
|
||||
|
||||
add_library(${PROJECT_NAME}
|
||||
${${PROJECT_NAME}_HDRS}
|
||||
${${PROJECT_NAME}_SRCS}
|
||||
)
|
||||
|
||||
set(generaledit_HDRS
|
||||
calibration.h
|
||||
hardware.h
|
||||
trainer.h
|
||||
generaloptions.h
|
||||
timezoneedit.h
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
${CPN_COMMON_LIB}
|
||||
Qt5::Multimedia
|
||||
)
|
||||
|
||||
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
|
||||
modeledit
|
||||
setup
|
||||
heli
|
||||
telemetry
|
||||
expodialog
|
||||
mixerdialog
|
||||
project(modeledit)
|
||||
|
||||
set(${PROJECT_NAME}_NAMES
|
||||
channels
|
||||
checklistdialog
|
||||
colorcustomscreens
|
||||
curves
|
||||
customfunctions
|
||||
expodialog
|
||||
flightmodes
|
||||
inputs
|
||||
heli
|
||||
logicalswitches
|
||||
mixerdialog
|
||||
mixes
|
||||
mixerslistwidget
|
||||
modeledit
|
||||
modeloptions
|
||||
setup
|
||||
telemetry
|
||||
telemetry_customscreens
|
||||
)
|
||||
|
||||
set(modeledit_SRCS
|
||||
flightmodes.cpp
|
||||
inputs.cpp
|
||||
mixes.cpp
|
||||
channels.cpp
|
||||
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
|
||||
AddHeadersSources()
|
||||
|
||||
# AUTOMOC does not detect so manually process
|
||||
qt5_wrap_cpp(${PROJECT_NAME}_SRCS
|
||||
${${PROJECT_NAME}_HDRS}
|
||||
)
|
||||
|
||||
set(modeledit_HDRS
|
||||
flightmodes.h
|
||||
inputs.h
|
||||
mixes.h
|
||||
channels.h
|
||||
logicalswitches.h
|
||||
customfunctions.h
|
||||
mixerslistwidget.h
|
||||
# node.h
|
||||
colorcustomscreens.h
|
||||
telemetry_customscreens.h
|
||||
curves.h
|
||||
modeloptions.h
|
||||
add_library(${PROJECT_NAME}
|
||||
${${PROJECT_NAME}_SRCS}
|
||||
)
|
||||
|
||||
set(modeledit_UIS
|
||||
setup_timer.ui
|
||||
setup_module.ui
|
||||
setup_function_switches.ui
|
||||
flightmode.ui
|
||||
telemetry_customscreen.ui
|
||||
telemetry_sensor.ui
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
${CPN_COMMON_LIB}
|
||||
Qt5::Multimedia
|
||||
)
|
||||
|
||||
foreach(name ${modeledit_NAMES})
|
||||
set(modeledit_SRCS ${modeledit_SRCS} ${name}.cpp)
|
||||
set(modeledit_HDRS ${modeledit_HDRS} ${name}.h)
|
||||
set(modeledit_UIS ${modeledit_UIS} ${name}.ui)
|
||||
endforeach()
|
||||
|
||||
qt5_wrap_ui(modeledit_SRCS ${modeledit_UIS})
|
||||
qt5_wrap_cpp(modeledit_SRCS ${modeledit_HDRS})
|
||||
|
||||
add_library(modeledit ${modeledit_SRCS})
|
||||
target_link_libraries(modeledit PRIVATE datamodels ${CPN_COMMON_LIB} Qt5::Multimedia)
|
||||
target_include_directories(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
"${CMAKE_SOURCE_DIR}"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}"
|
||||
"${maxLibQt_SOURCE_DIR}/widgets"
|
||||
PUBLIC
|
||||
"${CMAKE_CURRENT_LIST_DIR}"
|
||||
)
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${maxLibQt_SOURCE_DIR}/widgets)
|
||||
|
||||
set(shared_NAMES
|
||||
genericpanel
|
||||
verticalscrollarea
|
||||
project(shared)
|
||||
|
||||
set(${PROJECT_NAME}_NAMES
|
||||
autobitsetcheckbox
|
||||
autocheckbox
|
||||
autocombobox
|
||||
@@ -16,27 +15,40 @@ set(shared_NAMES
|
||||
autotimeedit
|
||||
curveimagewidget
|
||||
curvedialog
|
||||
genericpanel
|
||||
verticalscrollarea
|
||||
)
|
||||
|
||||
set(shared_UIS
|
||||
curvedialog.ui
|
||||
AddHeadersSources()
|
||||
|
||||
# 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
|
||||
set(shared_SRCS ${shared_SRCS}
|
||||
set(${PROJECT_NAME}_SRCS
|
||||
${${PROJECT_NAME}_SRCS}
|
||||
autowidget.h
|
||||
autowidget.cpp
|
||||
curveimage.h
|
||||
curveimage.cpp
|
||||
)
|
||||
|
||||
add_library(shared ${shared_SRCS})
|
||||
target_link_libraries(shared PRIVATE datamodels Qt5::Widgets ${CPN_COMMON_LIB})
|
||||
add_library(${PROJECT_NAME}
|
||||
${${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
|
||||
filteredtextbuffer.cpp
|
||||
radiooutputswidget.cpp
|
||||
simulateduiwidget.cpp
|
||||
|
||||
project(simulation)
|
||||
|
||||
set(${PROJECT_NAME}_NAMES
|
||||
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
|
||||
simulateduiwidgetX9LITE.cpp
|
||||
simulateduiwidgetX7.cpp
|
||||
simulateduiwidgetX9.cpp
|
||||
simulateduiwidgetXLITE.cpp
|
||||
simulateduiwidgetX9E.cpp
|
||||
simulateduiwidgetX9D2019.cpp
|
||||
simulateduiwidgetX10.cpp
|
||||
simulateduiwidgetX12.cpp
|
||||
simulateduiwidgetLR3PRO.cpp
|
||||
simulateduiwidgetBoxer.cpp
|
||||
simulateduiwidgetCommando8.cpp
|
||||
simulateduiwidgetEL18.cpp
|
||||
simulateduiwidgetJumperT12.cpp
|
||||
simulateduiwidgetJumperTLITE.cpp
|
||||
simulateduiwidgetJumperTPRO.cpp
|
||||
simulateduiwidgetJumperT16.cpp
|
||||
simulateduiwidgetJumperT18.cpp
|
||||
simulateduiwidgetTX12.cpp
|
||||
simulateduiwidgetZorro.cpp
|
||||
simulateduiwidgetBoxer.cpp
|
||||
simulateduiwidgetT8.cpp
|
||||
simulateduiwidgetTX16S.cpp
|
||||
simulateduiwidgetJumperTLITE.cpp
|
||||
simulateduiwidgetJumperTPRO.cpp
|
||||
simulateduiwidgetLR3PRO.cpp
|
||||
simulateduiwidgetNV14.cpp
|
||||
simulateduiwidgetEL18.cpp
|
||||
simulatorinterface.cpp
|
||||
simulatormainwindow.cpp
|
||||
simulatorstartupdialog.cpp
|
||||
simulatorwidget.cpp
|
||||
telemetrysimu.cpp
|
||||
trainersimu.cpp
|
||||
widgets/radiowidget.cpp
|
||||
widgets/virtualjoystickwidget.cpp
|
||||
widgets/lcdwidget.cpp
|
||||
simulateduiwidgetT8.cpp
|
||||
simulateduiwidgetTX12.cpp
|
||||
simulateduiwidgetTX16S.cpp
|
||||
simulateduiwidgetX10.cpp
|
||||
simulateduiwidgetX12.cpp
|
||||
simulateduiwidgetX7.cpp
|
||||
simulateduiwidgetX9.cpp
|
||||
simulateduiwidgetX9D2019.cpp
|
||||
simulateduiwidgetX9E.cpp
|
||||
simulateduiwidgetX9LITE.cpp
|
||||
simulateduiwidgetXLITE.cpp
|
||||
simulateduiwidgetZorro.cpp
|
||||
)
|
||||
|
||||
set(simulation_UIS
|
||||
debugoutput.ui
|
||||
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
|
||||
set(${PROJECT_NAME}_HDRS
|
||||
${${PROJECT_NAME}_HDRS}
|
||||
radiouiaction.h
|
||||
simulateduiwidget.h
|
||||
# simulator.h
|
||||
simulatorinterface.h
|
||||
simulatormainwindow.h
|
||||
simulatorstartupdialog.h
|
||||
simulatorwidget.h
|
||||
telemetrysimu.h
|
||||
trainersimu.h
|
||||
widgets/buttonswidget.h
|
||||
widgets/lcdwidget.h
|
||||
widgets/radiowidget.h
|
||||
widgets/radiofaderwidget.h
|
||||
widgets/radiokeywidget.h
|
||||
widgets/radioknobwidget.h
|
||||
widgets/radioswitchwidget.h
|
||||
widgets/radiotrimwidget.h
|
||||
widgets/sliderwidget.h
|
||||
widgets/virtualjoystickwidget.h
|
||||
)
|
||||
|
||||
if(SDL2_FOUND)
|
||||
set(simulation_SRCS
|
||||
${simulation_SRCS}
|
||||
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
|
||||
# AUTOMOC does not detect so manually process
|
||||
qt5_wrap_cpp(${PROJECT_NAME}_SRCS
|
||||
${${PROJECT_NAME}_HDRS}
|
||||
)
|
||||
|
||||
qt5_wrap_ui(simulation_SRCS ${simulation_UIS})
|
||||
qt5_wrap_cpp(simulation_SRCS ${simulation_HDRS})
|
||||
add_library(${PROJECT_NAME}
|
||||
${${PROJECT_NAME}_SRCS}
|
||||
)
|
||||
|
||||
add_library(simulation ${simulation_SRCS} ${simulation_HDRS})
|
||||
target_link_libraries(simulation PRIVATE ${CPN_COMMON_LIB} shared Qt5::Core Qt5::Widgets Qt5::Svg)
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
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
|
||||
mountlist
|
||||
rlefile
|
||||
@@ -19,22 +20,30 @@ set(storage_NAMES
|
||||
minizinterface
|
||||
)
|
||||
|
||||
set(storage_SRCS
|
||||
)
|
||||
AddHeadersSources()
|
||||
|
||||
set(storage_HDRS
|
||||
)
|
||||
|
||||
set(storage_MOC_HDRS
|
||||
# AUTOMOC does not detect so manually process
|
||||
set(${PROJECT_NAME}_MOC
|
||||
appdata.h
|
||||
)
|
||||
|
||||
foreach(name ${storage_NAMES})
|
||||
set(storage_SRCS ${storage_SRCS} ${name}.cpp)
|
||||
set(storage_HDRS ${storage_HDRS} ${name}.h)
|
||||
endforeach()
|
||||
qt5_wrap_cpp(${PROJECT_NAME}_SRCS
|
||||
${${PROJECT_NAME}_MOC}
|
||||
)
|
||||
|
||||
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(storage PRIVATE miniz ${CPN_COMMON_LIB})
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
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
|
||||
updates
|
||||
updatesdialog
|
||||
updateoptionsdialog
|
||||
updatestatus
|
||||
updatenetwork
|
||||
project(updates)
|
||||
|
||||
set(${PROJECT_NAME}_NAMES
|
||||
chooserdialog
|
||||
downloaddialog
|
||||
repo
|
||||
repoassets
|
||||
repodatamodels
|
||||
repometadata
|
||||
reporeleases
|
||||
repoassets
|
||||
repo
|
||||
updateparameters
|
||||
updateinterface
|
||||
updatefirmware
|
||||
updatecompanion
|
||||
updatesdcard
|
||||
updatesounds
|
||||
updatethemes
|
||||
updatemultiprotocol
|
||||
updatefactories
|
||||
chooserdialog
|
||||
updatefirmware
|
||||
updateinterface
|
||||
updatemultiprotocol
|
||||
updatenetwork
|
||||
updateoptionsdialog
|
||||
updateparameters
|
||||
updates
|
||||
updatesdcard
|
||||
updatesdialog
|
||||
updatesounds
|
||||
updatestatus
|
||||
updatethemes
|
||||
)
|
||||
|
||||
foreach(name ${updates_NAMES})
|
||||
set(updates_SRCS ${updates_SRCS} ${name}.cpp)
|
||||
set(updates_HDRS ${updates_HDRS} ${name}.h)
|
||||
endforeach()
|
||||
AddHeadersSources()
|
||||
|
||||
set(updates_UIS
|
||||
updatesdialog.ui
|
||||
updateoptionsdialog.ui
|
||||
chooserdialog.ui
|
||||
)
|
||||
|
||||
set(updates_QTS
|
||||
# AUTOMOC does not detect so manually process
|
||||
set(${PROJECT_NAME}_MOC
|
||||
chooserdialog.h
|
||||
updateinterface.h
|
||||
updateoptionsdialog.h
|
||||
updates.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(updates_SRCS ${updates_QTS})
|
||||
qt5_wrap_cpp(${PROJECT_NAME}_SRCS
|
||||
${${PROJECT_NAME}_MOC}
|
||||
)
|
||||
|
||||
add_library(updates ${updates_SRCS} ${updates_HDRS})
|
||||
target_link_libraries(updates PRIVATE ${CPN_COMMON_LIB})
|
||||
add_library(${PROJECT_NAME}
|
||||
${${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