-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
77 lines (63 loc) · 1.86 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
73
74
75
76
77
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
# Project
PROJECT(qxneur)
# Common CMake modules
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/CMake)
INCLUDE(common)
# Qt
FIND_PACKAGE(Qt4 4.6.0 REQUIRED)
INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(-DQT_NO_CAST_FROM_ASCII)
# Directories
INCLUDE_DIRECTORIES(. src src/Config ${CMAKE_CURRENT_BINARY_DIR})
SET(sources
src/main.cpp
src/QXNeur.cpp
src/QXNLanguage.cpp
src/QXNKeyboard.cpp
src/QXNMenu.cpp
src/QXNTrayIcon.cpp
src/PropertyMapper.cpp
src/Config/QXNConfig.cpp
src/Config/QXNConfigDialog.cpp
src/Config/QXNApplicationSettingsDialog.cpp
src/Config/QXNAbbreviationEditDialog.cpp
src/Config/QXNApplicationsModel.cpp
)
SET(moc_headers
src/QXNeur.h
src/QXNLanguage.h
src/QXNKeyboard.h
src/QXNMenu.h
src/QXNTrayIcon.h
src/Config/QXNConfig.h
src/Config/QXNConfigDialog.h
src/Config/QXNApplicationSettingsDialog.h
src/Config/QXNAbbreviationEditDialog.h
src/Config/QXNApplicationsModel.h
)
SET(uis
src/Config/QXNConfigDialog.ui
src/Config/QXNApplicationSettingsDialog.ui
src/Config/QXNAbbreviationEditDialog.ui
)
SET(resources
images/images.qrc
)
SET(translations
translations/qxneur_ru.ts
)
SET(bin_target qxneur)
SET(tr_target qxneur_i18n)
# Updating and generating the translation
QT4_CREATE_TRANSLATION(qm_files ${CMAKE_CURRENT_SOURCE_DIR}/src ${translations} OPTIONS -no-ui-lines -locations relative -source-language english)
ADD_CUSTOM_TARGET(${tr_target} DEPENDS ${qm_files})
# Pre-processing by MOC, UIC and QRC
QT4_WRAP_CPP(sources ${moc_headers})
QT4_WRAP_CPP(sources src/PropertyMapper.h OPTIONS -fsrc/PropertyMapperPrivate.h)
QT4_WRAP_UI(sources ${uis})
QT4_ADD_RESOURCES(sources ${resources})
# Building the executable
ADD_EXECUTABLE(${bin_target} ${sources})
ADD_DEPENDENCIES(${bin_target} ${tr_target})
TARGET_LINK_LIBRARIES(${bin_target} ${QT_LIBRARIES} xnconfig Xmu)