-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
165 lines (148 loc) · 5.18 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
cmake_minimum_required(VERSION 3.14)
project(tlpl)
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-std=c++17 -pthread")
#find_package(OpenCV 4.1.0 EXACT REQUIRED)
#find_package(Eigen3 REQUIRED)
#find_package(PCL REQUIRED COMPONENT common io)
#find_package(Qt5 COMPONENTS Core Gui Qml Quick Widgets Sql Xml Test REQUIRED)
#include_directories(/usr/local/include)
#include_directories(/usr/include)
#include_directories( /usr/local/include/eigen3)
#find_package(Pangolin REQUIRED)
#find_package(Qt5 COMPONENTS Core Gui Qml Quick Widgets Sql Xml Test REQUIRED)
#set(QT5_LIBRARIES Qt5::Core Qt5::Gui Qt5::Qml Qt5::Quick Qt5::Widgets Qt5::Test Qt5::Xml Qt5::Sql )
#include_directories(${OpenCV_INCLUDE_DIRS})
include_directories(/usr/local/zeromq/include)
include_directories(/usr/local/czmq/include)
#link_directories(${OpenCV_LIBRARY_DIRS})
#add_definitions(${OpenCV_DEFINITIONS})
file(GLOB LIB_SOURCES src/lib/*.h
src/lib/*.c)
add_library(tlpl_lib SHARED ${LIB_SOURCES})
include_directories(src/lib)
include_directories(src/sockets/include)
include_directories(src/daemons/include)
include_directories(src/files/lib)
file(GLOB sockets_SOURCES src/sockets/*.c)
find_package(ZeroMQ REQUIRED)
foreach(filename ${sockets_SOURCES})
get_filename_component(name ${filename} NAME_WE)
if(${name} MATCHES "inet_socket" OR ${name} MATCHES "rdwrn" OR ${name} MATCHES "unix_sockets"
OR ${name} MATCHES "read_line_buf" OR ${name} MATCHES "read_line" OR ${name} MATCHES "sendfile")
#message(STATUS "name =${name}")
add_library(${name} SHARED ${filename})
endif()
endforeach()
file(GLOB daemous_SOURCES src/daemons/*.c)
foreach(filename ${daemous_SOURCES})
get_filename_component(name ${filename} NAME_WE)
if(${name} STREQUAL become_daemon)
add_library(${name} SHARED ${filename})
endif()
endforeach()
file(GLOB files_lib_SOURCES src/files/lib/*.c)
foreach(filename ${files_lib_SOURCES})
get_filename_component(name ${filename} NAME_WE)
add_library(${name} SHARED ${filename})
endforeach()
file(GLOB procexec_lib_SOURCES src/procexec/lib/*.c)
foreach(filename ${procexec_lib_SOURCES})
get_filename_component(name ${filename} NAME_WE)
add_library(procexec_${name} SHARED ${filename})
endforeach ()
file(GLOB procres_lib_SOURCES src/procres/lib/*.c)
foreach(filename ${proccres_lib_SOURCES})
get_filename_component(name ${filename} NAME_WE)
add_library(proccres_${name} SHARED ${filename})
endforeach ()
file(GLOB time_lib_SOURCES src/time/lib/*.c)
foreach(filename ${time_lib_SOURCES})
get_filename_component(name ${filename} NAME_WE)
add_library(time_${name} SHARED ${filename})
endforeach ()
file(GLOB tty_lib_SOURCES src/tty/lib/*.c)
foreach(filename ${tty_lib_SOURCES})
get_filename_component(name ${filename} NAME_WE)
add_library(tty_${name} SHARED ${filename})
endforeach ()
file(GLOB users_groups_lib_SOURCES src/users_groups/lib/*.c)
foreach(filename ${users_groups_lib_SOURCES})
get_filename_component(name ${filename} NAME_WE)
add_library(users_groups_${name} SHARED ${filename})
endforeach ()
file(GLOB threads_lib_SOURCES src/threads/lib/*.c)
foreach(filename ${threads_lib_SOURCES})
get_filename_component(name ${filename} NAME_WE)
add_library(threads_${name} SHARED ${filename})
endforeach ()
file(GLOB timers_lib_SOURCES src/timers/lib/*.c)
foreach(filename ${timers_lib_SOURCES})
get_filename_component(name ${filename} NAME_WE)
add_library(timers_${name} SHARED ${filename})
endforeach ()
file(GLOB svsem_lib_SOURCES src/svsem/lib/*.c)
foreach(filename ${svsem_lib_SOURCES})
get_filename_component(name ${filename} NAME_WE)
add_library(svsem_${name} SHARED ${filename})
endforeach ()
file(GLOB signals_lib_SOURCES src/signals/lib/*.c)
foreach(filename ${signals_lib_SOURCES})
get_filename_component(name ${filename} NAME_WE)
add_library(signals_${name} SHARED ${filename})
endforeach ()
file(GLOB pty_lib_SOURCES src/pty/lib/*.c)
foreach(filename ${pty_lib_SOURCES})
get_filename_component(name ${filename} NAME_WE)
add_library(${name} SHARED ${filename} )
endforeach ()
file(GLOB zmq_c_lib_SOURCES src/zmq_c/lib/*.c)
foreach(filename ${zmq_c_lib_SOURCES})
get_filename_component(name ${filename} NAME_WE)
add_library(${name} SHARED ${filename} src/caffe2_example/blob.cpp)
endforeach()
add_executable(main main.cpp)
target_link_libraries(main)
SUBDIRS(src/fileio)
SUBDIRS(src/proccred)
SUBDIRS(src/sockets)
SUBDIRS(src/altio)
SUBDIRS(src/acl)
SUBDIRS(src/cap)
SUBDIRS(src/daemons)
SUBDIRS(src/dirs_links)
SUBDIRS(src/filebuff)
SUBDIRS(src/files)
SUBDIRS(src/filesys)
SUBDIRS(src/getopt)
SUBDIRS(src/inotify)
SUBDIRS(src/loginacct)
SUBDIRS(src/memalloc)
SUBDIRS(src/mmap)
SUBDIRS(src/pgsjc)
SUBDIRS(src/pipes)
SUBDIRS(src/pmsg)
SUBDIRS(src/proc)
SUBDIRS(src/procexec)
SUBDIRS(src/procpri)
SUBDIRS(src/procres)
SUBDIRS(src/progconc)
SUBDIRS(src/time)
SUBDIRS(src/xattr)
SUBDIRS(src/vmem)
SUBDIRS(src/tty)
SUBDIRS(src/users_groups)
SUBDIRS(src/threads)
SUBDIRS(src/timers)
SUBDIRS(src/syslim)
SUBDIRS(src/sysinfo)
SUBDIRS(src/svshm)
SUBDIRS(src/svsem)
SUBDIRS(src/svmsg)
SUBDIRS(src/svipc)
SUBDIRS(src/signals)
SUBDIRS(src/pshm)
SUBDIRS(src/psem)
SUBDIRS(src/pty)
SUBDIRS(src/zmq_cpp)
SUBDIRS(src/caffe2_example)
#SUBDIRS(src/redis_client)