summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
blob: 95d9ddc1d16128f3a1cf03ebf95de9d1706fa724 (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
cmake_minimum_required(VERSION 2.8)

project(Instrument)
set(FW_VERSION 5.00)

# configure a header file to pass some of the CMake settings
# to the source code
configure_file (
    "${PROJECT_SOURCE_DIR}/version.h.in"
    "${PROJECT_BINARY_DIR}/version.h"
)

# add the binary tree to the search path for include files
# so that we will find TutorialConfig.h
include_directories("${PROJECT_BINARY_DIR}")

set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
find_package(Glib)
find_package(GIO)
include_directories(${GLIB_PKG_INCLUDE_DIRS})
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g")
add_executable(instr-daemon instr-daemon.c signalobject.c response.c)
add_executable(instr-client instr-client.c)

target_link_libraries(instr-daemon gio-2.0 gobject-2.0 glib-2.0)
target_link_libraries(instr-client gio-2.0 gobject-2.0 glib-2.0)

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