WaterLevelSensor/CMakeLists.txt

69 lines
1.8 KiB
Text
Raw Permalink Normal View History

2026-08-04 21:31:40 +05:30
cmake_minimum_required(VERSION 3.16)
project(WaterLevelRewrite VERSION 0.1 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
2026-08-12 18:22:15 +05:30
set(CMAKE_AUTORCC ON)
2026-08-04 21:31:40 +05:30
2026-09-14 15:31:21 +05:30
find_package(Qt6 REQUIRED COMPONENTS Gui Core Quick Multimedia)
2026-08-04 21:31:40 +05:30
qt_standard_project_setup(REQUIRES 6.10)
2026-09-14 15:31:21 +05:30
if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/importedcontent/CMakeLists.txt")
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/importedcontent)
endif()
2026-08-04 21:31:40 +05:30
qt_add_executable(appWaterLevelRewrite
main.cpp
)
qt_add_qml_module(appWaterLevelRewrite
URI WaterLevelRewrite
QML_FILES
Main.qml
2026-09-14 15:31:21 +05:30
WaterTank.qml
SettingsBarIcon.qml
SettingsPopup.qml
ConnectButton.qml
SOURCES
configinterface.h
configinterface.cpp
requestworker.h
requestworker.cpp
wifihelper.h
wifihelper.cpp
RESOURCES
media.qrc
2026-09-23 17:36:00 +05:30
QML_FILES CustomCheckBox.qml
QML_FILES RequestResponsePopup.qml
QML_FILES ColorInput.qml
2026-08-04 21:31:40 +05:30
)
2026-09-14 15:31:21 +05:30
if(APPLE)
set_target_properties(appWaterLevelRewrite PROPERTIES
# MACOSX_BUNDLE_GUI_IDENTIFIER com.example.appWaterLevelRewrite
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
MACOSX_BUNDLE TRUE
)
endif()
if(WIN32)
set_target_properties(appWaterLevelRewrite PROPERTIES
WIN32_EXECUTABLE TRUE
)
endif()
2026-08-04 21:31:40 +05:30
set_target_properties(appWaterLevelRewrite PROPERTIES
2026-09-14 15:31:21 +05:30
QT_ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android"
2026-08-04 21:31:40 +05:30
)
target_link_libraries(appWaterLevelRewrite
2026-09-14 15:31:21 +05:30
PRIVATE Qt6::Quick Qt6::Multimedia Qt6::Gui Qt6::Core
2026-08-04 21:31:40 +05:30
)
install(TARGETS appWaterLevelRewrite
BUNDLE DESTINATION .
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)