-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathCMakeLists.txt
65 lines (55 loc) · 1.65 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
# <Copyright Holder>. Copyright (C) <Copyright Year(s)>. <License>.
#
# Project Properties
#
CMAKE_MINIMUM_REQUIRED (VERSION 2.6)
PROJECT (DesignPattern)
SET (APPLICATION_NAME "DesignPattern")
SET (APPLICATION_VERSION_MAJOR 0)
SET (APPLICATION_VERSION_MINOR 0)
SET (APPLICATION_VERSION_PATCH 0)
#
# Debugging Options
#
SET (CMAKE_VERBOSE_MAKEFILE 1) # Use 1 for debugging, 0 for release
#
# Project Output Paths
#
SET (MAINFOLDER ${PROJECT_SOURCE_DIR})
SET (EXECUTABLE_OUTPUT_PATH "${MAINFOLDER}/bin")
SET (LIBRARY_OUTPUT_PATH "${MAINFOLDER}/lib")
#
# Project Search Paths
#
SET (CMAKE_MODULE_PATH "${MAINFOLDER}/_cmake_scripts")
INCLUDE_DIRECTORIES("${MAINFOLDER}/src")
# Library
link_directories("${LIBRARY_OUTPUT_PATH}")
#
# Configure Files
#
FILE (GLOB_RECURSE CONFIGINPUTS1 include/*.in.h)
FILE (GLOB_RECURSE CONFIGINPUTS2 include/*.h.in)
FILE (GLOB_RECURSE CONFIGINPUTS3 src/*.in.h)
FILE (GLOB_RECURSE CONFIGINPUTS4 src/*.h.in)
FILE (GLOB_RECURSE CONFIGINPUTS5 test/*.in.h)
FILE (GLOB_RECURSE CONFIGINPUTS6 test/*.h.in)
LIST (APPEND CONFIGINPUTS "${CONFIGINPUTS1}")
LIST (APPEND CONFIGINPUTS "${CONFIGINPUTS2}")
LIST (APPEND CONFIGINPUTS "${CONFIGINPUTS3}")
LIST (APPEND CONFIGINPUTS "${CONFIGINPUTS4}")
LIST (APPEND CONFIGINPUTS "${CONFIGINPUTS5}")
LIST (APPEND CONFIGINPUTS "${CONFIGINPUTS6}")
FOREACH (CONFIGINPUT ${CONFIGINPUTS})
STRING (REPLACE ".in.h" ".h" CONFIGOUTPUT1 "${CONFIGINPUT}")
STRING (REPLACE ".h.in" ".h" CONFIGOUTPUT2 "${CONFIGOUTPUT1}")
CONFIGURE_FILE ("${CONFIGINPUT}" "${CONFIGOUTPUT2}")
ENDFOREACH (CONFIGINPUT ${CONFIGINPUTS})
#
# Add Build Targets
#
ADD_SUBDIRECTORY(src)
#
# Add Documentation Targets
#
#INCLUDE (DocumentationTargets)