cmake: Add ENABLE_SHARED option, default ON
[quassel.git] / cmake / QuasselMacros.cmake
index 7ab4901..6182f70 100644 (file)
@@ -1,6 +1,6 @@
 # This file contains various functions and macros useful for building Quassel.
 #
-# (C) 2014-2018 by the Quassel Project <devel@quassel-irc.org>
+# (C) 2014-2019 by the Quassel Project <devel@quassel-irc.org>
 #
 # Redistribution and use is allowed according to the terms of the BSD license.
 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
@@ -45,7 +45,7 @@ function(quassel_add_module _module)
     string(REPLACE "::" "_" target ${target})
     string(REPLACE "_" "-" output_name ${target})
 
-    if (ARG_STATIC)
+    if (ARG_STATIC OR NOT ENABLE_SHARED)
         set(buildmode STATIC)
     else()
         set(buildmode SHARED)