allow plugins to be compiled into the f00bar main binary

This commit is contained in:
Daniel Eklöf 2019-01-14 20:57:03 +01:00
parent 00679dbeeb
commit 0d591fe5a1
25 changed files with 400 additions and 72 deletions

View file

@ -8,9 +8,17 @@ set(CMAKE_SHARED_MODULE_PREFIX decoration_)
set(decorations background stack underline)
if (CORE_PLUGINS_AS_SHARED_LIBRARIES)
set(lib_type MODULE)
else()
set(lib_type STATIC)
endif ()
foreach (deco ${decorations})
add_library(${deco} MODULE ${deco}.c)
add_library(${deco} ${lib_type} ${deco}.c)
target_link_libraries(${deco} decoration-sdk)
endforeach ()
install(TARGETS ${decorations} DESTINATION lib/f00bar)
if (CORE_PLUGINS_AS_SHARED_LIBRARIES)
install(TARGETS ${decorations} DESTINATION lib/f00bar)
endif ()