X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=cmake%2FQuasselMacros.cmake;h=f6d4ea69bb3f25e234454b2b473ec4606fb05639;hb=118f68d3c0547580f4c48d62ec9076a7a458e678;hp=247b620756db6f47f6f4b1bb9e5d2e7ec176b223;hpb=cc6e7c08709c4e761e2fd9c2e322751015497003;p=quassel.git diff --git a/cmake/QuasselMacros.cmake b/cmake/QuasselMacros.cmake index 247b6207..f6d4ea69 100644 --- a/cmake/QuasselMacros.cmake +++ b/cmake/QuasselMacros.cmake @@ -1,6 +1,6 @@ # This file contains various functions and macros useful for building Quassel. # -# (C) 2014-2019 by the Quassel Project +# (C) 2014-2020 by the Quassel Project # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. @@ -20,9 +20,9 @@ include(QuasselCompileFeatures) # - a library target named quassel_client with output name (lib)quassel-client(.so) # - an alias target named Quassel::Client in global scope # -# If the optional argument STATIC is given, a static library is built; otherwise, on -# platforms other than Windows, a shared library is created. For shared libraries, also -# an install rule is added. +# If the optional argument STATIC is given, or the ENABLE_SHARED option is OFF, +# a static library is built; otherwise a shared library is created. For shared +# libraries, an install rule is also added. # # To generate an export header for the library, specify EXPORT. The header will be named # ${module}-export.h (where ${module} is the lower-case name of the module). @@ -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) @@ -143,7 +143,7 @@ function(quassel_add_resource _name) # # On Windows, input redirection apparently doesn't work, however piping does. Use this for all platforms for # consistency, accommodating for the fact that the 'cat' equivalent on Windows is 'type'. - if (WIN32) + if (WIN32 AND NOT MSYS) set(cat_cmd type) else() set(cat_cmd cat)