summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
blob: 5fe24b6d5d3c0c4eae9d0a368a91d25872ab5fd2 (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
cmake_minimum_required(VERSION 2.8)
project(Instrument)
include(FindPkgConfig)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
find_package(Glib)
find_package(GIO)
find_package(Mhash)
find_package(PAM)

pkg_check_modules(LIBUSER REQUIRED libuser)
add_definitions(${LIBUSER_CFLAGS})
#add_definitions(${PAM_INCLUDE_DIR})

include_directories(${GLIB_PKG_INCLUDE_DIRS})
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -funsigned-char -Wall")
add_executable(instr-daemon instr-daemon.c 
				signalobject.c 
				response.c
				parser.c
				error_utils.c
				device-functions.c
				string_utils.c
				globals.c
				i2c.c
				lcd.c
				flash.c
				nicutils.c
				bus.c
				monitor.c
				menus.c
				gpib.c
				dds.c
)
add_executable(instr-client instr-client.c)

target_link_libraries(instr-daemon gio-2.0 gobject-2.0 glib-2.0 gthread-2.0 mhash m pam user)
target_link_libraries(instr-client gio-2.0 gobject-2.0 glib-2.0)

INSTALL(TARGETS instr-daemon instr-client
  RUNTIME DESTINATION /usr/bin)