2022-07-28 04:01:58 +02:00
|
|
|
cmake_minimum_required(VERSION 3.7)
|
2019-09-15 20:27:32 +02:00
|
|
|
|
2020-04-23 20:59:09 +02:00
|
|
|
set(MESSAGES tagreadermessages.proto)
|
2021-07-02 01:16:14 +02:00
|
|
|
set(SOURCES tagreaderbase.cpp)
|
|
|
|
|
|
|
|
if(USE_TAGLIB AND TAGLIB_FOUND)
|
2022-08-01 09:41:12 +02:00
|
|
|
list(APPEND SOURCES tagreadertaglib.cpp tagreadergme.cpp)
|
2021-07-02 01:16:14 +02:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if(USE_TAGPARSER AND TAGPARSER_FOUND)
|
|
|
|
list(APPEND SOURCES tagreadertagparser.cpp)
|
|
|
|
endif()
|
2018-02-27 18:06:05 +01:00
|
|
|
|
|
|
|
protobuf_generate_cpp(PROTO_SOURCES PROTO_HEADERS ${MESSAGES})
|
|
|
|
|
2020-06-17 22:56:20 +02:00
|
|
|
link_directories(
|
|
|
|
${GLIB_LIBRARY_DIRS}
|
|
|
|
${PROTOBUF_LIBRARY_DIRS}
|
|
|
|
)
|
|
|
|
|
2021-07-02 01:16:14 +02:00
|
|
|
if(USE_TAGLIB AND TAGLIB_FOUND)
|
|
|
|
link_directories(${TAGLIB_LIBRARY_DIRS})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(USE_TAGPARSER AND TAGPARSER_FOUND)
|
|
|
|
link_directories(${TAGPARSER_LIBRARY_DIRS})
|
|
|
|
endif()
|
|
|
|
|
2020-04-23 20:59:09 +02:00
|
|
|
add_library(libstrawberry-tagreader STATIC ${PROTO_SOURCES} ${SOURCES})
|
2020-06-17 22:56:20 +02:00
|
|
|
|
2020-06-26 23:26:04 +02:00
|
|
|
target_include_directories(libstrawberry-tagreader SYSTEM PRIVATE
|
2020-06-17 22:56:20 +02:00
|
|
|
${GLIB_INCLUDE_DIRS}
|
|
|
|
${PROTOBUF_INCLUDE_DIRS}
|
2020-06-26 23:26:04 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
target_include_directories(libstrawberry-tagreader PRIVATE
|
2020-06-17 22:56:20 +02:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
${CMAKE_SOURCE_DIR}/ext/libstrawberry-common
|
|
|
|
${CMAKE_SOURCE_DIR}/src
|
|
|
|
${CMAKE_BINARY_DIR}/src
|
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries(libstrawberry-tagreader PRIVATE
|
|
|
|
${GLIB_LIBRARIES}
|
2023-03-08 18:56:15 +01:00
|
|
|
${Protobuf_LIBRARIES}
|
2020-07-18 04:47:54 +02:00
|
|
|
${QtCore_LIBRARIES}
|
|
|
|
${QtNetwork_LIBRARIES}
|
2023-03-18 20:03:07 +01:00
|
|
|
${QtGui_LIBRARIES}
|
2020-06-17 22:56:20 +02:00
|
|
|
libstrawberry-common
|
|
|
|
)
|
2021-07-02 01:16:14 +02:00
|
|
|
|
2023-03-08 18:57:52 +01:00
|
|
|
if(WIN32 AND Protobuf_VERSION VERSION_GREATER_EQUAL 4.22.0)
|
2023-03-08 23:13:24 +01:00
|
|
|
if (MSVC)
|
|
|
|
target_link_libraries(libstrawberry-tagreader PRIVATE abseil_dll)
|
|
|
|
else()
|
|
|
|
target_link_libraries(libstrawberry-tagreader PRIVATE absl_log_internal_message absl_log_internal_check_op)
|
|
|
|
endif()
|
2023-03-08 18:57:52 +01:00
|
|
|
endif()
|
|
|
|
|
2021-07-02 01:16:14 +02:00
|
|
|
if(USE_TAGLIB AND TAGLIB_FOUND)
|
|
|
|
target_include_directories(libstrawberry-tagreader SYSTEM PRIVATE ${TAGLIB_INCLUDE_DIRS})
|
|
|
|
target_link_libraries(libstrawberry-tagreader PRIVATE ${TAGLIB_LIBRARIES})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(USE_TAGPARSER AND TAGPARSER_FOUND)
|
|
|
|
target_include_directories(libstrawberry-tagreader SYSTEM PRIVATE ${TAGPARSER_INCLUDE_DIRS})
|
|
|
|
target_link_libraries(libstrawberry-tagreader PRIVATE ${TAGPARSER_LIBRARIES})
|
|
|
|
endif()
|