diff options
author | Lars-Dominik Braun <PromyLOPh@lavabit.com> | 2009-01-31 19:39:48 +0100 |
---|---|---|
committer | Lars-Dominik Braun <PromyLOPh@lavabit.com> | 2009-01-31 19:39:48 +0100 |
commit | 516bc854369243b2f1ba4f1c019aca06cbbd736e (patch) | |
tree | 82cbc27a8975af41b694090172421e8dd83c9d92 | |
parent | 9312c14b47a2d6e58238902d1424ae8d45d73ac5 (diff) | |
download | pianobar-516bc854369243b2f1ba4f1c019aca06cbbd736e.tar.gz pianobar-516bc854369243b2f1ba4f1c019aca06cbbd736e.tar.bz2 pianobar-516bc854369243b2f1ba4f1c019aca06cbbd736e.zip |
Whoops, forgot to add new files to last commit...
-rw-r--r-- | CMakeLists.txt | 8 | ||||
-rw-r--r-- | libpiano/CMakeLists.txt | 6 | ||||
-rw-r--r-- | libpiano/src/CMakeLists.txt | 9 | ||||
-rw-r--r-- | libpiano/src/config.h.in | 1 | ||||
-rw-r--r-- | libwardrobe/CMakeLists.txt | 6 | ||||
-rw-r--r-- | libwardrobe/src/CMakeLists.txt | 8 | ||||
-rw-r--r-- | libwardrobe/src/config.h.in | 1 | ||||
-rw-r--r-- | src/CMakeLists.txt | 34 | ||||
-rw-r--r-- | src/FindFaad.cmake | 35 | ||||
-rw-r--r-- | src/FindLibAo.cmake | 37 | ||||
-rw-r--r-- | src/FindReadline.cmake | 37 | ||||
-rw-r--r-- | src/config.h.in | 1 |
12 files changed, 183 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..611960c --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required (VERSION 2.4) + +set (PACKAGE pianobar) +project (${PACKAGE}) + +add_subdirectory (libpiano) +add_subdirectory (libwardrobe) +add_subdirectory (src) diff --git a/libpiano/CMakeLists.txt b/libpiano/CMakeLists.txt new file mode 100644 index 0000000..d3ab672 --- /dev/null +++ b/libpiano/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required (VERSION 2.4) + +set (PACKAGE "libpiano") +project (${PACKAGE}) + +add_subdirectory (src) diff --git a/libpiano/src/CMakeLists.txt b/libpiano/src/CMakeLists.txt new file mode 100644 index 0000000..b3d49a2 --- /dev/null +++ b/libpiano/src/CMakeLists.txt @@ -0,0 +1,9 @@ +find_package (LibXml2 REQUIRED) +find_package (CURL REQUIRED) + +configure_file (${CMAKE_CURRENT_SOURCE_DIR}/config.h.in + ${CMAKE_CURRENT_BINARY_DIR}/config.h) + +include_directories (${LIBXML2_INCLUDE_DIR} ${CURL_INCLUDE_DIRS}) +add_library (piano STATIC crypt.c http.c main.c xml.c) +target_link_libraries (${CURL_LIBRARIES} ${LIBXML_LIBRARIES}) diff --git a/libpiano/src/config.h.in b/libpiano/src/config.h.in new file mode 100644 index 0000000..60600a7 --- /dev/null +++ b/libpiano/src/config.h.in @@ -0,0 +1 @@ +#define PACKAGE "${PACKAGE}" diff --git a/libwardrobe/CMakeLists.txt b/libwardrobe/CMakeLists.txt new file mode 100644 index 0000000..18217bb --- /dev/null +++ b/libwardrobe/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required (VERSION 2.4) + +set (PACKAGE "libwardrobe") +project (${PACKAGE}) + +add_subdirectory (src) diff --git a/libwardrobe/src/CMakeLists.txt b/libwardrobe/src/CMakeLists.txt new file mode 100644 index 0000000..960f4ca --- /dev/null +++ b/libwardrobe/src/CMakeLists.txt @@ -0,0 +1,8 @@ +find_package (CURL REQUIRED) + +configure_file (${CMAKE_CURRENT_SOURCE_DIR}/config.h.in + ${CMAKE_CURRENT_BINARY_DIR}/config.h) + +include_directories (${CURL_INCLUDE_DIR}) + +add_library (wardrobe STATIC main.c md5.c) diff --git a/libwardrobe/src/config.h.in b/libwardrobe/src/config.h.in new file mode 100644 index 0000000..60600a7 --- /dev/null +++ b/libwardrobe/src/config.h.in @@ -0,0 +1 @@ +#define PACKAGE "${PACKAGE}" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..0274af0 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,34 @@ +set (CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}) +find_package (LibXml2 REQUIRED) +find_package (CURL REQUIRED) +find_package (Faad REQUIRED) +find_package (Readline REQUIRED) +find_package (LibAo REQUIRED) +find_package (Threads REQUIRED) +find_library (LIBM m) + +if (NOT CMAKE_USE_PTHREADS_INIT) + message (FATAL_ERROR "pthread is currently required") +endif (NOT CMAKE_USE_PTHREADS_INIT) + +if (NOT LIBM) + message (FATAL_ERROR "libm is required") +endif (NOT LIBM) + +configure_file (${CMAKE_CURRENT_SOURCE_DIR}/config.h.in + ${CMAKE_CURRENT_BINARY_DIR}/config.h) + +include_directories ( + ${pianobar_SOURCE_DIR}/libpiano/src + ${pianobar_SOURCE_DIR}/libwardrobe/src + ${LIBXML2_INCLUDE_DIR} + ${CURL_INCLUDE_DIRS} ${READLINE_INCLUDE_DIR} ${FAAD_INCLUDE_DIRS} + ${LIBAO_INCLUDE_DIRS}) + +add_executable (pianobar main.c terminal.c settings.c player.c ui.c ui_act.c) +target_link_libraries (pianobar piano wardrobe ${CURL_LIBRARIES} + ${LIBXML2_LIBRARIES} ${READLINE_LIBRARY} ${FAAD_LIBRARY} ${LIBAO_LIBRARY} + ${CMAKE_THREAD_LIBS_INIT} ${LIBM}) + +install (TARGETS pianobar RUNTIME DESTINATION bin) +install (FILES pianobar.1 DESTINATION share/man/man1) diff --git a/src/FindFaad.cmake b/src/FindFaad.cmake new file mode 100644 index 0000000..9a8fc57 --- /dev/null +++ b/src/FindFaad.cmake @@ -0,0 +1,35 @@ +# FAAD_INCLUDE_DIRS - where to find curl/curl.h, etc. +# FAAD_LIBRARIES - List of libraries when using curl. +# FAAD_FOUND - True if curl found. + +# Look for the header file. +FIND_PATH(FAAD_INCLUDE_DIR NAMES faad.h) +MARK_AS_ADVANCED(FAAD_INCLUDE_DIR) + +# Look for the library. +FIND_LIBRARY(FAAD_LIBRARY NAMES faad) +MARK_AS_ADVANCED(FAAD_LIBRARY) + +# Copy the results to the output variables. +IF(FAAD_INCLUDE_DIR AND FAAD_LIBRARY) + SET(FAAD_FOUND 1) + SET(FAAD_LIBRARIES ${FAAD_LIBRARY}) + SET(FAAD_INCLUDE_DIRS ${FAAD_INCLUDE_DIR}) +ELSE(FAAD_INCLUDE_DIR AND FAAD_LIBRARY) + SET(FAAD_FOUND 0) + SET(FAAD_LIBRARIES) + SET(FAAD_INCLUDE_DIRS) +ENDIF(FAAD_INCLUDE_DIR AND FAAD_LIBRARY) + +# Report the results. +IF(NOT FAAD_FOUND) + SET(FAAD_DIR_MESSAGE + "FAAD was not found. Make sure FAAD_LIBRARY and FAAD_INCLUDE_DIR are set.") + IF(NOT FAAD_FIND_QUIETLY) + MESSAGE(STATUS "${FAAD_DIR_MESSAGE}") + ELSE(NOT FAAD_FIND_QUIETLY) + IF(FAAD_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "${FAAD_DIR_MESSAGE}") + ENDIF(FAAD_FIND_REQUIRED) + ENDIF(NOT FAAD_FIND_QUIETLY) +ENDIF(NOT FAAD_FOUND) diff --git a/src/FindLibAo.cmake b/src/FindLibAo.cmake new file mode 100644 index 0000000..be15975 --- /dev/null +++ b/src/FindLibAo.cmake @@ -0,0 +1,37 @@ +# - Find readline +# +# LIBAO_INCLUDE_DIRS - where to find curl/curl.h, etc. +# LIBAO_LIBRARIES - List of libraries when using curl. +# LIBAO_FOUND - True if curl found. + +# Look for the header file. +FIND_PATH(LIBAO_INCLUDE_DIR NAMES ao/ao.h) +MARK_AS_ADVANCED(LIBAO_INCLUDE_DIR) + +# Look for the library. +FIND_LIBRARY(LIBAO_LIBRARY NAMES ao) +MARK_AS_ADVANCED(LIBAO_LIBRARY) + +# Copy the results to the output variables. +IF(LIBAO_INCLUDE_DIR AND LIBAO_LIBRARY) + SET(LIBAO_FOUND 1) + SET(LIBAO_LIBRARIES ${LIBAO_LIBRARY}) + SET(LIBAO_INCLUDE_DIRS ${LIBAO_INCLUDE_DIR}) +ELSE(LIBAO_INCLUDE_DIR AND LIBAO_LIBRARY) + SET(LIBAO_FOUND 0) + SET(LIBAO_LIBRARIES) + SET(LIBAO_INCLUDE_DIRS) +ENDIF(LIBAO_INCLUDE_DIR AND LIBAO_LIBRARY) + +# Report the results. +IF(NOT LIBAO_FOUND) + SET(LIBAO_DIR_MESSAGE + "LIBAO was not found. Make sure LIBAO_LIBRARY and LIBAO_INCLUDE_DIR are set.") + IF(NOT LIBAO_FIND_QUIETLY) + MESSAGE(STATUS "${LIBAO_DIR_MESSAGE}") + ELSE(NOT LIBAO_FIND_QUIETLY) + IF(LIBAO_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "${LIBAO_DIR_MESSAGE}") + ENDIF(LIBAO_FIND_REQUIRED) + ENDIF(NOT LIBAO_FIND_QUIETLY) +ENDIF(NOT LIBAO_FOUND) diff --git a/src/FindReadline.cmake b/src/FindReadline.cmake new file mode 100644 index 0000000..67ea232 --- /dev/null +++ b/src/FindReadline.cmake @@ -0,0 +1,37 @@ +# - Find readline +# +# READLINE_INCLUDE_DIRS - where to find curl/curl.h, etc. +# READLINE_LIBRARIES - List of libraries when using curl. +# READLINE_FOUND - True if curl found. + +# Look for the header file. +FIND_PATH(READLINE_INCLUDE_DIR NAMES readline/readline.h) +MARK_AS_ADVANCED(READLINE_INCLUDE_DIR) + +# Look for the library. +FIND_LIBRARY(READLINE_LIBRARY NAMES readline) +MARK_AS_ADVANCED(READLINE_LIBRARY) + +# Copy the results to the output variables. +IF(READLINE_INCLUDE_DIR AND READLINE_LIBRARY) + SET(READLINE_FOUND 1) + SET(READLINE_LIBRARIES ${READLINE_LIBRARY}) + SET(READLINE_INCLUDE_DIRS ${READLINE_INCLUDE_DIR}) +ELSE(READLINE_INCLUDE_DIR AND READLINE_LIBRARY) + SET(READLINE_FOUND 0) + SET(READLINE_LIBRARIES) + SET(READLINE_INCLUDE_DIRS) +ENDIF(READLINE_INCLUDE_DIR AND READLINE_LIBRARY) + +# Report the results. +IF(NOT READLINE_FOUND) + SET(READLINE_DIR_MESSAGE + "READLINE was not found. Make sure READLINE_LIBRARY and READLINE_INCLUDE_DIR are set.") + IF(NOT READLINE_FIND_QUIETLY) + MESSAGE(STATUS "${READLINE_DIR_MESSAGE}") + ELSE(NOT READLINE_FIND_QUIETLY) + IF(READLINE_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "${READLINE_DIR_MESSAGE}") + ENDIF(READLINE_FIND_REQUIRED) + ENDIF(NOT READLINE_FIND_QUIETLY) +ENDIF(NOT READLINE_FOUND) diff --git a/src/config.h.in b/src/config.h.in new file mode 100644 index 0000000..60600a7 --- /dev/null +++ b/src/config.h.in @@ -0,0 +1 @@ +#define PACKAGE "${PACKAGE}" |