From: Azamat H. Hackimov Date: Thu, 21 May 2020 01:08:39 +0000 (+0300) Subject: Fixing compilation with -DBUILD_SHARED_LIBS=ON X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ec255b5639a353343c8b8b6b049839d262713480;p=xonotic%2Fnetradiant.git Fixing compilation with -DBUILD_SHARED_LIBS=ON Libraries under libs should be forced STATIC since there circular dependencies and implicit linking with external libraries. Otherwise compilation will fails with underlinking errors. --- diff --git a/libs/cmdlib/CMakeLists.txt b/libs/cmdlib/CMakeLists.txt index 5d25ce82..b8c48b01 100644 --- a/libs/cmdlib/CMakeLists.txt +++ b/libs/cmdlib/CMakeLists.txt @@ -1,3 +1,3 @@ -add_library(cmdlib +add_library(cmdlib STATIC cmdlib.cpp ../cmdlib.h ) diff --git a/libs/container/CMakeLists.txt b/libs/container/CMakeLists.txt index 00bfbb4a..028129ba 100644 --- a/libs/container/CMakeLists.txt +++ b/libs/container/CMakeLists.txt @@ -1,4 +1,4 @@ -add_library(container +add_library(container STATIC array.cpp array.h cache.h container.h diff --git a/libs/crnrgba/CMakeLists.txt b/libs/crnrgba/CMakeLists.txt index 6e8463dc..a5ec18e3 100644 --- a/libs/crnrgba/CMakeLists.txt +++ b/libs/crnrgba/CMakeLists.txt @@ -1,4 +1,4 @@ -add_library(crnrgba +add_library(crnrgba STATIC crn_rgba.h crn_rgba.cpp ../crunch/inc/crn_decomp.h diff --git a/libs/ddslib/CMakeLists.txt b/libs/ddslib/CMakeLists.txt index d4de1a7c..a45ccc7f 100644 --- a/libs/ddslib/CMakeLists.txt +++ b/libs/ddslib/CMakeLists.txt @@ -1,3 +1,3 @@ -add_library(ddslib +add_library(ddslib STATIC ddslib.c ../ddslib.h ) diff --git a/libs/debugging/CMakeLists.txt b/libs/debugging/CMakeLists.txt index e5880de3..0b8f90d8 100644 --- a/libs/debugging/CMakeLists.txt +++ b/libs/debugging/CMakeLists.txt @@ -1,3 +1,3 @@ -add_library(debugging +add_library(debugging STATIC debugging.cpp debugging.h ) diff --git a/libs/etclib/CMakeLists.txt b/libs/etclib/CMakeLists.txt index 8d8fb23a..68a12302 100644 --- a/libs/etclib/CMakeLists.txt +++ b/libs/etclib/CMakeLists.txt @@ -1,3 +1,3 @@ -add_library(etclib +add_library(etclib STATIC ../etclib.c ../etclib.h ) diff --git a/libs/filematch/CMakeLists.txt b/libs/filematch/CMakeLists.txt index c7d8a9ed..fede3eb5 100644 --- a/libs/filematch/CMakeLists.txt +++ b/libs/filematch/CMakeLists.txt @@ -1,3 +1,3 @@ -add_library(filematch +add_library(filematch STATIC ../filematch.c ../filematch.h ) diff --git a/libs/generic/CMakeLists.txt b/libs/generic/CMakeLists.txt index d89f5743..e05637ef 100644 --- a/libs/generic/CMakeLists.txt +++ b/libs/generic/CMakeLists.txt @@ -1,4 +1,4 @@ -add_library(generic +add_library(generic STATIC arrayrange.h bitfield.h callback.cpp callback.h diff --git a/libs/gtkutil/CMakeLists.txt b/libs/gtkutil/CMakeLists.txt index b62098c1..80eca88c 100644 --- a/libs/gtkutil/CMakeLists.txt +++ b/libs/gtkutil/CMakeLists.txt @@ -1,4 +1,4 @@ -add_library(gtkutil +add_library(gtkutil STATIC accelerator.cpp accelerator.h button.cpp button.h clipboard.cpp clipboard.h diff --git a/libs/l_net/CMakeLists.txt b/libs/l_net/CMakeLists.txt index a0a19a84..c4984b83 100644 --- a/libs/l_net/CMakeLists.txt +++ b/libs/l_net/CMakeLists.txt @@ -7,7 +7,7 @@ else () list(APPEND L_NETLIST l_net_berkley.c) endif () -add_library(l_net ${L_NETLIST}) +add_library(l_net STATIC ${L_NETLIST}) if (WIN32) target_link_libraries(l_net PRIVATE ws2_32) diff --git a/libs/math/CMakeLists.txt b/libs/math/CMakeLists.txt index 6cfedbef..4dc8a8ce 100644 --- a/libs/math/CMakeLists.txt +++ b/libs/math/CMakeLists.txt @@ -1,4 +1,4 @@ -add_library(math +add_library(math STATIC _.cpp aabb.h curve.h diff --git a/libs/mathlib/CMakeLists.txt b/libs/mathlib/CMakeLists.txt index 5682a5e1..27b087a8 100644 --- a/libs/mathlib/CMakeLists.txt +++ b/libs/mathlib/CMakeLists.txt @@ -1,4 +1,4 @@ -add_library(mathlib +add_library(mathlib STATIC bbox.c line.c m4x4.c diff --git a/libs/memory/CMakeLists.txt b/libs/memory/CMakeLists.txt index 1c345734..bebfc22d 100644 --- a/libs/memory/CMakeLists.txt +++ b/libs/memory/CMakeLists.txt @@ -1,3 +1,3 @@ -add_library(memory +add_library(memory STATIC allocator.cpp allocator.h ) diff --git a/libs/modulesystem/CMakeLists.txt b/libs/modulesystem/CMakeLists.txt index d27aa633..489ee4a5 100644 --- a/libs/modulesystem/CMakeLists.txt +++ b/libs/modulesystem/CMakeLists.txt @@ -1,4 +1,4 @@ -add_library(modulesystem +add_library(modulesystem STATIC moduleregistry.h modulesmap.h singletonmodule.cpp singletonmodule.h diff --git a/libs/os/CMakeLists.txt b/libs/os/CMakeLists.txt index 437b506c..a1e47599 100644 --- a/libs/os/CMakeLists.txt +++ b/libs/os/CMakeLists.txt @@ -1,4 +1,4 @@ -add_library(os +add_library(os STATIC _.cpp dir.h file.h diff --git a/libs/picomodel/CMakeLists.txt b/libs/picomodel/CMakeLists.txt index 0f1286d0..4800fb46 100644 --- a/libs/picomodel/CMakeLists.txt +++ b/libs/picomodel/CMakeLists.txt @@ -1,4 +1,4 @@ -add_library(picomodel +add_library(picomodel STATIC lwo/clip.c lwo/envelope.c lwo/list.c diff --git a/libs/profile/CMakeLists.txt b/libs/profile/CMakeLists.txt index e3822f42..745238f3 100644 --- a/libs/profile/CMakeLists.txt +++ b/libs/profile/CMakeLists.txt @@ -1,4 +1,4 @@ -add_library(profile +add_library(profile STATIC file.cpp file.h profile.cpp profile.h ) diff --git a/libs/script/CMakeLists.txt b/libs/script/CMakeLists.txt index 6e49527d..0adfd124 100644 --- a/libs/script/CMakeLists.txt +++ b/libs/script/CMakeLists.txt @@ -1,4 +1,4 @@ -add_library(script +add_library(script STATIC _.cpp scripttokeniser.h scripttokenwriter.h diff --git a/libs/signal/CMakeLists.txt b/libs/signal/CMakeLists.txt index 499a4838..026c7249 100644 --- a/libs/signal/CMakeLists.txt +++ b/libs/signal/CMakeLists.txt @@ -1,4 +1,4 @@ -add_library(signal +add_library(signal STATIC isignal.h signal.cpp signal.h signalfwd.h diff --git a/libs/splines/CMakeLists.txt b/libs/splines/CMakeLists.txt index 3a6b603d..d301f272 100644 --- a/libs/splines/CMakeLists.txt +++ b/libs/splines/CMakeLists.txt @@ -1,4 +1,4 @@ -add_library(splines +add_library(splines STATIC math_angles.cpp math_angles.h math_matrix.cpp math_matrix.h math_quaternion.cpp math_quaternion.h diff --git a/libs/stream/CMakeLists.txt b/libs/stream/CMakeLists.txt index 6ce79395..ec1c9ae9 100644 --- a/libs/stream/CMakeLists.txt +++ b/libs/stream/CMakeLists.txt @@ -1,4 +1,4 @@ -add_library(stream +add_library(stream STATIC _.cpp filestream.h memstream.h diff --git a/libs/string/CMakeLists.txt b/libs/string/CMakeLists.txt index 4b0720a5..a9c2f471 100644 --- a/libs/string/CMakeLists.txt +++ b/libs/string/CMakeLists.txt @@ -1,4 +1,4 @@ -add_library(string +add_library(string STATIC pooledstring.cpp pooledstring.h string.h stringfwd.h diff --git a/libs/uilib/CMakeLists.txt b/libs/uilib/CMakeLists.txt index 080376b1..cfa95758 100644 --- a/libs/uilib/CMakeLists.txt +++ b/libs/uilib/CMakeLists.txt @@ -1,4 +1,4 @@ -add_library(uilib +add_library(uilib STATIC uilib.cpp ) diff --git a/libs/xml/CMakeLists.txt b/libs/xml/CMakeLists.txt index 96e1e216..cd0b040a 100644 --- a/libs/xml/CMakeLists.txt +++ b/libs/xml/CMakeLists.txt @@ -1,4 +1,4 @@ -add_library(xmllib +add_library(xmllib STATIC ixml.h xmlelement.h xmlparser.h