diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f07ee9..4b9ed27 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -84,4 +84,9 @@ target_compile_options(module-sdk INTERFACE ${CAIRO_CFLAGS_OTHER}) target_include_directories(module-sdk INTERFACE ${CAIRO_INCLUDE_DIRS}) 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) diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt index ffceaec..285ff58 100644 --- a/modules/CMakeLists.txt +++ b/modules/CMakeLists.txt @@ -52,3 +52,19 @@ target_link_libraries(xkb module-sdk ${XCB_XKB_LIBRARIES}) add_library(xwindow MODULE xwindow/xwindow.c xwindow/xwindow.h) target_link_libraries(xwindow module-sdk) + +install( + TARGETS + alsa + backlight + battery + clock + i3 + label + mpd + network + removables + xkb + xwindow + + DESTINATION lib/f00bar) diff --git a/plugin.c b/plugin.c index 8eb2781..7edfc2f 100644 --- a/plugin.c +++ b/plugin.c @@ -38,7 +38,7 @@ const struct module_info * plugin_load_module(const char *name) { 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? */ tll_foreach(libs, plug) {