-
Notifications
You must be signed in to change notification settings - Fork 9
/
CMakeLists.txt
35 lines (26 loc) · 1.15 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
PROJECT (blizzard)
CMAKE_MINIMUM_REQUIRED (VERSION 2.6)
INCLUDE (CMakeMacro.cmake)
INCLUDE_DIRECTORIES (src/)
USE_PACKAGE (expat expat.h)
USE_PACKAGE (ev ev.h PATH_SUFFIXES libev .) # PATH_SUFFIXES is for stupid CentOS RPM package
USE_PACKAGE (coda coda/coda.h)
AUX_SOURCE_DIRECTORY (src/blizzard SRC_BLIZZARD)
ADD_EXECUTABLE (blizzard ${SRC_BLIZZARD})
TARGET_LINK_LIBRARIES (blizzard ${LIB_coda} ${LIB_expat} ${LIB_ev} pthread)
IF (CMAKE_SYSTEM_NAME STREQUAL Linux)
TARGET_LINK_LIBRARIES (blizzard dl)
ENDIF ()
IF (CMAKE_SYSTEM_NAME STREQUAL Darwin)
SET (CMAKE_MACOSX_RPATH ON)
ENDIF ()
INSTALL (FILES src/blizzard/plugin.hpp DESTINATION include/blizzard)
INSTALL (TARGETS blizzard DESTINATION bin)
INSTALL_TEMPLATE (src/blizzard/config.xml.in DESTINATION etc/blizzard)
# Example Module
AUX_SOURCE_DIRECTORY (blzmod_example SRC_BLZMOD_EXAMPLE)
ADD_LIBRARY (blzmod_example SHARED ${SRC_BLZMOD_EXAMPLE})
TARGET_LINK_LIBRARIES (blzmod_example ${LIB_coda})
INSTALL (TARGETS blzmod_example DESTINATION lib)
INSTALL_TEMPLATE (blzmod_example/config.xml.in DESTINATION etc/blzmod_example)
INSTALL_TEMPLATE (blzmod_example/config_module.xml.in DESTINATION etc/blzmod_example)