mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-21 20:05:42 +02:00
build: install targets for f00bar binary + module plugins
Module plugins are (still) built in <build-dir>/modules. When installing, f00bar binary is installed to <install-dir>/bin, and the module plugins to <install-dir>/lib/f00bar. For this to work, we now also set RPATH correctly. Since the installed module plugins end up in a different location then when building, different settings is required for BUILD_RPATH and INSTALL_RPATH.
This commit is contained in:
parent
7f2501334d
commit
f7fd305821
3 changed files with 22 additions and 1 deletions
|
@ -84,4 +84,9 @@ target_compile_options(module-sdk INTERFACE ${CAIRO_CFLAGS_OTHER})
|
||||||
target_include_directories(module-sdk INTERFACE ${CAIRO_INCLUDE_DIRS})
|
target_include_directories(module-sdk INTERFACE ${CAIRO_INCLUDE_DIRS})
|
||||||
target_link_libraries(module-sdk INTERFACE ${CMAKE_THREAD_LIBS_INIT})
|
target_link_libraries(module-sdk INTERFACE ${CMAKE_THREAD_LIBS_INIT})
|
||||||
|
|
||||||
|
set_property(TARGET f00bar PROPERTY INSTALL_RPATH \$ORIGIN/../lib/f00bar)
|
||||||
|
set_property(TARGET f00bar PROPERTY BUILD_RPATH \$ORIGIN/modules)
|
||||||
|
|
||||||
|
install(TARGETS f00bar DESTINATION bin)
|
||||||
|
|
||||||
add_subdirectory(modules)
|
add_subdirectory(modules)
|
||||||
|
|
|
@ -52,3 +52,19 @@ target_link_libraries(xkb module-sdk ${XCB_XKB_LIBRARIES})
|
||||||
|
|
||||||
add_library(xwindow MODULE xwindow/xwindow.c xwindow/xwindow.h)
|
add_library(xwindow MODULE xwindow/xwindow.c xwindow/xwindow.h)
|
||||||
target_link_libraries(xwindow module-sdk)
|
target_link_libraries(xwindow module-sdk)
|
||||||
|
|
||||||
|
install(
|
||||||
|
TARGETS
|
||||||
|
alsa
|
||||||
|
backlight
|
||||||
|
battery
|
||||||
|
clock
|
||||||
|
i3
|
||||||
|
label
|
||||||
|
mpd
|
||||||
|
network
|
||||||
|
removables
|
||||||
|
xkb
|
||||||
|
xwindow
|
||||||
|
|
||||||
|
DESTINATION lib/f00bar)
|
||||||
|
|
2
plugin.c
2
plugin.c
|
@ -38,7 +38,7 @@ const struct module_info *
|
||||||
plugin_load_module(const char *name)
|
plugin_load_module(const char *name)
|
||||||
{
|
{
|
||||||
char path[128];
|
char path[128];
|
||||||
snprintf(path, sizeof(path), "./modules/lib%s.so", name);
|
snprintf(path, sizeof(path), "lib%s.so", name);
|
||||||
|
|
||||||
/* Have we already loaded it? */
|
/* Have we already loaded it? */
|
||||||
tll_foreach(libs, plug) {
|
tll_foreach(libs, plug) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue