2023-12-04 21:03:36 -06:00
|
|
|
cmake_minimum_required(VERSION 3.16)
|
2022-06-23 22:08:08 -05:00
|
|
|
|
2024-01-01 13:51:18 -06:00
|
|
|
project(lubuntu-installer-prompt VERSION 1.1.2 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)
|
2023-12-09 12:15:42 -06:00
|
|
|
set(CMAKE_INSTALL_PREFIX "/usr")
|
2022-06-23 22:08:08 -05:00
|
|
|
|
2023-12-02 14:12:27 -06:00
|
|
|
find_package(ECM REQUIRED NO_MODULE)
|
|
|
|
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
|
2023-12-04 21:03:36 -06:00
|
|
|
find_package(QT NAMES Qt5 REQUIRED COMPONENTS Core Widgets Network LinguistTools)
|
|
|
|
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Widgets Network LinguistTools)
|
2023-12-09 09:14:36 -06:00
|
|
|
find_package(KF5 REQUIRED COMPONENTS NetworkManagerQt WidgetsAddons)
|
2022-06-23 22:08:08 -05:00
|
|
|
|
2023-12-23 16:50:33 -06: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
|
2023-12-14 20:23:15 -06:00
|
|
|
src/backgroundscreen.h
|
|
|
|
src/backgroundscreen.cpp
|
2023-12-04 21:03:36 -06:00
|
|
|
src/resource.qrc
|
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)
|
|
|
|
qt5_add_translation(QM_FILES ${TS_FILES})
|
|
|
|
qt5_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}
|
|
|
|
)
|
2022-06-30 14:54:28 -05:00
|
|
|
|
2023-12-04 21:03:36 -06:00
|
|
|
add_dependencies(lubuntu-installer-prompt translations)
|
|
|
|
|
2023-12-09 09:14:36 -06:00
|
|
|
target_link_libraries(lubuntu-installer-prompt PRIVATE Qt${QT_VERSION_MAJOR}::Widgets Qt5::Network KF5::NetworkManagerQt KF5::WidgetsAddons)
|
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}
|
|
|
|
)
|
2023-12-09 12:06:49 -06:00
|
|
|
install(PROGRAMS "scripts/change-system-language" DESTINATION libexec)
|
2023-01-25 00:07:46 -06:00
|
|
|
install(PROGRAMS "scripts/lubuntu-installer" DESTINATION libexec)
|
2023-12-23 16:07:37 -06:00
|
|
|
install(PROGRAMS "scripts/start-lubuntu-live-env" DESTINATION libexec)
|
2023-02-06 16:22:55 -06:00
|
|
|
install(FILES "lubuntu-live-environment.desktop" DESTINATION share/xsessions)
|
2023-12-04 21:03:36 -06:00
|
|
|
|
|
|
|
if(QT_VERSION_MAJOR EQUAL 6)
|
|
|
|
qt_finalize_executable(lubuntu-installer-prompt)
|
|
|
|
endif()
|