-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.cmake
66 lines (52 loc) · 2.32 KB
/
config.cmake
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
#
# Copyright (c) 2016-2019 Josef 'Jeff' Sipek <[email protected]>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
include(CheckIncludeFiles)
check_include_files(priv.h HAVE_PRIV_H)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules")
find_package(jeffpc)
macro(set_default name default)
if(NOT DEFINED ${name})
message("-- Defaulting ${name} to ${default}")
set(${name} ${default})
else()
message("-- User set ${name} to ${${name}}")
endif()
endmacro()
set_default(DEFAULT_SCGI_PORT 2014)
set_default(DEFAULT_HTML_INDEX_STORIES 10)
set_default(DEFAULT_FEED_INDEX_STORIES 15)
set_default(DEFAULT_COMMENT_MAX_THINK 86400) # 1 day max think time
set_default(DEFAULT_COMMENT_MIN_THINK 10) # 10 secs min think time
set_default(DEFAULT_DATA_DIR "./data")
set_default(DEFAULT_WEB_DIR "./web")
set_default(DEFAULT_TEMPLATE_DIR "./templates")
set_default(BASE_URL "http://blahg.josefsipek.net")
set_default(BUG_BASE_URL "http://bugs.31bits.net")
set_default(WIKI_BASE_URL "http://en.wikipedia.org/wiki")
set_default(PHOTO_BASE_URL "http://www.josefsipek.net/photos")
set_default(VAR_MAX_SCOPES 10)
set_default(VAR_NAME_MAXLEN 32)
set_default(COND_STACK_DEPTH 10)
set_default(DEFAULT_TAGCLOUD_MIN_SIZE 6)
set_default(DEFAULT_TAGCLOUD_MAX_SIZE 18)
set_default(PREVIEW_SECRET 0x1985)
configure_file(config.h.in config.h)