No longer use deprecated qt5_use_modules (#5931)
QT 5.11 finally removes the qt5_use_modules macro. Instead target_link_libraries with the Qt5::Lib added should be used. Since we already use that in one place, it should work everywhere. Since the common companion lib already depends on Core, widges and multimedia components that link against it, also implicitly link against those libraries.
This commit is contained in:
committed by
Bertrand Songis
parent
9612d6e347
commit
ce77fbd2ff
@@ -309,7 +309,6 @@ qt5_wrap_ui(companion_SRCS ${companion_UIS})
|
||||
qt5_wrap_cpp(companion_SRCS ${companion_MOC_HDRS})
|
||||
|
||||
add_executable(${COMPANION_NAME} MACOSX_BUNDLE ${WIN_EXECUTABLE_TYPE} ${companion_SRCS} ${icon_RC})
|
||||
qt5_use_modules(${COMPANION_NAME} Core Widgets Network)
|
||||
target_link_libraries(${COMPANION_NAME} PRIVATE generaledit modeledit qcustomplot shared ${CPN_COMMON_LIB})
|
||||
|
||||
PrintTargetReport("${COMPANION_NAME}")
|
||||
|
||||
@@ -28,5 +28,4 @@ qt5_wrap_ui(generaledit_SRCS ${generaledit_UIS})
|
||||
qt5_wrap_cpp(generaledit_SRCS ${generaledit_HDRS})
|
||||
|
||||
add_library(generaledit ${generaledit_SRCS})
|
||||
qt5_use_modules(generaledit Widgets Xml Multimedia)
|
||||
target_link_libraries(generaledit PRIVATE ${CPN_COMMON_LIB})
|
||||
target_link_libraries(generaledit PRIVATE ${CPN_COMMON_LIB} Qt5::Multimedia)
|
||||
|
||||
@@ -60,5 +60,4 @@ qt5_wrap_ui(modeledit_SRCS ${modeledit_UIS})
|
||||
qt5_wrap_cpp(modeledit_SRCS ${modeledit_HDRS})
|
||||
|
||||
add_library(modeledit ${modeledit_SRCS})
|
||||
qt5_use_modules(modeledit Widgets Xml Multimedia)
|
||||
target_link_libraries(modeledit PRIVATE ${CPN_COMMON_LIB})
|
||||
target_link_libraries(modeledit PRIVATE ${CPN_COMMON_LIB} Qt5::Multimedia)
|
||||
|
||||
@@ -27,5 +27,4 @@ foreach(name ${storage_NAMES})
|
||||
endforeach()
|
||||
|
||||
add_library(storage ${storage_SRCS})
|
||||
qt5_use_modules(storage Core Xml Widgets)
|
||||
target_link_libraries(storage PRIVATE ${CPN_COMMON_LIB})
|
||||
|
||||
+1
-1
@@ -9,4 +9,4 @@ set(qcustomplot_HDRS
|
||||
qt5_wrap_cpp(qcustomplot_SRCS ${qcustomplot_HDRS})
|
||||
|
||||
add_library(qcustomplot ${qcustomplot_SRCS})
|
||||
qt5_use_modules(qcustomplot Widgets PrintSupport)
|
||||
target_link_libraries(qcustomplot PRIVATE ${CPN_COMMON_LIB} Qt5::Widgets Qt5::PrintSupport)
|
||||
|
||||
Reference in New Issue
Block a user