2011-04-25 21:16:26 +02:00
|
|
|
include_directories(${PROTOBUF_INCLUDE_DIRS})
|
|
|
|
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
include_directories(${CMAKE_SOURCE_DIR}/src)
|
|
|
|
|
2011-04-29 21:44:51 +02:00
|
|
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/blobversion.h.in
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/blobversion.h)
|
2011-04-25 21:16:26 +02:00
|
|
|
|
2011-04-26 15:42:58 +02:00
|
|
|
set(COMMON_SOURCES
|
2011-04-27 18:38:28 +02:00
|
|
|
spotifymessagehandler.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
set(COMMON_HEADERS
|
|
|
|
spotifymessagehandler.h
|
2011-04-25 21:16:26 +02:00
|
|
|
)
|
|
|
|
|
2011-04-26 15:42:58 +02:00
|
|
|
set(COMMON_MESSAGES
|
|
|
|
spotifymessages.proto
|
2011-04-25 21:16:26 +02:00
|
|
|
)
|
|
|
|
|
2011-04-27 18:38:28 +02:00
|
|
|
qt4_wrap_cpp(COMMON_MOC ${COMMON_HEADERS})
|
2011-04-26 15:42:58 +02:00
|
|
|
protobuf_generate_cpp(PROTO_SOURCES PROTO_HEADERS ${COMMON_MESSAGES})
|
2011-04-25 21:16:26 +02:00
|
|
|
|
|
|
|
add_library(clementine-spotifyblob-messages STATIC
|
2011-04-26 15:42:58 +02:00
|
|
|
${COMMON_SOURCES}
|
2011-04-27 18:38:28 +02:00
|
|
|
${COMMON_MOC}
|
2011-04-25 21:16:26 +02:00
|
|
|
${PROTO_SOURCES}
|
|
|
|
)
|
|
|
|
|
2011-04-29 21:44:51 +02:00
|
|
|
# Use protobuf-lite if it's available
|
|
|
|
if(PROTOBUF_LITE_LIBRARY)
|
|
|
|
set(protobuf ${PROTOBUF_LITE_LIBRARY})
|
|
|
|
else(PROTOBUF_LITE_LIBRARY)
|
|
|
|
set(protobuf ${PROTOBUF_LIBRARY})
|
|
|
|
endif(PROTOBUF_LITE_LIBRARY)
|
|
|
|
|
2011-04-25 21:16:26 +02:00
|
|
|
target_link_libraries(clementine-spotifyblob-messages
|
2011-04-29 21:44:51 +02:00
|
|
|
${protobuf}
|
2011-04-25 21:16:26 +02:00
|
|
|
${CMAKE_THREAD_LIBS_INIT}
|
|
|
|
)
|
|
|
|
|