This repository was archived by the owner on Jan 11, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
52 lines (39 loc) · 1.36 KB
/
CMakeLists.txt
File metadata and controls
52 lines (39 loc) · 1.36 KB
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
cmake_minimum_required(VERSION 3.7)
project(TinyTerm)
find_package(PkgConfig REQUIRED)
set(SCROLLBACK_LINES 4096)
set(WORD_CHARS "-A-Za-z0-9:./?%&#_=+@~")
set(SCROLLBAR FALSE)
set(SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src")
configure_file("${SOURCE_DIR}/config.h.in" "${SOURCE_DIR}/config.h")
# Set CMAKE_LIB_INSTALL_DIR if not defined
include(GNUInstallDirs)
if (${CMAKE_SYSTEM} MATCHES "^Linux*")
message("Target platform: Linux")
add_definitions("-DLinux")
elseif (${CMAKE_SYSTEM} MATCHES "^FreeBSD*")
message("Target platform: FreeBSD")
add_definitions("-DBSD")
elseif (${CMAKE_SYSTEM} MATCHES "^Darwin*")
message("Target platform: macOS/OSX")
add_definitions("-DOSX")
else ()
message("Unknown target OS, supposing Linux. Detected OS is: " ${CMAKE_SYSTEM})
add_definitions("-DLinux")
endif ()
add_definitions("-DUDEBUG=5")
include_directories(${GTK_INCLUDE_DIRS})
pkg_search_module(VTE REQUIRED vte)
if (VTE_FOUND)
add_definitions(-DHAVE_LIBVTE)
link_directories(${VTE_LIBRARY_DIRS})
include_directories(${VTE_INCLUDE_DIRS})
else ()
message("Fatal error -- VTE wasn't found...")
endif ()
add_executable(tinyterm "${SOURCE_DIR}/tinyterm.c")
target_link_libraries(tinyterm ${VTE_LIBRARIES})
install(TARGETS tinyterm
RUNTIME DESTINATION bin)
install(FILES "${SOURCE_DIR}/tinyterm.png"
DESTINATION share/pixmaps)