From 038fefd1315061440a06032c7fe475ea166ef893 Mon Sep 17 00:00:00 2001 From: Zachary Hall Date: Mon, 9 Dec 2024 15:26:26 -0800 Subject: [PATCH] Use shared libraries for liblooper, and playback backends/UI frontends. --- CMakeLists.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 95382ba..1673d28 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -311,8 +311,8 @@ prefix_all(LIBRARY_SOURCES base85.h ) run_protoc(OUTDIR ${CMAKE_BINARY_DIR}/google/protobuf SOURCE google/protobuf/any.proto OUTVAR _src) -add_library(liblooper STATIC ${LIBRARY_SOURCES}) - +add_library(liblooper SHARED ${LIBRARY_SOURCES}) +set_target_properties(liblooper PROPERTIES PREFIX "") if(FOR_WASMER) target_compile_definitions(liblooper PUBLIC FOR_WASMER) endif() @@ -444,7 +444,8 @@ endif() macro(add_ui_backend) set(ARGS ${ARGV}) list(POP_FRONT ARGS target) - add_library(${target} STATIC ${ARGS}) + add_library(${target} SHARED ${ARGS}) + set_target_properties(${target} PROPERTIES LIBRARY_OUTPUT_NAME looper_frontend_${target}) message("Enabling UI backend '" ${target} "'...") list(APPEND UI_BACKENDS ${target}) set(UI_BACKENDS ${UI_BACKENDS} PARENT_SCOPE) @@ -479,7 +480,8 @@ endmacro() macro(add_playback_backend) set(ARGS ${ARGV}) list(POP_FRONT ARGS target) - add_library(${target} STATIC ${ARGS}) + add_library(${target} SHARED ${ARGS}) + set_target_properties(${target} PROPERTIES LIBRARY_OUTPUT_NAME looper_playback_backend_${target}) message("Enabling playback backend '" ${target} "'...") list(APPEND PLAYBACK_BACKENDS ${target}) set(PLAYBACK_BACKENDS ${PLAYBACK_BACKENDS} PARENT_SCOPE)