mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
Switch CMake policy CMP0023 to NEW
This commit is contained in:
@@ -5,7 +5,7 @@ CMAKE_POLICY(SET CMP0022 NEW)
|
|||||||
|
|
||||||
# TODO:
|
# TODO:
|
||||||
# Update to NEW and fix things up
|
# Update to NEW and fix things up
|
||||||
CMAKE_POLICY(SET CMP0023 OLD)
|
CMAKE_POLICY(SET CMP0023 NEW)
|
||||||
|
|
||||||
# Let AUTOMOC and AUTOUIC process generated files
|
# Let AUTOMOC and AUTOUIC process generated files
|
||||||
CMAKE_POLICY(SET CMP0071 NEW)
|
CMAKE_POLICY(SET CMP0071 NEW)
|
||||||
|
@@ -45,9 +45,6 @@ function(tomahawk_add_library)
|
|||||||
add_library(${target} SHARED ${LIBRARY_SOURCES})
|
add_library(${target} SHARED ${LIBRARY_SOURCES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# HACK: add qt modules - every lib should define its own set of modules
|
|
||||||
target_link_libraries(${target} Qt5::Core Qt5::Network Qt5::Widgets Qt5::Sql Qt5::Xml)
|
|
||||||
|
|
||||||
# definitions - can this be moved into set_target_properties below?
|
# definitions - can this be moved into set_target_properties below?
|
||||||
add_definitions(${QT_DEFINITIONS})
|
add_definitions(${QT_DEFINITIONS})
|
||||||
set_target_properties(${target} PROPERTIES AUTOMOC TRUE)
|
set_target_properties(${target} PROPERTIES AUTOMOC TRUE)
|
||||||
@@ -70,12 +67,12 @@ function(tomahawk_add_library)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# add link targets
|
# add link targets
|
||||||
target_link_libraries(${target} ${TOMAHAWK_LIBRARIES})
|
target_link_libraries(${target} PRIVATE ${TOMAHAWK_LIBRARIES})
|
||||||
if(LIBRARY_LINK_LIBRARIES)
|
if(LIBRARY_LINK_LIBRARIES)
|
||||||
target_link_libraries(${target} ${LIBRARY_LINK_LIBRARIES})
|
target_link_libraries(${target} PUBLIC ${LIBRARY_LINK_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
if(LIBRARY_LINK_PRIVATE_LIBRARIES)
|
if(LIBRARY_LINK_PRIVATE_LIBRARIES)
|
||||||
target_link_libraries(${target} LINK_PRIVATE ${LIBRARY_LINK_PRIVATE_LIBRARIES})
|
target_link_libraries(${target} PRIVATE ${LIBRARY_LINK_PRIVATE_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# add soversion
|
# add soversion
|
||||||
|
@@ -2,13 +2,14 @@ SET(fdo_srcs
|
|||||||
fdonotify/FdoNotifyPlugin.cpp
|
fdonotify/FdoNotifyPlugin.cpp
|
||||||
fdonotify/ImageConverter.cpp
|
fdonotify/ImageConverter.cpp
|
||||||
)
|
)
|
||||||
SET(FDO_LINK_LIBRARIES ${LINK_LIBRARIES})
|
SET(FDO_LINK_LIBRARIES ${LINK_LIBRARIES} Qt5::DBus)
|
||||||
qt5_add_dbus_interface(fdo_srcs fdonotify/org.freedesktop.Notifications.xml
|
qt5_add_dbus_interface(fdo_srcs fdonotify/org.freedesktop.Notifications.xml
|
||||||
FreedesktopNotificationsProxy)
|
FreedesktopNotificationsProxy)
|
||||||
|
|
||||||
tomahawk_add_plugin(fdonotify
|
tomahawk_add_plugin(fdonotify
|
||||||
TYPE infoplugin EXPORT_MACRO INFOPLUGINDLLEXPORT_PRO
|
TYPE infoplugin EXPORT_MACRO INFOPLUGINDLLEXPORT_PRO
|
||||||
SOURCES "${fdo_srcs}" LINK_LIBRARIES "${FDO_LINK_LIBRARIES}"
|
SOURCES "${fdo_srcs}"
|
||||||
|
LINK_LIBRARIES "${FDO_LINK_LIBRARIES}"
|
||||||
)
|
)
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR} )
|
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR} )
|
||||||
|
@@ -490,15 +490,12 @@ set_target_properties(
|
|||||||
OUTPUT_NAME ${TOMAHAWK_BASE_TARGET_NAME}
|
OUTPUT_NAME ${TOMAHAWK_BASE_TARGET_NAME}
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(${TOMAHAWK_LIBRARY}
|
target_link_libraries(${TOMAHAWK_LIBRARY} PUBLIC
|
||||||
Qt5::Widgets Qt5::Network Qt5::Sql Qt5::WebKitWidgets Qt5::Concurrent Qt5::Xml Qt5::UiTools Qt5::Svg
|
Qt5::Widgets Qt5::Network Qt5::Sql Qt5::WebKitWidgets Qt5::Concurrent Qt5::Xml Qt5::UiTools Qt5::Svg
|
||||||
)
|
)
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
target_link_libraries(${TOMAHAWK_LIBRARY} Qt5::MacExtras)
|
target_link_libraries(${TOMAHAWK_LIBRARY} Qt5::MacExtras)
|
||||||
endif()
|
endif()
|
||||||
if( UNIX AND NOT APPLE )
|
|
||||||
target_link_libraries(${TOMAHAWK_LIBRARY} Qt5::DBus)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
IF(QCA2_FOUND)
|
IF(QCA2_FOUND)
|
||||||
INCLUDE_DIRECTORIES( ${QCA2_INCLUDE_DIR} )
|
INCLUDE_DIRECTORIES( ${QCA2_INCLUDE_DIR} )
|
||||||
@@ -509,8 +506,7 @@ IF( UNIX AND NOT APPLE )
|
|||||||
LIST(APPEND LINK_LIBRARIES ${QT_QTDBUS_LIBRARIES} )
|
LIST(APPEND LINK_LIBRARIES ${QT_QTDBUS_LIBRARIES} )
|
||||||
ENDIF( UNIX AND NOT APPLE )
|
ENDIF( UNIX AND NOT APPLE )
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES( ${TOMAHAWK_LIBRARY}
|
TARGET_LINK_LIBRARIES(${TOMAHAWK_LIBRARY} PRIVATE
|
||||||
LINK_PRIVATE
|
|
||||||
${LIBVLC_LIBRARY}
|
${LIBVLC_LIBRARY}
|
||||||
|
|
||||||
# Thirdparty shipped with tomahawk
|
# Thirdparty shipped with tomahawk
|
||||||
@@ -518,7 +514,7 @@ TARGET_LINK_LIBRARIES( ${TOMAHAWK_LIBRARY}
|
|||||||
${QTKEYCHAIN_LIBRARIES}
|
${QTKEYCHAIN_LIBRARIES}
|
||||||
${PRIVATE_LINK_LIBRARIES}
|
${PRIVATE_LINK_LIBRARIES}
|
||||||
|
|
||||||
LINK_PUBLIC
|
PUBLIC
|
||||||
# External deps
|
# External deps
|
||||||
${QJSON_LIBRARIES}
|
${QJSON_LIBRARIES}
|
||||||
${LUCENEPP_LIBRARIES}
|
${LUCENEPP_LIBRARIES}
|
||||||
|
@@ -180,6 +180,9 @@ endif()
|
|||||||
if(WIN32)
|
if(WIN32)
|
||||||
target_link_libraries(${TOMAHAWK_APPLICATION_TARGET} Qt5::WinExtras)
|
target_link_libraries(${TOMAHAWK_APPLICATION_TARGET} Qt5::WinExtras)
|
||||||
endif()
|
endif()
|
||||||
|
if( UNIX AND NOT APPLE )
|
||||||
|
target_link_libraries(${TOMAHAWK_APPLICATION_TARGET} Qt5::DBus)
|
||||||
|
endif()
|
||||||
|
|
||||||
MESSAGE( STATUS "OS_SPECIFIC_LINK_LIBRARIES: ${OS_SPECIFIC_LINK_LIBRARIES}" )
|
MESSAGE( STATUS "OS_SPECIFIC_LINK_LIBRARIES: ${OS_SPECIFIC_LINK_LIBRARIES}" )
|
||||||
|
|
||||||
|
@@ -107,7 +107,7 @@ endif (NOT UPNPC_BUILD_STATIC AND NOT UPNPC_BUILD_SHARED)
|
|||||||
if (UPNPC_BUILD_STATIC)
|
if (UPNPC_BUILD_STATIC)
|
||||||
add_library (upnpc-static STATIC ${MINIUPNPC_SOURCES})
|
add_library (upnpc-static STATIC ${MINIUPNPC_SOURCES})
|
||||||
set_target_properties (upnpc-static PROPERTIES OUTPUT_NAME "miniupnpc")
|
set_target_properties (upnpc-static PROPERTIES OUTPUT_NAME "miniupnpc")
|
||||||
target_link_libraries (upnpc-static ${LDLIBS})
|
target_link_libraries (upnpc-static PRIVATE ${LDLIBS})
|
||||||
set (UPNPC_INSTALL_TARGETS ${UPNPC_INSTALL_TARGETS} upnpc-static)
|
set (UPNPC_INSTALL_TARGETS ${UPNPC_INSTALL_TARGETS} upnpc-static)
|
||||||
set (UPNPC_LIBRARY_TARGET upnpc-static)
|
set (UPNPC_LIBRARY_TARGET upnpc-static)
|
||||||
endif (UPNPC_BUILD_STATIC)
|
endif (UPNPC_BUILD_STATIC)
|
||||||
@@ -117,7 +117,7 @@ if (UPNPC_BUILD_SHARED)
|
|||||||
set_target_properties (upnpc-shared PROPERTIES OUTPUT_NAME "miniupnpc")
|
set_target_properties (upnpc-shared PROPERTIES OUTPUT_NAME "miniupnpc")
|
||||||
set_target_properties (upnpc-shared PROPERTIES VERSION ${MINIUPNPC_VERSION})
|
set_target_properties (upnpc-shared PROPERTIES VERSION ${MINIUPNPC_VERSION})
|
||||||
set_target_properties (upnpc-shared PROPERTIES SOVERSION ${MINIUPNPC_API_VERSION})
|
set_target_properties (upnpc-shared PROPERTIES SOVERSION ${MINIUPNPC_API_VERSION})
|
||||||
target_link_libraries (upnpc-shared ${LDLIBS})
|
target_link_libraries (upnpc-shared PRIVATE ${LDLIBS})
|
||||||
set (UPNPC_INSTALL_TARGETS ${UPNPC_INSTALL_TARGETS} upnpc-shared)
|
set (UPNPC_INSTALL_TARGETS ${UPNPC_INSTALL_TARGETS} upnpc-shared)
|
||||||
set (UPNPC_LIBRARY_TARGET upnpc-shared)
|
set (UPNPC_LIBRARY_TARGET upnpc-shared)
|
||||||
endif (UPNPC_BUILD_SHARED)
|
endif (UPNPC_BUILD_SHARED)
|
||||||
|
@@ -71,6 +71,9 @@ ADD_LIBRARY( qxtweb-standalone STATIC
|
|||||||
${sources}
|
${sources}
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries( qxtweb-standalone Qt5::Network)
|
target_link_libraries( qxtweb-standalone PUBLIC
|
||||||
|
Qt5::Network
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
set_target_properties( qxtweb-standalone PROPERTIES AUTOMOC TRUE )
|
set_target_properties( qxtweb-standalone PROPERTIES AUTOMOC TRUE )
|
||||||
|
Reference in New Issue
Block a user