mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 19:30:21 +02:00
Switch CMake policy CMP0023 to NEW
This commit is contained in:
@@ -5,7 +5,7 @@ CMAKE_POLICY(SET CMP0022 NEW)
|
||||
|
||||
# TODO:
|
||||
# Update to NEW and fix things up
|
||||
CMAKE_POLICY(SET CMP0023 OLD)
|
||||
CMAKE_POLICY(SET CMP0023 NEW)
|
||||
|
||||
# Let AUTOMOC and AUTOUIC process generated files
|
||||
CMAKE_POLICY(SET CMP0071 NEW)
|
||||
|
@@ -45,9 +45,6 @@ function(tomahawk_add_library)
|
||||
add_library(${target} SHARED ${LIBRARY_SOURCES})
|
||||
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?
|
||||
add_definitions(${QT_DEFINITIONS})
|
||||
set_target_properties(${target} PROPERTIES AUTOMOC TRUE)
|
||||
@@ -70,12 +67,12 @@ function(tomahawk_add_library)
|
||||
endif()
|
||||
|
||||
# add link targets
|
||||
target_link_libraries(${target} ${TOMAHAWK_LIBRARIES})
|
||||
target_link_libraries(${target} PRIVATE ${TOMAHAWK_LIBRARIES})
|
||||
if(LIBRARY_LINK_LIBRARIES)
|
||||
target_link_libraries(${target} ${LIBRARY_LINK_LIBRARIES})
|
||||
target_link_libraries(${target} PUBLIC ${LIBRARY_LINK_LIBRARIES})
|
||||
endif()
|
||||
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()
|
||||
|
||||
# add soversion
|
||||
|
@@ -2,13 +2,14 @@ SET(fdo_srcs
|
||||
fdonotify/FdoNotifyPlugin.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
|
||||
FreedesktopNotificationsProxy)
|
||||
|
||||
tomahawk_add_plugin(fdonotify
|
||||
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} )
|
||||
|
@@ -490,15 +490,12 @@ set_target_properties(
|
||||
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
|
||||
)
|
||||
if(APPLE)
|
||||
target_link_libraries(${TOMAHAWK_LIBRARY} Qt5::MacExtras)
|
||||
endif()
|
||||
if( UNIX AND NOT APPLE )
|
||||
target_link_libraries(${TOMAHAWK_LIBRARY} Qt5::DBus)
|
||||
endif()
|
||||
|
||||
IF(QCA2_FOUND)
|
||||
INCLUDE_DIRECTORIES( ${QCA2_INCLUDE_DIR} )
|
||||
@@ -509,8 +506,7 @@ IF( UNIX AND NOT APPLE )
|
||||
LIST(APPEND LINK_LIBRARIES ${QT_QTDBUS_LIBRARIES} )
|
||||
ENDIF( UNIX AND NOT APPLE )
|
||||
|
||||
TARGET_LINK_LIBRARIES( ${TOMAHAWK_LIBRARY}
|
||||
LINK_PRIVATE
|
||||
TARGET_LINK_LIBRARIES(${TOMAHAWK_LIBRARY} PRIVATE
|
||||
${LIBVLC_LIBRARY}
|
||||
|
||||
# Thirdparty shipped with tomahawk
|
||||
@@ -518,7 +514,7 @@ TARGET_LINK_LIBRARIES( ${TOMAHAWK_LIBRARY}
|
||||
${QTKEYCHAIN_LIBRARIES}
|
||||
${PRIVATE_LINK_LIBRARIES}
|
||||
|
||||
LINK_PUBLIC
|
||||
PUBLIC
|
||||
# External deps
|
||||
${QJSON_LIBRARIES}
|
||||
${LUCENEPP_LIBRARIES}
|
||||
|
@@ -180,6 +180,9 @@ endif()
|
||||
if(WIN32)
|
||||
target_link_libraries(${TOMAHAWK_APPLICATION_TARGET} Qt5::WinExtras)
|
||||
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}" )
|
||||
|
||||
|
@@ -107,7 +107,7 @@ endif (NOT UPNPC_BUILD_STATIC AND NOT UPNPC_BUILD_SHARED)
|
||||
if (UPNPC_BUILD_STATIC)
|
||||
add_library (upnpc-static STATIC ${MINIUPNPC_SOURCES})
|
||||
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_LIBRARY_TARGET upnpc-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 VERSION ${MINIUPNPC_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_LIBRARY_TARGET upnpc-shared)
|
||||
endif (UPNPC_BUILD_SHARED)
|
||||
|
@@ -71,6 +71,9 @@ ADD_LIBRARY( qxtweb-standalone STATIC
|
||||
${sources}
|
||||
)
|
||||
|
||||
target_link_libraries( qxtweb-standalone Qt5::Network)
|
||||
target_link_libraries( qxtweb-standalone PUBLIC
|
||||
Qt5::Network
|
||||
)
|
||||
|
||||
|
||||
set_target_properties( qxtweb-standalone PROPERTIES AUTOMOC TRUE )
|
||||
|
Reference in New Issue
Block a user