forked from telldus/telldus
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
56 lines (47 loc) · 1.06 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
PROJECT(tdtool)
cmake_policy(SET CMP0005 NEW)
SET (tdtool_DESCRIPTION
"a command line utility to send commands to a Telldus TellStick"
)
SET(tdtool_SRCS
main.cpp
)
ADD_EXECUTABLE(tdtool
${tdtool_SRCS}
)
SIGN(tdtool)
INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_SOURCE_DIR}/driver
)
ADD_DEFINITIONS( -DVERSION="${DISPLAYED_VERSION}" )
IF (WIN32)
TARGET_LINK_LIBRARIES(tdtool
TelldusCore
openbsd-getopt
)
INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/3rdparty/openbsd-getopt
)
ELSEIF (APPLE)
TARGET_LINK_LIBRARIES(tdtool
TelldusCore
)
ELSE (WIN32)
TARGET_LINK_LIBRARIES(tdtool
${CMAKE_BINARY_DIR}/client/libtelldus-core.so
)
ENDIF (WIN32)
IF (UNIX)
IF (GENERATE_MAN)
ADD_CUSTOM_COMMAND(
TARGET tdtool
POST_BUILD
COMMAND help2man -n ${tdtool_DESCRIPTION} ./tdtool > tdtool.1
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating man file tdtool.1"
)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/tdtool.1 DESTINATION ${MAN_DIR}/man1)
ENDIF (GENERATE_MAN)
ENDIF (UNIX)
INSTALL(TARGETS tdtool RUNTIME DESTINATION bin)