foxygit / doom Log in
commit 6323d330901f305a664f62a0a11b656c1529319f
Author:     William Breathitt Gray <vilhelm.gray@gmail.com>
AuthorDate: Fri Jun 7 21:48:16 2019 +0900
Commit:     William Breathitt Gray <vilhelm.gray@gmail.com>
CommitDate: Fri Jun 7 21:48:16 2019 +0900

    textscreen: Fix ambiguous textscreen CMake line

    The add_library CMake line for textscreen does not specify the type of
    library, thus leaving the build behavior ambiguous. This can cause
    problems when certain build systems are configured for dynamic linkage
    build mode (e.g. Gentoo Linux defaults to "BUILD_SHARE_LIBS=ON"),
    causing the internal textscreen library to be compiled but not linked to
    the chocolate-doom executable as would be expected.

    This patch fixes the ambiguity by specifying a STATIC type for the
    internal textscreen library, thus resolving the build issues experienced
    on Gentoo Linux and other similar system environments.
---
 textscreen/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/textscreen/CMakeLists.txt b/textscreen/CMakeLists.txt
index 2a1802a6..402ebfd7 100644
--- a/textscreen/CMakeLists.txt
+++ b/textscreen/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_library(textscreen
+add_library(textscreen STATIC
             textscreen.h
             txt_conditional.c   txt_conditional.h
             txt_checkbox.c      txt_checkbox.h