You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
89 lines
2.0 KiB
89 lines
2.0 KiB
cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
|
|
project(lxqt-about)
|
|
|
|
option(UPDATE_TRANSLATIONS "Update source translation translations/*.ts files" OFF)
|
|
|
|
include(GNUInstallDirs)
|
|
|
|
set(CMAKE_AUTOMOC ON)
|
|
set(CMAKE_AUTOUIC ON)
|
|
set(CMAKE_AUTORCC ON)
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|
|
|
set(CPP_FILES
|
|
aboutdialog/lxqtaboutdialog.cpp
|
|
aboutdialog/technicalinfo.cpp
|
|
translatorsinfo/translatorsinfo.cpp
|
|
main.cpp
|
|
)
|
|
|
|
set(UI_FILES
|
|
aboutdialog/lxqtaboutdialog.ui
|
|
)
|
|
|
|
find_package(lxqt REQUIRED QUIET)
|
|
|
|
include(LXQtCompilerSettings NO_POLICY_SCOPE)
|
|
|
|
if(NOT CMAKE_BUILD_TYPE)
|
|
set(CMAKE_BUILD_TYPE Release)
|
|
endif()
|
|
|
|
# Translations **********************************
|
|
include(LXQtTranslate)
|
|
|
|
lxqt_translate_ts(QM_FILES
|
|
UPDATE_TRANSLATIONS ${UPDATE_TRANSLATIONS}
|
|
SOURCES
|
|
${H_FILES}
|
|
${CPP_FILES}
|
|
${UI_FILES}
|
|
INSTALL_DIR
|
|
"${LXQT_TRANSLATIONS_DIR}/${PROJECT_NAME}"
|
|
)
|
|
|
|
lxqt_app_translation_loader(QM_LOADER ${PROJECT_NAME})
|
|
|
|
lxqt_translate_desktop(DESKTOP_FILES
|
|
SOURCES
|
|
resources/lxqt-about.desktop.in
|
|
)
|
|
#************************************************
|
|
|
|
include(translatorsinfo/CMakeLists.txt)
|
|
get_translatorsinfo_qrc(translatorsinfo_qrc)
|
|
|
|
add_executable(${PROJECT_NAME}
|
|
${CPP_FILES}
|
|
${QM_FILES}
|
|
${DESKTOP_FILES}
|
|
${translatorsinfo_qrc}
|
|
${QM_LOADER}
|
|
|
|
)
|
|
|
|
target_link_libraries(${PROJECT_NAME}
|
|
lxqt
|
|
)
|
|
|
|
install(TARGETS
|
|
${PROJECT_NAME}
|
|
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
|
COMPONENT Runtime
|
|
)
|
|
install(FILES
|
|
${DESKTOP_FILES}
|
|
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications"
|
|
COMPONENT Runtime
|
|
)
|
|
|
|
# building tarball with CPack -------------------------------------------------
|
|
include(InstallRequiredSystemLibraries)
|
|
set(CPACK_PACKAGE_VERSION_MAJOR ${LXQT_MAJOR_VERSION})
|
|
set(CPACK_PACKAGE_VERSION_MINOR ${LXQT_MINOR_VERSION})
|
|
set(CPACK_PACKAGE_VERSION_PATCH ${LXQT_PATCH_VERSION})
|
|
set(CPACK_GENERATOR TBZ2)
|
|
set(CPACK_SOURCE_GENERATOR TBZ2)
|
|
set(CPACK_SOURCE_IGNORE_FILES /build/;.gitignore;.*~;.git;.kdev4;temp)
|
|
include(CPack)
|