From c42ff0abf217679305938f649db5e3125284cf94 Mon Sep 17 00:00:00 2001 From: TimePath Date: Wed, 29 Jul 2015 18:50:58 +1000 Subject: [PATCH] Make libs static with -fPIC --- libs/CMakeLists.txt | 6 ++++-- libs/cmdlib/CMakeLists.txt | 3 +-- libs/container/CMakeLists.txt | 2 +- libs/ddslib/CMakeLists.txt | 3 +-- libs/debugging/CMakeLists.txt | 3 +-- libs/generic/CMakeLists.txt | 3 +-- libs/gtkutil/CMakeLists.txt | 3 +-- libs/l_net/CMakeLists.txt | 3 +-- libs/math/CMakeLists.txt | 3 +-- libs/mathlib/CMakeLists.txt | 3 +-- libs/md5lib/CMakeLists.txt | 3 +-- libs/memory/CMakeLists.txt | 3 +-- libs/modulesystem/CMakeLists.txt | 3 +-- libs/os/CMakeLists.txt | 3 +-- libs/picomodel/CMakeLists.txt | 3 +-- libs/profile/CMakeLists.txt | 3 +-- libs/script/CMakeLists.txt | 3 +-- libs/signal/CMakeLists.txt | 3 +-- libs/splines/CMakeLists.txt | 3 +-- libs/stream/CMakeLists.txt | 3 +-- libs/string/CMakeLists.txt | 3 +-- libs/xml/CMakeLists.txt | 3 +-- 22 files changed, 25 insertions(+), 43 deletions(-) diff --git a/libs/CMakeLists.txt b/libs/CMakeLists.txt index be4d0a7e..5db20f38 100644 --- a/libs/CMakeLists.txt +++ b/libs/CMakeLists.txt @@ -1,3 +1,5 @@ +set(CMAKE_POSITION_INDEPENDENT_CODE 1) + include_directories(${CMAKE_CURRENT_SOURCE_DIR}) include_directories("${CMAKE_SOURCE_DIR}/include") @@ -28,12 +30,12 @@ add_subdirectory(stream) add_subdirectory(string) add_subdirectory(xml) -add_library(etclib SHARED +add_library(etclib etclib.c etclib.h ) -add_library(filematch SHARED +add_library(filematch filematch.c filematch.h ) diff --git a/libs/cmdlib/CMakeLists.txt b/libs/cmdlib/CMakeLists.txt index b37587b6..4c2be642 100644 --- a/libs/cmdlib/CMakeLists.txt +++ b/libs/cmdlib/CMakeLists.txt @@ -1,4 +1,3 @@ - -add_library(cmdlib SHARED +add_library(cmdlib cmdlib.cpp ) diff --git a/libs/container/CMakeLists.txt b/libs/container/CMakeLists.txt index 0159daa3..2e1984c2 100644 --- a/libs/container/CMakeLists.txt +++ b/libs/container/CMakeLists.txt @@ -1,4 +1,4 @@ -add_library(container SHARED +add_library(container array.cpp array.h cache.cpp diff --git a/libs/ddslib/CMakeLists.txt b/libs/ddslib/CMakeLists.txt index 9a695431..e195c84b 100644 --- a/libs/ddslib/CMakeLists.txt +++ b/libs/ddslib/CMakeLists.txt @@ -1,4 +1,3 @@ - -add_library(ddslib SHARED +add_library(ddslib ddslib.c ) diff --git a/libs/debugging/CMakeLists.txt b/libs/debugging/CMakeLists.txt index 6209d657..f178adbb 100644 --- a/libs/debugging/CMakeLists.txt +++ b/libs/debugging/CMakeLists.txt @@ -1,5 +1,4 @@ - -add_library(debugging SHARED +add_library(debugging debugging.cpp debugging.h ) diff --git a/libs/generic/CMakeLists.txt b/libs/generic/CMakeLists.txt index 172515db..2cae298f 100644 --- a/libs/generic/CMakeLists.txt +++ b/libs/generic/CMakeLists.txt @@ -1,5 +1,4 @@ - -add_library(generic SHARED +add_library(generic arrayrange.cpp arrayrange.h bitfield.cpp diff --git a/libs/gtkutil/CMakeLists.txt b/libs/gtkutil/CMakeLists.txt index 3356c061..14cf6e04 100644 --- a/libs/gtkutil/CMakeLists.txt +++ b/libs/gtkutil/CMakeLists.txt @@ -1,5 +1,4 @@ - -add_library(gtkutil SHARED +add_library(gtkutil accelerator.cpp accelerator.h button.cpp diff --git a/libs/l_net/CMakeLists.txt b/libs/l_net/CMakeLists.txt index 1e7f2578..2d8169e0 100644 --- a/libs/l_net/CMakeLists.txt +++ b/libs/l_net/CMakeLists.txt @@ -1,4 +1,3 @@ - set(L_NETLIST l_net.c l_net.h @@ -8,7 +7,7 @@ if(WIN32) else() set(L_NETLIST ${L_NETLIST} l_net_berkley.c) endif() -add_library(l_net SHARED ${L_NETLIST}) +add_library(l_net ${L_NETLIST}) if(WIN32) target_link_libraries(l_net ws2_32) endif() diff --git a/libs/math/CMakeLists.txt b/libs/math/CMakeLists.txt index d7b3b3d0..4fed0ef8 100644 --- a/libs/math/CMakeLists.txt +++ b/libs/math/CMakeLists.txt @@ -1,5 +1,4 @@ - -add_library(math SHARED +add_library(math aabb.cpp aabb.h curve.cpp diff --git a/libs/mathlib/CMakeLists.txt b/libs/mathlib/CMakeLists.txt index 9d33ceae..ca8387d2 100644 --- a/libs/mathlib/CMakeLists.txt +++ b/libs/mathlib/CMakeLists.txt @@ -1,5 +1,4 @@ - -add_library(mathlib SHARED +add_library(mathlib bbox.c line.c m4x4.c diff --git a/libs/md5lib/CMakeLists.txt b/libs/md5lib/CMakeLists.txt index fe79afed..b8948dc6 100644 --- a/libs/md5lib/CMakeLists.txt +++ b/libs/md5lib/CMakeLists.txt @@ -1,4 +1,3 @@ - -add_library(md5lib SHARED +add_library(md5lib md5lib.c ) diff --git a/libs/memory/CMakeLists.txt b/libs/memory/CMakeLists.txt index 8fd5f330..22b0fa6b 100644 --- a/libs/memory/CMakeLists.txt +++ b/libs/memory/CMakeLists.txt @@ -1,5 +1,4 @@ - -add_library(memory SHARED +add_library(memory allocator.cpp allocator.h ) diff --git a/libs/modulesystem/CMakeLists.txt b/libs/modulesystem/CMakeLists.txt index 17cd6585..57722a48 100644 --- a/libs/modulesystem/CMakeLists.txt +++ b/libs/modulesystem/CMakeLists.txt @@ -1,5 +1,4 @@ - -add_library(modulesystem SHARED +add_library(modulesystem moduleregistry.cpp moduleregistry.h modulesmap.cpp diff --git a/libs/os/CMakeLists.txt b/libs/os/CMakeLists.txt index 0c8c27a9..27463419 100644 --- a/libs/os/CMakeLists.txt +++ b/libs/os/CMakeLists.txt @@ -1,5 +1,4 @@ - -add_library(os SHARED +add_library(os dir.cpp dir.h file.cpp diff --git a/libs/picomodel/CMakeLists.txt b/libs/picomodel/CMakeLists.txt index f54f8135..52764e11 100644 --- a/libs/picomodel/CMakeLists.txt +++ b/libs/picomodel/CMakeLists.txt @@ -1,5 +1,4 @@ - -add_library(picomodel SHARED +add_library(picomodel lwo/clip.c lwo/envelope.c lwo/list.c diff --git a/libs/profile/CMakeLists.txt b/libs/profile/CMakeLists.txt index bc5882c5..799c568a 100644 --- a/libs/profile/CMakeLists.txt +++ b/libs/profile/CMakeLists.txt @@ -1,5 +1,4 @@ - -add_library(profile SHARED +add_library(profile file.cpp file.h profile.cpp diff --git a/libs/script/CMakeLists.txt b/libs/script/CMakeLists.txt index 42c50cb8..e6dde8b2 100644 --- a/libs/script/CMakeLists.txt +++ b/libs/script/CMakeLists.txt @@ -1,5 +1,4 @@ - -add_library(script SHARED +add_library(script scripttokeniser.cpp scripttokeniser.h scripttokenwriter.cpp diff --git a/libs/signal/CMakeLists.txt b/libs/signal/CMakeLists.txt index 8d023347..26d0ecb7 100644 --- a/libs/signal/CMakeLists.txt +++ b/libs/signal/CMakeLists.txt @@ -1,5 +1,4 @@ - -add_library(signal SHARED +add_library(signal isignal.cpp isignal.h signal.cpp diff --git a/libs/splines/CMakeLists.txt b/libs/splines/CMakeLists.txt index 7c070cbb..9b942704 100644 --- a/libs/splines/CMakeLists.txt +++ b/libs/splines/CMakeLists.txt @@ -1,5 +1,4 @@ - -add_library(splines SHARED +add_library(splines math_angles.cpp math_angles.h math_matrix.cpp diff --git a/libs/stream/CMakeLists.txt b/libs/stream/CMakeLists.txt index 945f2887..daf02495 100644 --- a/libs/stream/CMakeLists.txt +++ b/libs/stream/CMakeLists.txt @@ -1,5 +1,4 @@ - -add_library(stream SHARED +add_library(stream filestream.cpp filestream.h memstream.cpp diff --git a/libs/string/CMakeLists.txt b/libs/string/CMakeLists.txt index 0f569222..ca497230 100644 --- a/libs/string/CMakeLists.txt +++ b/libs/string/CMakeLists.txt @@ -1,5 +1,4 @@ - -add_library(string SHARED +add_library(string pooledstring.cpp pooledstring.h string.h diff --git a/libs/xml/CMakeLists.txt b/libs/xml/CMakeLists.txt index 4de0de07..7c01ac15 100644 --- a/libs/xml/CMakeLists.txt +++ b/libs/xml/CMakeLists.txt @@ -1,8 +1,7 @@ - find_package(LibXml2 REQUIRED) include_directories(${LIBXML2_INCLUDE_DIR}) -add_library(xmllib SHARED +add_library(xmllib ixml.cpp ixml.h xmlelement.cpp -- 2.39.2