-
Notifications
You must be signed in to change notification settings - Fork 5
/
CMakeLists.txt
87 lines (59 loc) · 1.66 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
message(FATAL_ERROR "This repository has moved to GitLab\n\nGet socketSYNerg from\n\thttps://gitlab.com/arpa2/socketSYNergy/\n")
#
# CMakeLists.txt for synergy
#
cmake_minimum_required (VERSION 3.1 FATAL_ERROR)
project ("SocketSynergy" C)
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
include (MacroEnsureOutOfSourceBuild)
include (MacroAddUninstallTarget)
include (MacroGitVersionInfo)
include (MacroCreateConfigFiles)
#
# OPTIONS / BUILD SETTINGS
#
macro_ensure_out_of_source_build ("Do not build SocketSynergy in the source dir!")
get_version_from_git (SocketSynergy 0.0.0)
enable_testing ()
option (DEBUG
"Add debugging support while building the software"
OFF)
#
# DEPENDENCIES
#
#
# BUILDING
#
include_directories (include)
if (${DEBUG})
add_compile_options (-O0 -ggdb3)
endif ()
add_library (synergyShared SHARED src/synergy.c)
set_target_properties (synergyShared
PROPERTIES OUTPUT_NAME synergy)
add_executable (synergy.d
src/daemon.c)
add_executable (listendemo
src/listendemo.c)
target_link_libraries (synergy.d synergyShared)
target_link_libraries (listendemo synergyShared)
#
# INSTALLING
#
install (TARGETS synergyShared synergy.d
LIBRARY DESTINATION lib
RUNTIME DESTINATION sbin
)
install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/sys/socketsynergy.h
DESTINATION include/sys)
add_uninstall_target ()
#
# PACKAGING
#
set (CPACK_PACKAGE_NAME "SocketSynergy")
set (CPACK_PACKAGE_VERSION ${SocketSynergy_VERSION})
set (CPACK_PACKAGE_VENDOR "OpenFortress.nl")
set (CPACK_PACKAGE_CONTACT "Rick van Rein <rick@openfortress.nl>")
include (PackAllPossible)
include (CPack)
# create_config_files (SocketSynergy)