summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Hildebrandt <afh@surryhill.net>2023-06-07 11:01:01 +0200
committerAlexis Hildebrandt <afh@surryhill.net>2023-06-07 11:01:01 +0200
commit0eb4524a793449338d696fa04fe377f91aa9c0cd (patch)
treed208224b62d4aed5059490720ec5e2e7deb4d726
parent5e2afd286a332b93481750821be4785fbbd555a4 (diff)
downloadfork-ledger-0eb4524a793449338d696fa04fe377f91aa9c0cd.tar.gz
fork-ledger-0eb4524a793449338d696fa04fe377f91aa9c0cd.tar.bz2
fork-ledger-0eb4524a793449338d696fa04fe377f91aa9c0cd.zip
cmake: Add -fPIC to compile flags
when building ledger cli. Fixes #1913
-rw-r--r--src/CMakeLists.txt2
1 files changed, 2 insertions, 0 deletions
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)