fix(build): Update dependency list and added auto test for i3

This commit is contained in:
Michael Carlberg 2016-05-20 11:20:58 +02:00
parent 55ac6bc732
commit b74a2957c3
2 changed files with 41 additions and 23 deletions

View File

@ -23,11 +23,20 @@ endif()
#
# Internal values and switches
#
option(ENABLE_CCACHE "Enable ccache support" ON)
option(ENABLE_ALSA "Enable alsa support" ON)
option(ENABLE_MPD "Enable mpd support" ON)
option(ENABLE_I3 "Enable i3 support" OFF)
find_program(I3_EXECUTABLE i3)
if(I3_EXECUTABLE)
message(STATUS "Enabling i3 since executable was found")
set(ENABLE_I3 ON)
else()
message(STATUS "Coult not find i3 executable")
endif()
message(STATUS "---------------------------")
message(STATUS " Enable ccache support ${ENABLE_CCACHE}")
message(STATUS " Enable mpd support ${ENABLE_MPD}")
@ -70,8 +79,6 @@ set(SETTING_PATH_CPU_INFO "/proc/stat"
set(SETTING_PATH_MEMORY_INFO "/proc/meminfo"
CACHE STRING "Path to file containing memory info")
configure_file("${CMAKE_SOURCE_DIR}/include/config.hpp.cmake" "${CMAKE_SOURCE_DIR}/include/config.hpp" ESCAPE_QUOTES @ONLY)
if(ENABLE_CCACHE)
find_program(CCACHE_FOUND "ccache")
if(CCACHE_FOUND)
@ -107,19 +114,32 @@ set(LINK_LIBS
${CMAKE_THREAD_LIBS_INIT})
if(ENABLE_ALSA)
find_package("ALSA" REQUIRED)
find_package("ALSA")
if(ALSA_FOUND)
include_directories(${ALSA_INCLUDE_DIRS})
link_directories(${ALSA_LIBRARY_DIRS})
set(LINK_LIBS ${LINK_LIBS} ${ALSA_LIBRARIES})
else(ALSA_FOUND)
# graceful fail
message(STATUS "Disabling alsa since required package wasn't found")
set(ENABLE_ALSA OFF)
endif()
endif()
if(ENABLE_MPD)
find_package("LibMPDClient" REQUIRED)
find_package("LibMPDClient")
if(LibMPDClient_FOUND)
include_directories(${LIBMPDCLIENT_INCLUDE_DIRS})
link_directories(${LIBMPDCLIENT_LIBRARY_DIRS})
set(LINK_LIBS ${LINK_LIBS} ${LIBMPDCLIENT_LIBRARY})
else(LibMPDClient_FOUND)
# graceful fail
message(STATUS "Disabling mpd since required package wasn't found")
set(ENABLE_MPD OFF)
endif()
endif()
#
# Install executable and wrapper
#
@ -134,6 +154,7 @@ if(ENABLE_I3)
endif()
target_link_libraries(${PROJECT_NAME} ${LINK_LIBS})
configure_file("${CMAKE_SOURCE_DIR}/include/config.hpp.cmake" "${CMAKE_SOURCE_DIR}/include/config.hpp" ESCAPE_QUOTES @ONLY)
install(TARGETS ${PROJECT_NAME} DESTINATION "bin")
install(PROGRAMS "${CMAKE_CURRENT_SOURCE_DIR}/scripts/lemonbuddy_wrapper.sh" DESTINATION "bin")

View File

@ -3,7 +3,7 @@ Lemonbuddy
A fast and easy-to-use tool for [Lemonbar](https://github.com/LemonBoy/bar/).
**Lemonbuddy** aims to help users' build beautiful and highly customizable status bars
**Lemonbuddy** aims to help users build beautiful and highly customizable status bars
without messing with named pipes, MacGyver-like scripting or non-blocking
loops lobotomizing your CPU.
@ -14,8 +14,11 @@ github.
## Installation
Package builds will be released for **AUR** and **XBPS** which will make it
alot easier to install. Until then you could build it from source.
### Arch Linux
Install the AUR package `lemonbuddy`
### Void Linux
A package will be written for XBPS so stay tuned.
### Dependencies:
@ -29,24 +32,18 @@ A C++ compiler with C++14 support. For example `clang`.
- libx11
- libxrandr
- wireless_tools
- If building with **ENABLE_ALSA** (default)
- alsa-lib
- If building with **ENABLE_MPD** (default)
- libmpdclient
- If building with **ENABLE_I3**
- libsigc++
- i3-wm
- i3ipc-glib
- alsa-lib _optional_
- libmpdclient _optional_
- libsigc++ _optional_
**With Pacman you can install the packages using:**
~~~ sh
$ pacman -S boost-libs libx11 libxrandr wireless_tools alsa-lib libmpdclient libsigc++ i3-wm
$ "i3ipc-glib-git is located in the AUR"
~~~
**With XBPS you can install the packages using:**
~~~ sh
$ xbps-install -S alsa-lib-devel boost-devel i3-devel i3ipc-glib-devel libX11-devel libXrandr-devel libmpdclient-devel libsigc++-devel wireless_tools-devel
$ xbps-install -S alsa-lib-devel boost-devel i3-devel libX11-devel libXrandr-devel libmpdclient-devel libsigc++-devel wireless_tools-devel
~~~~
<br>