summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
blob: eabedc8d7b0172657172ad127b877aa27ea5a3ea (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
INCLUDE(FindPkgConfig)
pkg_check_modules(APP_PKGS REQUIRED
	glib-2.0
	dlog
	json-glib-1.0
	aul
	things-service-worker
)

FOREACH (flag ${APP_PKGS_CFLAGS})
	SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
ENDFOREACH(flag)

SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden -Wall -Winline -g -fno-builtin-malloc -fPIE")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -pie")

SET(SRCS
	task-worker.c
	procfs.c
	report-generator.c
	worker.c
	task-factory.c
	task.c
	scheduler.c
	config-deserializer.c
	appinfo-provider.c
	report-json-serializer.c
	sys-stats.c
	clock.c
	ipc.c
	process.c
	proc-scanner.c
	generators/report-generator-system.c
	generators/report-generator-load-avg.c
	generators/report-generator-process.c
	generators/report-generator-top.c
)
ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})

TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} -lm ${APP_PKGS_LDFLAGS})

INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR})