From 0eb4524a793449338d696fa04fe377f91aa9c0cd Mon Sep 17 00:00:00 2001 From: Alexis Hildebrandt Date: Wed, 7 Jun 2023 11:01:01 +0200 Subject: cmake: Add -fPIC to compile flags when building ledger cli. Fixes #1913 --- src/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f229d70c..f64ab839 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -287,6 +287,8 @@ if (BUILD_LIBRARY) INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}" VERSION ${Ledger_VERSION_MAJOR} SOVERSION ${Ledger_VERSION_MAJOR}) + set_source_files_properties( + ${LEDGER_CLI_SOURCES} PROPERTIES COMPILE_FLAGS "-fPIC") add_executable(ledger main.cc global.cc) target_link_libraries(ledger libledger) -- cgit v1.2.3