-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt.dev
55 lines (41 loc) · 1.97 KB
/
CMakeLists.txt.dev
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
cmake_minimum_required(VERSION 2.8.9)
project(volsd)
# set some global variables
set(EXE_INSTALL_DIR ${CMAKE_BINARY_DIR}/install/bin)
set(CFG_INSTALL_DIR ${CMAKE_BINARY_DIR}/install/etc/volsd)
# set the version
set(DISPATCHER_MAJOR_VERSION 1)
set(DISPATCHER_MINOR_VERSION 0)
set(DISPATCHER_PATCH_VERSION 0)
set(DISPATCHER_VERSION
${DISPATCHER_MAJOR_VERSION}.${DISPATCHER_MINOR_VERSION}.${DISPATCHER_PATCH_VERSION})
set(CLIENT_MAJOR_VERSION 1)
set(CLIENT_MINOR_VERSION 0)
set(CLIENT_PATCH_VERSION 0)
set(CLIENT_VERSION
${CLIENT_MAJOR_VERSION}.${CLIENT_MINOR_VERSION}.${CLIENT_PATCH_VERSION})
# set the out directory. This will put the executables into bin
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
include_directories(include)
include_directories(conf)
# configure a header file to pass some of the CMake settings
# to the source code
configure_file (
"${CMAKE_SOURCE_DIR}/conf/Config.h.in"
"${CMAKE_SOURCE_DIR}/include/Config.h"
)
#set(CMAKE_CXX_FLAGS "-Wall -std=c++0x -pthread")
set(CMAKE_CXX_FLAGS "-std=c++0x -pthread")
set(VOLUMESD src/volumesd.cpp src/Utils.cpp src/Logger.cpp src/Volumes.cpp src/ServerSocket.cpp src/Socket.cpp src/Sync.cpp src/Snapshots.cpp src/ClientSocket.cpp)
set(VCLIENT src/volumesd-client.cpp src/Utils.cpp src/Logger.cpp src/Volumes.cpp src/ClientSocket.cpp src/Socket.cpp src/Sync.cpp)
# create the executables
add_executable(volsd ${VOLUMESD})
add_executable(volsd-client ${VCLIENT})
# installations
install(TARGETS volsd DESTINATION ${EXE_INSTALL_DIR} COMPONENT binaries)
#install(TARGETS volsd-client DESTINATION ${EXE_INSTALL_DIR} COMPONENT binaries)
install(FILES conf/dispatcher.cfg DESTINATION ${CFG_INSTALL_DIR} COMPONENT config )
message("--------------------------------------------------")
message("Binaries are installed in in : ${EXE_INSTALL_DIR}")
message("Conf files will be placed in : ${CFG_INSTALL_DIR}")
message("--------------------------------------------------")