Mercurial > irccd
diff cmake/IrccdOptions.cmake @ 207:6635b9187d71
Irccd: switch to 4 spaces indent, #518
author | David Demelier <markand@malikania.fr> |
---|---|
date | Tue, 21 Jun 2016 20:52:17 +0200 |
parents | a45a0f817a7b |
children | 11045c180db9 |
line wrap: on
line diff
--- a/cmake/IrccdOptions.cmake Tue Jun 21 12:36:46 2016 +0200 +++ b/cmake/IrccdOptions.cmake Tue Jun 21 20:52:17 2016 +0200 @@ -19,16 +19,16 @@ # # Options that controls the build: # -# WITH_SSL Enable OpenSSL (default: on) -# WITH_JS Enable JavaScript (default: on) -# WITH_TESTS Enable unit testing (default: off) -# WITH_SYSTEMD Install systemd service (default: on for Linux) -# WITH_DOCS Enable building of all documentation (default: on) -# WITH_DOXYGEN Enable internal irccd documentation (default: on) -# WITH_HTML Enable HTML documentation -# WITH_MAN Install manpages (default: on, off for Windows) -# WITH_PKGCONFIG Install pkg-config files (default: on, off for Windows (except MinGW)) -# WITH_PLUGIN_<NAME> Enable or disable the specified plugin (default: on) +# WITH_SSL Enable OpenSSL (default: on) +# WITH_JS Enable JavaScript (default: on) +# WITH_TESTS Enable unit testing (default: off) +# WITH_SYSTEMD Install systemd service (default: on for Linux) +# WITH_DOCS Enable building of all documentation (default: on) +# WITH_DOXYGEN Enable internal irccd documentation (default: on) +# WITH_HTML Enable HTML documentation +# WITH_MAN Install manpages (default: on, off for Windows) +# WITH_PKGCONFIG Install pkg-config files (default: on, off for Windows (except MinGW)) +# WITH_PLUGIN_<NAME> Enable or disable the specified plugin (default: on) # # Note: the option() commands for WITH_PLUGIN_<name> variables are defined automatically from the IRCCD_PLUGINS # list. @@ -37,42 +37,42 @@ # # Options that controls both installations and the irccd runtime: # -# WITH_BINDIR Binary directory for irccd, irccdctl -# WITH_PLUGINDIR Path where plugins must be installed -# WITH_DOCDIR Path where to install documentation -# WITH_MANDIR Path where to install manuals -# WITH_CONFDIR Path where to search configuration files -# WITH_CACHEDIR Path where to store temporary files -# WITH_PKGCONFIGDIR Path where to install pkg-config files -# WITH_SYSTEMDDIR Path where to install systemd unit file +# WITH_BINDIR Binary directory for irccd, irccdctl +# WITH_PLUGINDIR Path where plugins must be installed +# WITH_DOCDIR Path where to install documentation +# WITH_MANDIR Path where to install manuals +# WITH_CONFDIR Path where to search configuration files +# WITH_CACHEDIR Path where to store temporary files +# WITH_PKGCONFIGDIR Path where to install pkg-config files +# WITH_SYSTEMDDIR Path where to install systemd unit file # # # Options for unit tests only: # -# WITH_TEST_IRCHOST Which IRC server to use for tests (default: 127.0.0.1) -# WITH_TEST_IRCPORT Which IRC server port to use for tests (default: 6667) +# WITH_TEST_IRCHOST Which IRC server to use for tests (default: 127.0.0.1) +# WITH_TEST_IRCPORT Which IRC server port to use for tests (default: 6667) # # Manual pages on Windows are pretty useless. if (WIN32) - set(DEFAULT_MAN "No") + set(DEFAULT_MAN "No") else () - set(DEFAULT_MAN "Yes") + set(DEFAULT_MAN "Yes") endif () # Systemd unit file if (CMAKE_SYSTEM_NAME MATCHES "Linux") - set(DEFAULT_SYSTEMD "Yes") + set(DEFAULT_SYSTEMD "Yes") else () - set(DEFAULT_SYSTEMD "No") + set(DEFAULT_SYSTEMD "No") endif () # pkg-config is only relevant on UNIX or MinGW if (MINGW OR UNIX) - set(DEFAULT_PKGCONFIG "Yes") + set(DEFAULT_PKGCONFIG "Yes") else () - set(DEFAULT_PKGCONFIG "No") + set(DEFAULT_PKGCONFIG "No") endif () option(WITH_SSL "Enable SSL" On) @@ -87,14 +87,14 @@ # Build options for all plugins. foreach (plugin ${IRCCD_PLUGINS}) - string(TOUPPER ${plugin} optname) - option(WITH_PLUGIN_${optname} "Enable ${plugin} plugin" On) + string(TOUPPER ${plugin} optname) + option(WITH_PLUGIN_${optname} "Enable ${plugin} plugin" On) - if (NOT WITH_PLUGIN_${optname}) - set(WITH_PLUGIN_${optname}_MSG "No (disabled by user)") - else () - set(WITH_PLUGIN_${optname}_MSG "Yes") - endif () + if (NOT WITH_PLUGIN_${optname}) + set(WITH_PLUGIN_${optname}_MSG "No (disabled by user)") + else () + set(WITH_PLUGIN_${optname}_MSG "Yes") + endif () endforeach () set(WITH_TEST_IRCHOST "127.0.0.1" CACHE STRING "IRC host for tests") @@ -116,24 +116,24 @@ # directories again. # if (WIN32) - set(WITH_DATADIR "share" CACHE STRING "Data directory") - set(WITH_CACHEDIR "var" CACHE STRING "Temporary files directory") - set(WITH_PLUGINDIR "share/plugins" CACHE STRING "Module prefix where to install") - set(WITH_DOCDIR "share/doc" CACHE STRING "Documentation directory") + set(WITH_DATADIR "share" CACHE STRING "Data directory") + set(WITH_CACHEDIR "var" CACHE STRING "Temporary files directory") + set(WITH_PLUGINDIR "share/plugins" CACHE STRING "Module prefix where to install") + set(WITH_DOCDIR "share/doc" CACHE STRING "Documentation directory") else () - set(WITH_DATADIR "share/irccd" CACHE STRING "Data directory") - set(WITH_CACHEDIR "var/irccd" CACHE STRING "Temporary files directory") - set(WITH_PLUGINDIR "share/irccd/plugins" CACHE STRING "Module prefix where to install") - set(WITH_DOCDIR "share/doc/irccd" CACHE STRING "Documentation directory") + set(WITH_DATADIR "share/irccd" CACHE STRING "Data directory") + set(WITH_CACHEDIR "var/irccd" CACHE STRING "Temporary files directory") + set(WITH_PLUGINDIR "share/irccd/plugins" CACHE STRING "Module prefix where to install") + set(WITH_DOCDIR "share/doc/irccd" CACHE STRING "Documentation directory") endif () # # Check if any of these path is absolute and raise an error if true. # foreach (d WITH_BINDIR WITH_CACHEDIR WITH_DATADIR WITH_CONFDIR WITH_PLUGINDIR) - if (IS_ABSOLUTE ${${d}}) - message(FATAL_ERROR "${d} can not be absolute (${${d}} given)") - endif () + if (IS_ABSOLUTE ${${d}}) + message(FATAL_ERROR "${d} can not be absolute (${${d}} given)") + endif () endforeach () # --------------------------------------------------------- @@ -141,17 +141,17 @@ # --------------------------------------------------------- if (WITH_JS) - add_subdirectory(extern/duktape) - set(WITH_JS_MSG "Yes") + add_subdirectory(extern/duktape) + set(WITH_JS_MSG "Yes") else () - set(WITH_JS_MSG "No") + set(WITH_JS_MSG "No") endif () if (WITH_TESTS) - add_subdirectory(extern/gtest) - set(WITH_TESTS_MSG "Yes") + add_subdirectory(extern/gtest) + set(WITH_TESTS_MSG "Yes") else () - set(WITH_TESTS_MSG "No") + set(WITH_TESTS_MSG "No") endif () # --------------------------------------------------------- @@ -163,43 +163,43 @@ find_package(OpenSSL) if (NOT WITH_DOCS) - set(WITH_HTML FALSE) - set(WITH_DOXYGEN FALSE) - set(WITH_MAN FALSE) + set(WITH_HTML FALSE) + set(WITH_DOXYGEN FALSE) + set(WITH_MAN FALSE) endif () if (WITH_SSL) - if (OPENSSL_FOUND) - set(WITH_SSL_MSG "Yes") - else () - set(WITH_SSL_MSG "No (OpenSSL not found)") - set(WITH_SSL FALSE) - endif () + if (OPENSSL_FOUND) + set(WITH_SSL_MSG "Yes") + else () + set(WITH_SSL_MSG "No (OpenSSL not found)") + set(WITH_SSL FALSE) + endif () else() - set(WITH_SSL_MSG "No (disabled by user)") + set(WITH_SSL_MSG "No (disabled by user)") endif () if (WITH_DOXYGEN) - if (DOXYGEN_FOUND) - set(WITH_DOXYGEN_MSG "Yes") - else () - set(WITH_DOXYGEN_MSG "No (doxygen not found)") - set(WITH_DOXYGEN FALSE) - endif () + if (DOXYGEN_FOUND) + set(WITH_DOXYGEN_MSG "Yes") + else () + set(WITH_DOXYGEN_MSG "No (doxygen not found)") + set(WITH_DOXYGEN FALSE) + endif () else () - set(WITH_DOXYGEN_MSG "No (disabled by user)") + set(WITH_DOXYGEN_MSG "No (disabled by user)") endif () if (WITH_HTML) - if (Pandoc_FOUND) - set(WITH_HTML_MSG "Yes") - else () - set(WITH_HTML_MSG "No (pandoc not found)") - set(WITH_HTML FALSE) - endif () + if (Pandoc_FOUND) + set(WITH_HTML_MSG "Yes") + else () + set(WITH_HTML_MSG "No (pandoc not found)") + set(WITH_HTML FALSE) + endif () else () - set(WITH_HTML_MSG "No (disabled by user)") - set(WITH_HTML FALSE) + set(WITH_HTML_MSG "No (disabled by user)") + set(WITH_HTML FALSE) endif () # @@ -214,22 +214,22 @@ set(IRCCD_PACKAGE FALSE) if (NOT WITH_HTML) - set(IRCCD_PACKAGE_MSG "No (HTML documentation disabled)") + set(IRCCD_PACKAGE_MSG "No (HTML documentation disabled)") elseif (NOT WIN32) - set(IRCCD_PACKAGE_MSG "No (only for Windows)") + set(IRCCD_PACKAGE_MSG "No (only for Windows)") elseif (NOT QtIFW_FOUND) - set(IRCCD_PACKAGE_MSG "No (QtIFW not found)") + set(IRCCD_PACKAGE_MSG "No (QtIFW not found)") else () - # Now check that a plugin has not been disabled. - set(IRCCD_PACKAGE TRUE) - set(IRCCD_PACKAGE_MSG "Yes") + # Now check that a plugin has not been disabled. + set(IRCCD_PACKAGE TRUE) + set(IRCCD_PACKAGE_MSG "Yes") - foreach (plugin ${IRCCD_PLUGINS}) - string(TOUPPER ${plugin} optname) + foreach (plugin ${IRCCD_PLUGINS}) + string(TOUPPER ${plugin} optname) - if (NOT WITH_PLUGIN_${optname}) - set(IRCCD_PACKAGE FALSE) - set(IRCCD_PACKAGE_MSG "No (Plugin ${plugin} disabled)") - endif () - endforeach () + if (NOT WITH_PLUGIN_${optname}) + set(IRCCD_PACKAGE FALSE) + set(IRCCD_PACKAGE_MSG "No (Plugin ${plugin} disabled)") + endif () + endforeach () endif ()