-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathCMakeLists.txt
135 lines (124 loc) · 5.43 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# Copyright (c) 2011-2019 Made to Order Software Corp. All Rights Reserved
#
# https://snapwebsites.org/
# contact@m2osw.com
#
# 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.
cmake_minimum_required(VERSION 3.10.2)
project(snapwebsites_top_dir)
if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
message(STATUS "Debug is in effect for snapwebsites!")
endif()
## Include support modules
##
set(CMAKE_MODULE_PATH
${CMAKE_CURRENT_SOURCE_DIR}/cmake
${CMAKE_MODULE_PATH}
)
## Include 3rdparty and contrib
##
find_package(AdvGetOpt REQUIRED )
find_package(As2Js REQUIRED 0.1.0 )
find_package(AtomicNames REQUIRED )
find_package(Boost REQUIRED )
find_package(CSSPP REQUIRED )
find_package(CppThread REQUIRED )
find_package(LibAddr REQUIRED )
find_package(LibExcept REQUIRED )
find_package(LibTLD REQUIRED )
find_package(LibXml2 REQUIRED )
find_package(Magic REQUIRED )
find_package(Murmur3 REQUIRED )
find_package(OpenSSL REQUIRED )
find_package(Qt5Core REQUIRED )
find_package(Qt5Network REQUIRED )
find_package(Qt5Script REQUIRED )
find_package(Qt5Sql REQUIRED )
find_package(Qt5Widgets REQUIRED )
find_package(Qt5X11Extras REQUIRED )
find_package(Qt5Xml REQUIRED )
find_package(Qt5XmlPatterns REQUIRED )
find_package(SnapCMakeModules REQUIRED )
find_package(SnapDev REQUIRED )
find_package(SnapLogger REQUIRED )
find_package(ZLIB REQUIRED )
find_package(ZipIos REQUIRED 2.1 )
find_package(SnapDoxygen)
SnapGetVersion(SNAPWEBSITES ${CMAKE_CURRENT_SOURCE_DIR})
###############################################################################
## Define the ${SNAP_COMMON_DIR} variable used to save common files within
## this project.
##
## At this time, this directory receives DTD and XSD files that are being
## used with the snap_validate_xml() command within the snap environment.
##
## Note: until these files get installed, they would not be directly
## accessible by others, there are two solutions to use
## in this situation:
##
## 1. use a full path to the DTD/XSD file, it can be tedious to know about
## it and is not portable (i.e. if you copy that CMakeLists.txt outside
## of the snap environment, it will not work as is)
##
## here is an example to validate the content.xml of the attachment
## plugin (how it used to look like before I reordered the
## add_subdirectory() so the configure_file(...) happens first)
##
## snap_validate_xml(
## content.xml
## ${snapwebsites_plugins_src_SOURCE_DIR}/content/content.dtd
## )
##
## 2. use the configure_file(...) to a common destination directory that
## the snap_validate_xml() function can automatically use; the following
## is that common directory; note that we place it in our binary
## directory (this is not a distribution directory)
##
## For the snapwebsites environment, we use solution (2) everywhere.
##
## IMPORTANT NOTE: The ${SNAP_COMMON_DIR} gets checked before the
## ${CMAKE_INSTALL_PREFIX}/share/snapwebsites because
## otherwise make would not detect changes to your DTD/XSD
## files until after you get that file installed again
##
set( SNAP_COMMON_DIR "${CMAKE_BINARY_DIR}/common" CACHE PATH "Directory to copy files used by cmake scripts before an install happens." )
include( SnapCssLint )
include( SnapJsLint )
include( SnapXmlLint )
include( SnapZipLayout )
# WARNING: the order of the following is important
# for example we have to build libsnapwebsites before all the
# other C++ sub-projects
#
add_subdirectory( cmake )
add_subdirectory( libsnapwebsites )
add_subdirectory( snapbase )
add_subdirectory( snapmanager )
add_subdirectory( snapserver )
add_subdirectory( snapserver-core-plugins )
add_subdirectory( snapbackend )
add_subdirectory( snapbackup )
add_subdirectory( snapbounce )
add_subdirectory( snapcgi )
add_subdirectory( snapdatabase )
add_subdirectory( snapdb )
add_subdirectory( snaplayout )
add_subdirectory( snaplistd )
# vim: ts=4 sw=4 et nocindent