Mercurial > irccd
comparison CMakeLists.txt @ 773:8c44bbcbbab9
Misc: style, cleanup and update
author | David Demelier <markand@malikania.fr> |
---|---|
date | Fri, 26 Oct 2018 13:01:00 +0200 |
parents | 6d09b5fc82e8 |
children | fe27ed0c1eae |
comparison
equal
deleted
inserted
replaced
772:f5ccf65ae929 | 773:8c44bbcbbab9 |
---|---|
53 cmake_minimum_required(VERSION 3.10) | 53 cmake_minimum_required(VERSION 3.10) |
54 project(irccd) | 54 project(irccd) |
55 | 55 |
56 # Helper to set global internal variables. | 56 # Helper to set global internal variables. |
57 function(setg var value) | 57 function(setg var value) |
58 set("${var}" "${value}" CACHE INTERNAL "") | 58 set("${var}" "${value}" CACHE INTERNAL "") |
59 endfunction () | 59 endfunction () |
60 | 60 |
61 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${irccd_SOURCE_DIR}/cmake/packages) | 61 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${irccd_SOURCE_DIR}/cmake/packages) |
62 set(CMAKE_POSITION_INDEPENDENT_CODE On) | 62 set(CMAKE_POSITION_INDEPENDENT_CODE On) |
63 set(CMAKE_CXX_STANDARD 17) | 63 set(CMAKE_CXX_STANDARD 17) |
91 add_subdirectory(libirccd) | 91 add_subdirectory(libirccd) |
92 add_subdirectory(libirccd-ctl) | 92 add_subdirectory(libirccd-ctl) |
93 add_subdirectory(libirccd-test) | 93 add_subdirectory(libirccd-test) |
94 | 94 |
95 if (IRCCD_HAVE_JS) | 95 if (IRCCD_HAVE_JS) |
96 add_subdirectory(libirccd-js) | 96 add_subdirectory(libirccd-js) |
97 endif () | 97 endif () |
98 | 98 |
99 add_subdirectory(irccd) | 99 add_subdirectory(irccd) |
100 add_subdirectory(irccdctl) | 100 add_subdirectory(irccdctl) |
101 add_subdirectory(irccd-test) | 101 add_subdirectory(irccd-test) |
102 add_subdirectory(systemd) | 102 add_subdirectory(systemd) |
103 | 103 |
104 if (IRCCD_HAVE_JS) | 104 if (IRCCD_HAVE_JS) |
105 add_subdirectory(plugins) | 105 add_subdirectory(plugins) |
106 endif () | 106 endif () |
107 | 107 |
108 # Platform specific. | 108 # Platform specific. |
109 if (WIN32) | 109 if (WIN32) |
110 add_subdirectory(win32) | 110 add_subdirectory(win32) |
111 endif () | 111 endif () |
112 | 112 |
113 # Tests. | 113 # Tests. |
114 if (IRCCD_WITH_TESTS) | 114 if (IRCCD_WITH_TESTS) |
115 include(CTest) | 115 include(CTest) |
116 add_subdirectory(tests) | 116 add_subdirectory(tests) |
117 endif () | 117 endif () |
118 | 118 |
119 add_subdirectory(cmake/export) | 119 add_subdirectory(cmake/export) |
120 | 120 |
121 message("Compiling with the following flags:") | 121 message("Compiling with the following flags:") |
122 message(" General flags: ${CMAKE_CXX_FLAGS}") | 122 message(" General flags: ${CMAKE_CXX_FLAGS}") |
123 message(" Debug flags: ${CMAKE_CXX_FLAGS_DEBUG}") | 123 message(" Debug flags: ${CMAKE_CXX_FLAGS_DEBUG}") |
124 message(" Release flags: ${CMAKE_CXX_FLAGS_RELEASE}") | 124 message(" Release flags: ${CMAKE_CXX_FLAGS_RELEASE}") |
125 message("") | 125 message("") |
126 | 126 |
127 message("Compiling irccd with following options:") | 127 message("Compiling irccd with following options:") |
128 message(" Libedit: ${IRCCD_WITH_LIBEDIT_MSG}") | 128 message(" Libedit: ${IRCCD_WITH_LIBEDIT_MSG}") |
129 message(" OpenSSL: ${IRCCD_WITH_SSL_MSG}") | 129 message(" OpenSSL: ${IRCCD_WITH_SSL_MSG}") |
130 message(" Javascript: ${IRCCD_WITH_JS_MSG}") | 130 message(" Javascript: ${IRCCD_WITH_JS_MSG}") |
131 message(" Tests: ${IRCCD_WITH_TESTS_MSG}") | 131 message(" Tests: ${IRCCD_WITH_TESTS_MSG}") |
132 message(" User docs: ${IRCCD_WITH_HTML_MSG}") | 132 message(" User docs: ${IRCCD_WITH_HTML_MSG}") |
133 message(" Doxygen: ${IRCCD_WITH_DOXYGEN_MSG}") | 133 message(" Doxygen: ${IRCCD_WITH_DOXYGEN_MSG}") |
134 message(" Package: ${IRCCD_PACKAGE_MSG}") | 134 message(" Package: ${IRCCD_PACKAGE_MSG}") |
135 message(" Vera: ${IRCCD_WITH_VERA_MSG}") | 135 message(" Vera: ${IRCCD_WITH_VERA_MSG}") |
136 message("") | 136 message("") |
137 | 137 |
138 message("Installing plugins:") | 138 message("Installing plugins:") |
139 foreach (plugin ${IRCCD_PLUGINS}) | 139 foreach (plugin ${IRCCD_PLUGINS}) |
140 string(TOUPPER ${plugin} name) | 140 string(TOUPPER ${plugin} name) |
141 irccd_indent_message(" ${plugin}: " "${IRCCD_WITH_PLUGIN_${name}_MSG}" 22) | 141 irccd_indent_message(" ${plugin}: " "${IRCCD_WITH_PLUGIN_${name}_MSG}" 22) |
142 endforeach () | 142 endforeach () |
143 message("") | 143 message("") |
144 | 144 |
145 if (WIN32) | 145 if (WIN32) |
146 message("Installing these DLLs:") | 146 message("Installing these DLLs:") |
147 foreach (name ${IRCCD_DLLS}) | 147 foreach (name ${IRCCD_DLLS}) |
148 irccd_indent_message(" ${name}: " "${${name}}" 30) | 148 irccd_indent_message(" ${name}: " "${${name}}" 30) |
149 endforeach () | 149 endforeach () |
150 message("") | 150 message("") |
151 | 151 |
152 if (IRCCD_DLLS_NOT_FOUND) | 152 if (IRCCD_DLLS_NOT_FOUND) |
153 message("The following DLLs were not found:") | 153 message("The following DLLs were not found:") |
154 foreach (name ${IRCCD_DLLS_NOT_FOUND}) | 154 foreach (name ${IRCCD_DLLS_NOT_FOUND}) |
155 message(" ${name}") | 155 message(" ${name}") |
156 endforeach () | 156 endforeach () |
157 message("") | 157 message("") |
158 endif () | 158 endif () |
159 endif () | 159 endif () |
160 | 160 |
161 include(cmake/IrccdPackage.cmake) | 161 include(cmake/IrccdPackage.cmake) |
162 include(CPack) | 162 include(CPack) |
163 | 163 |
164 # Metadata files | 164 # Metadata files |
165 add_custom_target( | 165 add_custom_target( |
166 metadata | 166 metadata |
167 SOURCES | 167 SOURCES |
168 ${CMAKE_SOURCE_DIR}/CHANGES.md | 168 ${CMAKE_SOURCE_DIR}/CHANGES.md |
169 ${CMAKE_SOURCE_DIR}/CONTRIBUTE.md | 169 ${CMAKE_SOURCE_DIR}/CONTRIBUTE.md |
170 ${CMAKE_SOURCE_DIR}/CREDITS.md | 170 ${CMAKE_SOURCE_DIR}/CREDITS.md |
171 ${CMAKE_SOURCE_DIR}/INSTALL.md | 171 ${CMAKE_SOURCE_DIR}/INSTALL.md |
172 ${CMAKE_SOURCE_DIR}/MIGRATING.md | 172 ${CMAKE_SOURCE_DIR}/MIGRATING.md |
173 ${CMAKE_SOURCE_DIR}/README.md | 173 ${CMAKE_SOURCE_DIR}/README.md |
174 ${CMAKE_SOURCE_DIR}/STYLE.md | 174 ${CMAKE_SOURCE_DIR}/STYLE.md |
175 ) | 175 ) |