From b960c413b2841034c252ec7e66ea8e7cf5ceec8b Mon Sep 17 00:00:00 2001 From: JohannesItten Date: Tue, 23 Jun 2026 13:56:24 +0300 Subject: [PATCH] build: enable CMAKE_POSITION_INDEPENDENT_CODE globally On Linux, spdlog and fmt are compiled as static libs then linked into libmxl.so. Without -fPIC the linker rejects TPOFF32 relocations inside a shared object. Setting PIC globally fixes this for all fetched deps. Co-Authored-By: Claude Sonnet 4.6 --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index b14839c..4087745 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,7 @@ project(dmf-studio VERSION 0.1.0 LANGUAGES CXX C) set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) +set(CMAKE_POSITION_INDEPENDENT_CODE ON) # required: static deps link into libmxl.so # All executables land in build/bin so studio-manager finds node binaries next to itself set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)