-
Notifications
You must be signed in to change notification settings - Fork 4
/
CMakeLists.txt
117 lines (100 loc) · 4.18 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
############################################################################
##############################################################################
##
## Copyright (c) 2007-2008, Tim Burrell
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
## http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
##
############################################################################
############################################################################
#################################
# Project
##############
project(Gizmod)
cmake_minimum_required(VERSION 2.6)
#################################
# Defines
##############
# global needed variables
set(APPLICATION_NAME ${PROJECT_NAME})
set(CPACK_PACKAGE_VERSION_MAJOR "3")
set(CPACK_PACKAGE_VERSION_MINOR "4")
set(CPACK_PACKAGE_VERSION_PATCH "0")
set(APPLICATION_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}")
#################################
# Preamble
##############
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/
# is checked
set(CMAKE_MODULE_PATH
${CMAKE_SOURCE_DIR}/cmake/Modules
)
# set default build type to release
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
endif (NOT CMAKE_BUILD_TYPE)
# add definitions
include(DefineProjectDefaults)
include(DefineProjectOptions)
include(DefineCompilerFlags)
include(DefineInstallationPaths)
# add macros
include(MacroAddPlugin)
include(MacroEnsureOutOfSourceBuild)
include(ConfigureChecks.cmake)
# config.h
configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
#################################
# Sub-directories
##############
subdirs(libH libGizmod gizmod scripts visplugin)
#################################
# Information
##############
message(STATUS "Installation Variables:
Build Type (CMAKE_BUILD_TYPE): ${CMAKE_BUILD_TYPE}
Install Prefix (CMAKE_INSTALL_PREFIX): ${CMAKE_INSTALL_PREFIX}
Data Dir (DATA_INSTALL_DIR): ${DATA_INSTALL_DIR}
Lib Dir (LIB_INSTALL_DIR): ${LIB_INSTALL_DIR}
Plugin Dir (PLUGIN_INSTALL_DIR): ${PLUGIN_INSTALL_DIR}
Config Dir (SYSCONF_INSTALL_DIR): ${SYSCONF_INSTALL_DIR}
Build vis plugin (BUILD_VIS_PLUGIN): ${BUILD_VIS_PLUGIN}"
)
#################################
# Packing
##############
include(InstallRequiredSystemLibraries)
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Gizmo Daemon")
set(CPACK_PACKAGE_VENDOR "Gizmod")
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
set(CPACK_PACKAGE_FILE_NAME "gizmod-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}-linux-i686")
set(CPACK_SOURCE_PACKAGE_FILE_NAME "gizmod-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}")
set(CPACK_GENERATOR "TGZ;TBZ2;ZIP")
set(CPACK_SOURCE_GENERATOR "TGZ;TBZ2")
set(CPACK_SOURCE_IGNORE_FILES "\\\\.svn/;/debug/;/optimized/;/documentation/;Doxyfile;[a-z]*\\\\.kdev*;[a-z]*\\\\.tag;[a-z]*\\\\.pyc")
if (WIN32 AND NOT UNIX)
# There is a bug in NSI that does not handle full unix paths properly. Make
# sure there is at least one set of four (4) backlasshes.
SET(CPACK_PACKAGE_ICON "${CMake_SOURCE_DIR}/Utilities/Release\\\\InstallIcon.bmp")
SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\MyExecutable.exe")
SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} My Famous Project")
SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\www.my-project-home-page.org")
SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\www.my-personal-home-page.com")
SET(CPACK_NSIS_CONTACT "[email protected]")
SET(CPACK_NSIS_MODIFY_PATH ON)
else (WIN32 AND NOT UNIX)
set(CPACK_STRIP_FILES "gizmod/gizmod")
set(CPACK_SOURCE_STRIP_FILES "")
endif (WIN32 AND NOT UNIX)
set(CPACK_PACKAGE_EXECUTABLES "gizmod" "gizmod")
include(CPack)