summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorLars-Dominik Braun <PromyLOPh@lavabit.com>2009-01-31 19:39:48 +0100
committerLars-Dominik Braun <PromyLOPh@lavabit.com>2009-01-31 19:39:48 +0100
commit516bc854369243b2f1ba4f1c019aca06cbbd736e (patch)
tree82cbc27a8975af41b694090172421e8dd83c9d92 /src/CMakeLists.txt
parent9312c14b47a2d6e58238902d1424ae8d45d73ac5 (diff)
downloadpianobar-516bc854369243b2f1ba4f1c019aca06cbbd736e.tar.gz
pianobar-516bc854369243b2f1ba4f1c019aca06cbbd736e.tar.bz2
pianobar-516bc854369243b2f1ba4f1c019aca06cbbd736e.zip
Whoops, forgot to add new files to last commit...
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt34
1 files changed, 34 insertions, 0 deletions
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)