-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
79 lines (65 loc) · 1.9 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
78
79
#cmake -DCMAKE_BUILD_TYPE=Release .
#cmake -DCMAKE_BUILD_TYPE=Debug .
cmake_minimum_required(VERSION 3.1)
project(cursespp)
set (cursespp_VERSION_MAJOR 0)
set (cursespp_VERSION_MINOR 1)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fPIC -g")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fPIC -O2")
include_directories (
"${cursespp_SOURCE_DIR}/src"
"${cursespp_SOURCE_DIR}/f8n/src"
"${cursespp_SOURCE_DIR}/f8n/src/3rdparty/include"
)
if (EXISTS "/etc/arch-release" OR EXISTS "/etc/manjaro-release" OR NO_NCURSESW)
add_definitions (-DNO_NCURSESW)
elseif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
add_definitions (-DNO_NCURSESW)
endif ()
set (CURSESPP_SRCS
./src/App.cpp
./src/AppLayout.cpp
./src/Checkbox.cpp
./src/Colors.cpp
./src/DialogOverlay.cpp
./src/IMouseHandler.cpp
./src/InputOverlay.cpp
./src/LayoutBase.cpp
./src/ListWindow.cpp
./src/ListOverlay.cpp
./src/MultiLineEntry.cpp
./src/OverlayStack.cpp
./src/SchemaOverlay.cpp
./src/Screen.cpp
./src/Scrollbar.cpp
./src/ScrollAdapterBase.cpp
./src/ScrollableWindow.cpp
./src/ShortcutsWindow.cpp
./src/SimpleScrollAdapter.cpp
./src/SingleLineEntry.cpp
./src/Text.cpp
./src/TextLabel.cpp
./src/TextInput.cpp
./src/ToastOverlay.cpp
./src/Win32Util.cpp
./src/Window.cpp
)
add_library(cursespp SHARED ${CURSESPP_SRCS})
add_subdirectory("${cursespp_SOURCE_DIR}/f8n")
add_dependencies(cursespp f8n)
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
target_link_libraries(cursespp ncursesw panelw f8n)
else (CMAKE_SYSTEM_NAME MATCHES "Linux")
target_link_libraries(cursespp curses panel f8n)
endif (CMAKE_SYSTEM_NAME MATCHES "Linux")
target_include_directories(cursespp BEFORE PRIVATE ${VENDOR_INCLUDE_DIRECTORIES})
# file(GLOB sdk_headers "src/*.h")
# install(
# FILES ${sdk_headers}
# DESTINATION include/cursespp
# )
# install(
# FILES lib/libcursespp.a
# DESTINATION lib/
# )