installer-prompt/CMakeLists.txt

73 lines
2.2 KiB
CMake
Raw Normal View History

2023-12-04 21:03:36 -06:00
cmake_minimum_required(VERSION 3.16)
2022-06-23 22:08:08 -05:00
2024-10-01 09:30:57 -05:00
project(lubuntu-installer-prompt VERSION 2.0.0 LANGUAGES CXX)
2023-12-04 21:03:36 -06:00
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
2023-12-09 10:54:43 -06:00
set(CMAKE_CXX_STANDARD 23)
2023-12-04 21:03:36 -06:00
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_INSTALL_PREFIX "/")
2022-06-23 22:08:08 -05:00
find_package(ECM REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
2024-10-01 09:30:57 -05:00
find_package(Qt6 REQUIRED COMPONENTS Core Widgets Network LinguistTools)
find_package(KF6 REQUIRED COMPONENTS NetworkManagerQt)
2022-06-23 22:08:08 -05:00
file(GLOB TS_FILES "src/translations/lubuntu-installer-prompt_*.ts")
2022-06-23 22:08:08 -05:00
2023-12-04 21:03:36 -06:00
set(PROJECT_SOURCES
src/main.cpp
src/installerprompt.cpp
src/installerprompt.h
src/installerprompt.ui
src/backgroundscreen.h
src/backgroundscreen.cpp
2023-12-04 21:03:36 -06:00
src/resource.qrc
2024-02-18 15:10:24 -06:00
src/wifipassworddialog.h
src/wifipassworddialog.cpp
src/wifipassworddialog.ui
src/languagechangedialog.h
src/languagechangedialog.cpp
src/languagechangedialog.ui
src/warningdialog.h
src/warningdialog.cpp
src/warningdialog.ui
src/connectionprogressdialog.h
src/connectionprogressdialog.cpp
src/connectionprogressdialog.ui
2022-06-23 22:08:08 -05:00
)
2023-12-04 21:03:36 -06:00
set(TRANSLATION_RESOURCES "src/translations.qrc")
configure_file(${TRANSLATION_RESOURCES} translations.qrc COPYONLY)
2024-10-01 09:30:57 -05:00
qt_add_translation(QM_FILES ${TS_FILES})
qt_add_resources(QM_RESOURCES ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc)
2022-06-23 22:08:08 -05:00
2023-12-04 21:03:36 -06:00
add_custom_target(translations ALL DEPENDS ${QM_FILES})
add_executable(lubuntu-installer-prompt
${PROJECT_SOURCES}
${QM_RESOURCES}
)
2023-12-04 21:03:36 -06:00
add_dependencies(lubuntu-installer-prompt translations)
2024-10-01 09:30:57 -05:00
target_link_libraries(lubuntu-installer-prompt PRIVATE Qt6::Widgets Qt6::Network KF6::NetworkManagerQt)
2023-12-04 21:03:36 -06:00
install(TARGETS lubuntu-installer-prompt
BUNDLE DESTINATION .
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
install(PROGRAMS "scripts/change-system-language" DESTINATION usr/libexec)
install(PROGRAMS "scripts/start-lubuntu-live-env" DESTINATION usr/libexec)
install(FILES "lubuntu-live-environment.desktop" DESTINATION usr/share/xsessions)
install(FILES "rc.xml" DESTINATION etc/xdg/xdg-lubuntu-live-environment/openbox)
install(FILES "panel.conf" DESTINATION etc/xdg/xdg-lubuntu-live-environment/lxqt)
2023-12-04 21:03:36 -06:00
if(QT_VERSION_MAJOR EQUAL 6)
qt_finalize_executable(lubuntu-installer-prompt)
endif()