Daemon mode is now ready to use
[baulk.git] / src / CMakeLists.txt
blob7c25ad0e6cc4dea20358e4b80e4c7822b567afed
1 ###| CMAKE Baulk (Top-Level Build) |###
3 #| Build Target Variable Information
5 # set using "cmake -D<variable>=<true/false> ."
7 # Note: You only need to set the variable once, at that point it will be in the variable
8 #        cache. You will only need to set the variable again if you want to turn it off.
9
10 # | BuildAll                    - Builds everything 
11 # | BuildReset                  - Initializes build variables to zero before determining dependencies
12 #                               Note: This variable stays on, so you must set it to false if you want
13 #                                       to build
14
15 # Folder Builds
16 # | BuildBaulk                  - Builds Baulk (Default)
17 # | BuildCommon                 - Build Common libraries
18 # | BuildWidgets                - Build Widgets
20 # Baulk Binary Builds
21 # | BuildBaulkBinary            - Build minimum for the Baulk Binary (No BaulkServ)
22 # | BuildBaulkControl           - Build BaulkControl Library
23 # | BuildBaulkPacket            - Build BaulkPacket Library
24 # | BuildBaulkServBinary        - Build minimum for the BaulkServ Binary
25 # | BuildBaulkServClient        - Build BaulkServ Client Library
26 # | BuildBaulkServServer        - Build BaulkServ Server Library
28 # Common Library Builds
29 # | BuildBaulkDialog            - Builds BaulkDialog Library
30 # | BuildBaulkWidget            - Builds BaulkWidget Library
31 # | BuildBaulkWindow            - Builds BaulkWindow Library
32 # | BuildBaulkXML               - Builds BaulkXML Library
33 # | BuildLibLoader              - Builds Library Loader (BaulkXML will automatically be built as well)
35 # Widget Builds
36 # | BuildBaulkStatus            - Builds BaulkStatus
37 # | BuildBaulkSwallow           - Builds BaulkSwallow
38 # | BuildBaulkTerm              - Builds BaulkTerm
39 # | BuildWebBaulk               - Builds WebBaulk
41 # BaulkTerm Special Builds
42 # | BuildBaulkTermBinary        - Builds binary version of BaulkTerm
43 # | BuildQTermWidget            - Builds QTermWidget library
47 ##| Project
48 project( BaulkTOPLEVEL )
49 cmake_minimum_required( VERSION 2.6 )
50 set( HEAD_DIR ${PROJECT_SOURCE_DIR}/.. )
52 subdirs(
53         Common
54         Baulk
55         Server
56         Widgets
59 ##| Target Reset
60 if ( BuildReset )
61         set( BuildAll                   0 )
62         set( BuildBaulk                 0 )
63         set( BuildBaulkBinary           0 )
64         set( BuildBaulkControl          0 )
65         set( BuildBaulkDialog           0 )
66         set( BuildBaulkPacket           0 )
67         set( BuildBaulkServBinary       0 )
68         set( BuildBaulkServClient       0 )
69         set( BuildBaulkServServer       0 )
70         set( BuildBaulkStatus           0 )
71         set( BuildBaulkSwallow          0 )
72         set( BuildBaulkTerm             0 )
73         set( BuildBaulkTermBinary       0 )
74         set( BuildBaulkWidget           0 )
75         set( BuildBaulkXML              0 )
76         set( BuildCommon                0 )
77         set( BuildLibLoader             0 )
78         set( BuildQTermWidget           0 )
79         set( BuildWebBaulk              0 )
80         set( BuildWidgets               0 )
81 endif ( BuildReset )
84 ##| Targets - Note: Options are disabled by default
86 #| Full Build
87 if ( BuildAll )
88         set( BuildBaulk                 1 )
89         set( BuildBaulkTermBinary       1 )
90 endif ( BuildAll )
93 #| Default
94 if ( BuildBaulk )
95         set( BuildBaulkBinary           1 )
96         set( BuildBaulkServBinary       1 )
97         set( BuildCommon                1 )
98         set( BuildWidgets               1 )
99 endif ( BuildBaulk )
102 #| Common Librarys
103 if ( BuildCommon )
104         set( BuildBaulkDialog           1 )
105         set( BuildBaulkWidget           1 )
106         set( BuildBaulkXML              1 )
107         set( BuildLibLoader             1 )
108 endif ( BuildCommon )
111 #| Widget Libraries
112 if ( BuildWidgets )
113         set( BuildBaulkStatus           1 )
114         set( BuildBaulkSwallow          1 )
115         set( BuildBaulkTerm             1 )
116         set( BuildWebBaulk              1 )
117 endif ( BuildWidgets )
120 #| Baulk Binary
121 if ( BuildBaulkBinary )
122         set( BuildBaulkControl          1 )
123         set( BuildLibLoader             1 )
124         set( BuildBaulkWidget           1 )
125 endif ( BuildBaulkBinary )
128 #| BaulkControl Library
129 if ( BuildBaulkControl )
130         set( BuildBaulkServClient       1 )
131         set( BuildBaulkDialog           1 )
132         set( BuildBaulkWidget           1 )
133         set( BuildBaulkXML              1 )
134         set( BuildLibLoader             1 )
135         if ( WIN32 )
136                 set( BuildBaulkBinary   1 )
137         endif ( WIN32 )
138 endif ( BuildBaulkControl )
141 #| BaulkServ Binary
142 if ( BuildBaulkServBinary )
143         set( BuildBaulkServClient       1 )
144         set( BuildBaulkServServer       1 )
145         set( BuildBaulkPacket           1 )
146 endif ( BuildBaulkServBinary )
149 #| BaulkTerm Binary Build
150 if ( BuildBaulkTermBinary )
151         set( BuildBaulkTerm             1 )
152         set( BuildBaulkServServer       1 )
153         set( BuildBaulkServClient       1 )
154         set( BuildQTermWidget           1 )
155 endif ( BuildBaulkTermBinary )
158 #| BaulkServ Client
159 if ( BuildBaulkServClient )
160         set( BuildBaulkPacket           1 )
161 endif ( BuildBaulkServClient )
164 #| BaulkTerm Library
165 if ( BuildBaulkTerm )
166         set( BuildQTermWidget           1 )
167         set( BuildBaulkWidget           1 )
168         set( BuildBaulkWindow           1 )
169         set( BuildBaulkXML              1 )
170 endif ( BuildBaulkTerm )
173 #| Warning if the user forgot to specify a Build Variable
174 if ( BuildBaulkPacket OR BuildBaulkDialog OR BuildBaulkWidget OR BuildBaulkXML OR BuildQTermWidget )
175 else ( BuildBaulkPacket OR BuildBaulkDialog OR BuildBaulkWidget OR BuildBaulkXML OR BuildQTermWidget )
176         message("||Warning||")
177         message("  You forgot to specify a build option (make will do nothing)")
178         message("    For Baulk     : cmake -DBuildBaulk=true .")
179         message("    For BaulkTerm : cmake -DBuildBaulkTermBinary=true .")
180         message("")
181         message("  See header in src/CMakeLists.txt for more options")
182 endif ( BuildBaulkPacket OR BuildBaulkDialog OR BuildBaulkWidget OR BuildBaulkXML OR BuildQTermWidget )
185 ##| Doxygen
186 find_package( Doxygen ) 
187 if( DOXYGEN_FOUND )
188         execute_process( COMMAND ${DOXYGEN_EXECUTABLE} WORKING_DIRECTORY ${HEAD_DIR}/docs )
189 endif( DOXYGEN_FOUND )