1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-01 20:00:13 +02:00

build liblastfm2 statically on non-win32, and don't build fingerprinter.

got multiple reports of tomahawk not finding liblastfm2 due to rpath or other issues, and we are building our o ther 3rdparty deps statically like this.
This commit is contained in:
Leo Franchi
2011-03-27 22:06:55 -04:00
parent db4f514181
commit ecd8b302c4
2 changed files with 21 additions and 10 deletions

View File

@@ -17,7 +17,7 @@ include(${QT_USE_FILE})
add_subdirectory(src) add_subdirectory(src)
# Optionally build the fingerprint library # Optionally build the fingerprint library
option(BUILD_FINGERPRINT "Build the lastfm-fingerprint library" ON) option(BUILD_FINGERPRINT "Build the lastfm-fingerprint library" OFF)
find_package(LibSamplerate) find_package(LibSamplerate)
find_package(LibFFTW3) find_package(LibFFTW3)

View File

@@ -84,10 +84,18 @@ endif(WIN32)
qt4_wrap_cpp(MOC_SOURCES ${MOC_HEADERS}) qt4_wrap_cpp(MOC_SOURCES ${MOC_HEADERS})
add_library(tomahawk_lastfm2 SHARED IF( WIN32 )
${SOURCES} add_library(tomahawk_lastfm2 SHARED
${MOC_SOURCES} ${SOURCES}
) ${MOC_SOURCES}
)
ELSE()
add_definitions(-fPIC)
add_library(tomahawk_lastfm2 STATIC
${SOURCES}
${MOC_SOURCES}
)
ENDIF()
target_link_libraries(tomahawk_lastfm2 target_link_libraries(tomahawk_lastfm2
${QT_LIBRARIES} ${QT_LIBRARIES}
@@ -103,8 +111,11 @@ if(APPLE)
) )
endif(APPLE) endif(APPLE)
install(TARGETS tomahawk_lastfm2
RUNTIME DESTINATION bin IF( WIN32 )
LIBRARY DESTINATION lib${LIB_SUFFIX} install(TARGETS tomahawk_lastfm2
ARCHIVE DESTINATION lib${LIB_SUFFIX} RUNTIME DESTINATION bin
) LIBRARY DESTINATION lib${LIB_SUFFIX}
ARCHIVE DESTINATION lib${LIB_SUFFIX}
)
ENDIF()