summaryrefslogtreecommitdiff
path: root/src/fqterm/CMakeLists.txt
blob: b8d6e9a2e70c76a65b49f0f37b0fc7e564185b40 (plain)
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
78
79
80
81
82
83
84
85
set(fqterm_SRCS
  fqterm_app.h
  fqterm_frame.h
  fqterm_screen.h
  fqterm_window.h
  fqterm_wndmgr.h
  fqterm_app.cpp
  fqterm_frame.cpp
  fqterm_screen.cpp
  fqterm_window.cpp
  fqterm_wndmgr.cpp
  fqterm_python.h
  fqterm_python.cpp
  fqterm_scriptengine.h
  fqterm_scriptengine.cpp
)

IF(GLOBAL_HOTKEY EQUAL 1)
IF(WIN32)
  set(global_shortcut_impl_SRCS 3rdparty/qxtglobalshortcut_win.cpp)
ELSE(WIN32)
  IF(APPLE)
    set(global_shortcut_impl_SRCS 3rdparty/qxtglobalshortcut_mac.cpp)
  ELSE(APPLE)
    set(global_shortcut_impl_SRCS 3rdparty/qxtglobalshortcut_x11.cpp)
  ENDIF(APPLE)
ENDIF(WIN32)
set(GLOBAL_SHORTCUT_SRC
  ${global_shortcut_impl_SRCS}
  3rdparty/qxtglobalshortcut.cpp
  3rdparty/qxtglobalshortcut.h
  3rdparty/qxtglobalshortcut_p.h
  3rdparty/qxtglobal.h
)
ADD_DEFINITIONS(-DUSE_GLOBAL_HOTKEY)
ENDIF(GLOBAL_HOTKEY EQUAL 1)
  

set(3rdparty_SRCS
  3rdparty/dotnetstyle.cpp
  3rdparty/dotnetstyle.h
  3rdparty/uaocodec.h
  3rdparty/uaocodec.cpp
  ${GLOBAL_SHORTCUT_SRC}
)

qt4_automoc(${fqterm_SRCS}
            ${3rdparty_SRCS}
)

qt4_create_translation(fqterm_qm_file
  ${fqterm_SRCS}
  ${CMAKE_SOURCE_DIR}/res/dict/fqterm_zh_CN.ts
)

include_directories(
  ${QT_INCLUDE_DIR}
  ${QT_QTCORE_INCLUDE_DIR}
  ${QT_QTGUI_INCLUDE_DIR}
  ${QT_QTNETWORK_INCLUDE_DIR}
  ${QT_QTSCRIPT_INCLUDE_DIR}
  ${CMAKE_CURRENT_SOURCE_DIR}/../common
  ${CMAKE_CURRENT_SOURCE_DIR}/../protocol
  ${CMAKE_CURRENT_SOURCE_DIR}/../terminal
  ${CMAKE_CURRENT_SOURCE_DIR}/../utilities
  ${CMAKE_CURRENT_SOURCE_DIR}/../unite
  ${CMAKE_CURRENT_SOURCE_DIR}/../ui
  ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty
  ${CMAKE_CURRENT_BINARY_DIR}/../ui
  ${CMAKE_CURRENT_BINARY_DIR}
)

add_library(fqterm_main
  ${fqterm_SRCS}
  ${3rdparty_SRCS}
)

add_dependencies(fqterm_main
  fqterm_common
  fqterm_terminal
  fqterm_protocol
  fqterm_ui
  fqterm_utilities
  fqterm_unite
)