From 2e1204175e1bbe932ce4d9962d62b8adf18aad42 Mon Sep 17 00:00:00 2001 From: Jerry Jacobs Date: Fri, 15 Apr 2016 15:53:35 +0200 Subject: [PATCH] Add -fPIC compiler flag, remove st-info from libstlink.a which is already specified by the st-info tool --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0c9e75e..659218f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,6 +35,7 @@ add_cflag_if_supported("-Wshorten-64-to-32") add_cflag_if_supported("-Wimplicit-function-declaration") add_cflag_if_supported("-Wredundant-decls") add_cflag_if_supported("-Wundef") +add_cflag_if_supported("-fPIC") if(${CMAKE_BUILD_TYPE} MATCHES "Debug") include(CTest) @@ -54,7 +55,7 @@ set(CFILES src/stlink-common.c src/stlink-usb.c src/stlink-sg.c src/uglylogging.c - src/st-info.c) + ) include_directories(${libusb_INCLUDE_DIRS}) include_directories(src) -- 2.47.2