Permalink
Browse files

Restructured project

Note: The Win32 project has been removed because this can be generated
from CMake. There is no point in maintaining a seperate set of project
files that can be auto-generated.

Change-Id: I2c25b136fbb4ed53cb9a78200f96939766c4403f
1 parent d587048 commit 0bdd98502e53c880bfabf0ad3dd3da49f6b91e53 Ricky Cormier committed May 25, 2012
Showing with 2,440 additions and 1,235 deletions.
  1. +109 −3 CMakeLists.txt
  2. +1,543 −0 Doxyfile
  3. +115 −0 README
  4. +12 −0 build.py
  5. +5 −0 debian/changelog
  6. +24 −0 debian/control
  7. +179 −0 debian/copyright
  8. +1 −0 debian/lastfm-fpclient.install
  9. +3 −0 debian/lastfm-libfplib-dev.install
  10. +1 −0 debian/lastfm-libfplib.install
  11. 0 { → doc}/readme-osx.txt
  12. +31 −0 doc/readme-unix.txt
  13. +0 −48 fplib/CMakeLists.txt
  14. +0 −203 fplib/win32/fplib.vcproj
  15. +25 −26 {fplib/include → include/fplib}/FingerprintExtractor.h
  16. +0 −45 lastfmfpclient/CMakeLists.txt
  17. +0 −56 lastfmfpclient/src/Sha256File.h
  18. +0 −240 lastfmfpclient/win32/lastfmfpclient.vcproj
  19. +0 −165 license.txt
  20. +0 −23 readme-unix.txt
  21. +0 −79 readme.txt
  22. +16 −12 {lastfmfpclient/src → src/fpclient}/HTTPClient.cpp
  23. +19 −15 {lastfmfpclient/src → src/fpclient}/HTTPClient.h
  24. +16 −12 {lastfmfpclient/src → src/fpclient}/MP3_Source.cpp
  25. +19 −15 {lastfmfpclient/src → src/fpclient}/MP3_Source.h
  26. 0 {lastfmfpclient/src → src/fpclient}/Sha256.cpp
  27. 0 {lastfmfpclient/src → src/fpclient}/Sha256.h
  28. +17 −13 {lastfmfpclient/src → src/fpclient}/Sha256File.cpp
  29. +56 −0 src/fpclient/Sha256File.h
  30. +31 −29 {lastfmfpclient/src → src/fpclient}/main.cpp
  31. +2 −2 {lastfmfpclient/src → src/fpclient}/mbid_mp3.h
  32. +15 −16 {fplib/src → src/fplib}/CircularArray.h
  33. +11 −12 {fplib/src → src/fplib}/Filter.cpp
  34. +18 −19 {fplib/src → src/fplib}/Filter.h
  35. +13 −13 {fplib/src → src/fplib}/FingerprintExtractor.cpp
  36. +112 −113 {fplib/src → src/fplib}/FloatingAverage.h
  37. +16 −17 {fplib/src → src/fplib}/OptFFT.cpp
  38. +18 −19 {fplib/src → src/fplib}/OptFFT.h
  39. +13 −14 {fplib/src → src/fplib}/fp_helper_fun.h
  40. +0 −26 win32/lastfm_fplib.sln
View
@@ -1,6 +1,112 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
+
+# Last.fm Fingerprint Library and Sample Client
PROJECT(lastfm_fplib)
-CMAKE_MINIMUM_REQUIRED(VERSION 2.4.2)
+# override default build settings using cmake config file
+INCLUDE(config.cmake OPTIONAL
+ RESULT_VARIABLE config_file
+ )
+
+# Add this libraries include path
+INCLUDE_DIRECTORIES(include)
+
+# if no config file was found using these settings
+IF(config_file STREQUAL NOTFOUND)
+
+ # Setup output directories
+ SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
+ SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
+ SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
+
+ # Set install path prefix
+ SET(CMAKE_INSTALL_PREFIX /usr/local)
+
+ # Release build
+ SET(CMAKE_BUILD_TYPE release)
+ ADD_DEFINITIONS(-O2 -DNDEBUG)
+
+ # Use additional paths when building on a Mac
+ IF(APPLE)
+ INCLUDE_DIRECTORIES(/opt/local/include/)
+ INCLUDE_DIRECTORIES(/opt/local/include/taglib)
+ LINK_DIRECTORIES(/opt/local/lib)
+ ENDIF(APPLE)
+
+ENDIF()
+
+# Required for taglib
+INCLUDE_DIRECTORIES(/usr/include/taglib)
+
+##############################################################################
+# Build library
+
+# The source files
+SET(lfmfp_sources
+ src/fplib/Filter
+ src/fplib/FingerprintExtractor
+ src/fplib/OptFFT
+ )
+# Define static library
+ADD_LIBRARY(fplib_static STATIC
+ ${lfmfp_sources}
+ )
+
+# Define dynamic library
+ADD_LIBRARY(fplib_shared SHARED
+ ${lfmfp_sources}
+ )
+
+# The static library is called 'libfplib.a'
+SET_TARGET_PROPERTIES(fplib_static
+ PROPERTIES OUTPUT_NAME fplib
+ )
+
+# The shared library is called 'libfplib.so'
+SET_TARGET_PROPERTIES(fplib_shared
+ PROPERTIES OUTPUT_NAME fplib
+ )
+
+# Install static library
+INSTALL(TARGETS fplib_static
+ ARCHIVE DESTINATION lib
+ )
+
+# Install dynamic library
+INSTALL(TARGETS fplib_shared
+ LIBRARY DESTINATION lib
+ )
+
+# Install header files
+INSTALL(DIRECTORY include/fplib
+ DESTINATION include
+ )
+##############################################################################
+# Build sample client
+
+# Define the executable
+ADD_EXECUTABLE(lastfm-fpclient
+ src/fpclient/main.cpp
+ src/fpclient/HTTPClient.cpp
+ src/fpclient/MP3_Source.cpp
+ src/fpclient/Sha256.cpp
+ src/fpclient/Sha256File.cpp
+ )
+
+# Link the executable
+TARGET_LINK_LIBRARIES(lastfm-fpclient
+ fplib
+ fftw3f
+ mad
+ tag
+ curl
+ samplerate
+ )
+
+# Install the executable
+INSTALL(TARGETS lastfm-fpclient
+ RUNTIME DESTINATION bin
+ COMPONENT lastfmfpclient
+ )
-ADD_SUBDIRECTORY(fplib)
-ADD_SUBDIRECTORY(lastfmfpclient)
+##############################################################################
Oops, something went wrong.

0 comments on commit 0bdd985

Please sign in to comment.