WaterLevelSensor/CMakeLists.txt
2026-09-23 17:36:00 +05:30

69 lines
1.8 KiB
CMake

cmake_minimum_required(VERSION 3.16)
project(WaterLevelRewrite VERSION 0.1 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_AUTORCC ON)
find_package(Qt6 REQUIRED COMPONENTS Gui Core Quick Multimedia)
qt_standard_project_setup(REQUIRES 6.10)
if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/importedcontent/CMakeLists.txt")
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/importedcontent)
endif()
qt_add_executable(appWaterLevelRewrite
main.cpp
)
qt_add_qml_module(appWaterLevelRewrite
URI WaterLevelRewrite
QML_FILES
Main.qml
WaterTank.qml
SettingsBarIcon.qml
SettingsPopup.qml
ConnectButton.qml
SOURCES
configinterface.h
configinterface.cpp
requestworker.h
requestworker.cpp
wifihelper.h
wifihelper.cpp
RESOURCES
media.qrc
QML_FILES CustomCheckBox.qml
QML_FILES RequestResponsePopup.qml
QML_FILES ColorInput.qml
)
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()
set_target_properties(appWaterLevelRewrite PROPERTIES
QT_ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android"
)
target_link_libraries(appWaterLevelRewrite
PRIVATE Qt6::Quick Qt6::Multimedia Qt6::Gui Qt6::Core
)
install(TARGETS appWaterLevelRewrite
BUNDLE DESTINATION .
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)