2021-06-30 20:51:09 +02:00
|
|
|
include_directories(${LIBSPOTIFY_INCLUDE_DIRS})
|
2011-04-29 19:44:51 +00:00
|
|
|
include_directories(${PROTOBUF_INCLUDE_DIRS})
|
|
|
|
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
2012-01-05 23:22:51 +00:00
|
|
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
include_directories(${CMAKE_BINARY_DIR}/ext/libclementine-spotifyblob)
|
|
|
|
include_directories(${CMAKE_SOURCE_DIR}/ext/libclementine-spotifyblob)
|
|
|
|
include_directories(${CMAKE_SOURCE_DIR}/ext/libclementine-common)
|
2011-04-29 19:44:51 +00:00
|
|
|
|
2020-12-16 20:03:26 +01:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Woverloaded-virtual -Wall -Wno-sign-compare -Wno-deprecated-declarations -Wno-unused-local-typedefs -Wno-unused-private-field -Wno-unknown-warning-option")
|
2014-02-06 18:06:25 +01:00
|
|
|
|
2021-06-30 20:51:09 +02:00
|
|
|
link_directories(${LIBSPOTIFY_LIBRARY_DIRS})
|
2011-04-29 19:44:51 +00:00
|
|
|
|
|
|
|
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR})
|
|
|
|
|
|
|
|
set(SOURCES
|
|
|
|
main.cpp
|
2011-11-28 18:11:09 +00:00
|
|
|
mediapipeline.cpp
|
2011-04-29 19:44:51 +00:00
|
|
|
spotifyclient.cpp
|
2011-07-07 14:54:22 +00:00
|
|
|
spotify_utilities.cpp
|
2011-04-29 19:44:51 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
set(HEADERS
|
|
|
|
spotifyclient.h
|
|
|
|
)
|
|
|
|
|
2011-07-07 15:12:29 +00:00
|
|
|
if(APPLE)
|
|
|
|
list(APPEND SOURCES spotify_utilities.mm)
|
|
|
|
endif(APPLE)
|
|
|
|
|
2015-04-11 22:51:40 +02:00
|
|
|
qt5_wrap_cpp(MOC ${HEADERS})
|
2011-04-29 19:44:51 +00:00
|
|
|
|
2011-04-30 18:32:39 +00:00
|
|
|
if(WIN32 AND NOT CMAKE_BUILD_TYPE STREQUAL "Debug" AND NOT ENABLE_WIN32_CONSOLE)
|
2011-04-30 18:22:14 +00:00
|
|
|
set(win32_build_flag WIN32)
|
2011-04-30 18:32:39 +00:00
|
|
|
endif(WIN32 AND NOT CMAKE_BUILD_TYPE STREQUAL "Debug" AND NOT ENABLE_WIN32_CONSOLE)
|
2011-04-30 18:22:14 +00:00
|
|
|
|
2011-04-29 19:44:51 +00:00
|
|
|
add_executable(clementine-spotifyblob
|
2011-05-05 21:24:09 +00:00
|
|
|
${win32_build_flag}
|
2011-04-29 19:44:51 +00:00
|
|
|
${SOURCES}
|
|
|
|
${MOC}
|
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries(clementine-spotifyblob
|
2019-03-18 17:57:57 +00:00
|
|
|
${LIBSPOTIFY_LIBRARIES} ${LIBSPOTIFY_LDFLAGS}
|
2011-04-29 19:44:51 +00:00
|
|
|
${QT_QTCORE_LIBRARY}
|
|
|
|
${QT_QTNETWORK_LIBRARY}
|
2011-11-28 18:11:09 +00:00
|
|
|
${GSTREAMER_BASE_LIBRARIES}
|
|
|
|
${GSTREAMER_APP_LIBRARIES}
|
2015-12-14 00:02:07 +11:00
|
|
|
${PROTOBUF_STATIC_LIBRARY}
|
2011-04-29 19:44:51 +00:00
|
|
|
clementine-spotifyblob-messages
|
2012-01-05 23:22:51 +00:00
|
|
|
libclementine-common
|
2011-04-29 19:44:51 +00:00
|
|
|
)
|
|
|
|
|
2011-07-07 15:12:29 +00:00
|
|
|
if(APPLE)
|
|
|
|
target_link_libraries(clementine-spotifyblob
|
2016-12-15 11:36:05 +00:00
|
|
|
"-framework Foundation"
|
2011-07-07 15:12:29 +00:00
|
|
|
)
|
|
|
|
endif(APPLE)
|
|
|
|
|
2011-05-07 22:53:50 +00:00
|
|
|
if(NOT APPLE)
|
|
|
|
# macdeploy.py takes care of this on mac
|
2011-05-07 22:46:44 +00:00
|
|
|
install(TARGETS clementine-spotifyblob
|
|
|
|
RUNTIME DESTINATION bin
|
|
|
|
)
|
2011-05-07 22:53:50 +00:00
|
|
|
endif(NOT APPLE)
|
2011-04-29 19:44:51 +00:00
|
|
|
|
|
|
|
if(LINUX)
|
|
|
|
# Versioned name of the blob
|
|
|
|
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
|
|
|
set(SPOTIFY_BLOB_ARCH 32)
|
|
|
|
else(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
|
|
|
set(SPOTIFY_BLOB_ARCH 64)
|
|
|
|
endif(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
|
|
|
|
|
|
|
install(
|
|
|
|
FILES ${CMAKE_BINARY_DIR}/clementine-spotifyblob
|
2011-04-29 20:01:04 +00:00
|
|
|
DESTINATION ${CMAKE_BINARY_DIR}/spotify/version${SPOTIFY_BLOB_VERSION}-${SPOTIFY_BLOB_ARCH}bit/
|
|
|
|
RENAME blob
|
2011-04-29 19:44:51 +00:00
|
|
|
)
|
|
|
|
endif(LINUX)
|