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 <noreply@anthropic.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user