Skip to content

Commit

Permalink
Merge pull request eLvErDe#24 from flv0/cmake-fixes
Browse files Browse the repository at this point in the history
cmake build fixes
  • Loading branch information
eLvErDe authored Dec 4, 2017
2 parents bb859de + 0959b64 commit 862405e
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 24 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ cmake_minimum_required(VERSION 2.8.0)

set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)

enable_language(CXX)

# Include some cmake checks.
include(CheckIncludeFiles)
include(CheckTypeSize)
Expand Down
45 changes: 23 additions & 22 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -14,52 +14,54 @@ libogg-dev
SWIG (for the mucipher Python bindings)



Get binaries and help for Museek+ there:
http://www.museek-plus.org



-----------------------
I - Install using CMake
-----------------------
CMake is the recommended way to build everything

I.1 - DECLARATIONS (prefix with -D, set bool options on with 1; off with 0):
----------------------------------------------------------------------------
PREFIX: Where museek+ should be installed (default is /usr)
MANDIR: Where man files should be installed (default is PREFIX/man)

EVERYTHING: Install every components of museek+ (daemon, clients, bindings, etc.)
NO_MUSEEKD: don't install museekd
NO_MUSCAN: don't install muscan
NO_SETUP: don't install musetup, musetup-gtk and musetup-qt
NO_PYMUCIPHER: don't install python bindings for mucipher (hashing library: SHA1, MD5, ...)
NO_MUSEEQ: don't install museeq (Qt4 client)
BINDINGS: install python bindings for museek
MURMUR: install PyGTK client
MUCOUS: install Curses Python client
CLIENTS: install some Python tools to museekd, featuring a command line client and a very primitive curses chat client.
To customize the installation location, different variables can be set. For an exhaustive list please see the GNUInstallDirs module documentation which is part of cmake.

Examples:
CMAKE_INSTALL_PREFIX: Where museek+ should be installed (default is /usr/local)
CMAKE_INSTALL_MANDIR: Where man files should be installed (default is share/man)
CMAKE_INSTALL_DATADIR: Where data files should be installed (default is share). Museek will put it's data in a museek/ subfolder relative to this.
Relative paths are appended to CMAKE_INSTALL_PREFIX. Absolute paths are also possible.

EVERYTHING: Install every components of museek+ (daemon, clients, bindings, etc.) (default 0)
MUSEEKD: Build museekd soulseek daemon (default 1)
MUSETUP: Build musetup configuration interface for museekd (default 1)
MUSEEQ: Build museeq Qt client (default 1)
MUSCAN: Build muscan shared file index generator (default 1)
MUCOUS: Build mucous curses client (default 0)
MURMUR: Build murmur PyGTK client (default 0)
PYMUCIPHER: Generate PyMucipher bindings (default 0)
PYTHON_BINDINGS: Generate python bindings (default 0)
PYTHON_CLIENTS: Build python clients (mulog, museekchat, museekcontrol, musirc) (default 0)

Museeq options:
BINRELOC: Use binary relocation
DATADIR: Change default data dir
RELOAD_TRANSLATIONS: Update .ts files in src/museeq/translations

I.2 - Commands
--------------
# cd /path/to/src
# mkdir workdir
# cd workdir/
# cmake -DPREFIX=/usr ..
# (or) cmake -DEVERYTHING=1 -DPREFIX=/usr ..
# (or) cmake -DMUCOUS=0 -DPREFIX=/usr/local -DMANDIR=share/man
# mkdir build/
# cd build/
# cmake -CMAKE_INSTALL_DPREFIX=/usr ..
# (or) cmake -DEVERYTHING=1 -DCMAKE_INSTALL_PREFIX=/usr ..
# (or) cmake -DMUCOUS=1 -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_MANDIR=/usr/share/man ..
# make
# (or) make VERBOSE=1
# make install



----------------------------------------------------
II - Distutils (Python's built-in installation tool)
----------------------------------------------------
Expand All @@ -86,4 +88,3 @@ Setup tools (musetup, musetup-gtk, musetup-qt)
Mucous
Requires: PyMucipher or PyCrypto, Python Bindings
# cd mucous/

4 changes: 2 additions & 2 deletions museeq/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set(QT_USE_QTUITOOLS TRUE)
# find and setup Qt4 for this project
find_package(Qt4 REQUIRED)

add_definitions(${QT_DEFINITIONS} )
add_definitions(${QT_DEFINITIONS})

# tell cmake where to search for headers:v
include_directories(.)
Expand All @@ -17,7 +17,7 @@ include(CheckIncludeFiles)
include(CheckTypeSize)
include(CheckCXXSourceCompiles)

add_definitions(-DDATADIR="\""${CMAKE_INSTALL_DATADIR}"\"")
add_definitions(-DDATADIR="${CMAKE_INSTALL_FULL_DATADIR}")

if(BINRELOC)
add_definitions(-DENABLE_BINRELOC=1)
Expand Down

0 comments on commit 862405e

Please sign in to comment.