mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-06-19 09:15:40 +02:00
allow plugins to be compiled into the f00bar main binary
This commit is contained in:
parent
00679dbeeb
commit
0d591fe5a1
25 changed files with 400 additions and 72 deletions
|
@ -1,6 +1,9 @@
|
|||
cmake_minimum_required(VERSION 3.13)
|
||||
project(f00bar C)
|
||||
|
||||
set(CORE_PLUGINS_AS_SHARED_LIBRARIES 0 CACHE BOOL
|
||||
"Compiles modules, particles and decorations as shared libraries, which are loaded on-demand")
|
||||
|
||||
set(CMAKE_C_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_C_EXTENSIONS OFF)
|
||||
set(CMAKE_C_STANDARD 11)
|
||||
|
@ -10,6 +13,11 @@ set_property(DIRECTORY . APPEND PROPERTY COMPILE_DEFINITIONS
|
|||
_GNU_SOURCE
|
||||
)
|
||||
|
||||
if (CORE_PLUGINS_AS_SHARED_LIBRARIES)
|
||||
set_property(DIRECTORY . APPEND PROPERTY COMPILE_DEFINITIONS
|
||||
CORE_PLUGINS_AS_SHARED_LIBRARIES)
|
||||
endif ()
|
||||
|
||||
set(CMAKE_C_FLAGS "-Wall -Werror ${CMAKE_C_FLAGS}")
|
||||
|
||||
find_package(Threads REQUIRED)
|
||||
|
@ -72,3 +80,10 @@ install(TARGETS f00bar DESTINATION bin)
|
|||
add_subdirectory(modules)
|
||||
add_subdirectory(particles)
|
||||
add_subdirectory(decorations)
|
||||
|
||||
if (NOT CORE_PLUGINS_AS_SHARED_LIBRARIES)
|
||||
target_link_libraries(f00bar background stack underline)
|
||||
target_link_libraries(f00bar dynlist empty list map progress-bar ramp string)
|
||||
target_link_libraries(f00bar alsa backlight battery clock i3 label mpd network
|
||||
removables xkb xwindow)
|
||||
endif ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue