-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
62 lines (51 loc) · 1.74 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
# - Top level build script for StudyPack
#
#-----------------------------------------------------------------------
# Copyright 2012 Ben Morgan <[email protected]>
# Copyright 2012 University of Warwick
#
# Distributed under the OSI-approved BSD 3-Clause License (the "License");
# see the accompanying file "License.txt" for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#-----------------------------------------------------------------------
cmake_minimum_required(VERSION 2.8.6 FATAL_ERROR)
project(StudyPack)
#-----------------------------------------------------------------------
# Define the project version
#
set(StudyPack_VERSION_MAJOR 0)
set(StudyPack_VERSION_MINOR 1)
set(StudyPack_VERSION_PATCH 0)
#-----------------------------------------------------------------------
# Prepend this project's custom module path(s) to CMAKE_MODULE_PATH
#
set(CMAKE_MODULE_PATH
${PROJECT_SOURCE_DIR}/cmake
${CMAKE_MODULE_PATH})
# - Standard Install Paths for POSIX style
include(GNUInstallDirs)
#-----------------------------------------------------------------------
# Build subdirectories
#
add_subdirectory(Source)
#-----------------------------------------------------------------------
# Packaging
#
# - Description and Licensing
set(CPACK_RESOURCE_FILE_LICENSE ${PROJECT_SOURCE_DIR}/License.txt)
# - Only want a couple of the binary and source generators
if(UNIX)
set(CPACK_GENERATOR "STGZ")
endif()
if(APPLE)
list(APPEND CPACK_GENERATOR "PackageMaker")
endif()
set(CPACK_SOURCE_GENERATOR "ZIP;TBZ2")
# - Tools
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
find_package(LSB REQUIRED)
endif()
include(CPack)