forked from lxqt/lxqt-openssh-askpass
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
72 lines (55 loc) · 1.91 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
cmake_minimum_required(VERSION 2.6)
project(lxqt-openssh-askpass)
# additional cmake files
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
add_definitions(-Wall)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
find_package(Qt5Widgets REQUIRED QUIET)
find_package(Qt5LinguistTools REQUIRED QUIET)
find_package(lxqt-qt5 REQUIRED QUIET)
set(QTX_INCLUDE_DIRS ${QT_QTCORE_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR})
set(QTX_LIBRARIES ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
include(${LXQT_USE_FILE})
include_directories (
${LXQT_INCLUDE_DIRS}
"${CMAKE_CURRENT_BINARY_DIR}"
${QTX_INCLUDE_DIRS}
src
)
set(lxqt-openssh-askpass_HDRS
src/mainwindow.h
)
set(lxqt-openssh-askpass_SRCS
src/main.cpp
src/mainwindow.cpp
)
set(lxqt-openssh-askpass_UIS
src/mainwindow.ui
)
# Translations **********************************
include(LxQtTranslate)
lxqt_translate_ts(QM_FILES
SOURCES
${lxqt-openssh-askpass_HDRS}
${lxqt-openssh-askpass_SRCS}
${lxqt-openssh-askpass_UIS}
)
#************************************************
qt5_wrap_cpp(MOCS ${lxqt-openssh-askpass_HDRS})
qt5_wrap_ui(UIS ${lxqt-openssh-askpass_UIS})
add_executable(lxqt-openssh-askpass ${lxqt-openssh-askpass_SRCS} ${UIS} ${RSCS} ${TRS} ${MOCS} ${QM_FILES})
target_link_libraries(lxqt-openssh-askpass ${QTX_LIBRARIES} ${LXQT_LIBRARIES})
INSTALL(TARGETS lxqt-openssh-askpass RUNTIME DESTINATION bin)
# 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)