From 2fb9e728d0ee123454903c120cda8e25a21e3fa1 Mon Sep 17 00:00:00 2001 From: Elias Steurer Date: Fri, 25 Jun 2021 16:28:30 +0200 Subject: [PATCH] Format target_link_libraries --- ScreenPlay/CMakeLists.txt | 33 +++++++++++++++--------------- ScreenPlaySDK/CMakeLists.txt | 11 +++++++--- ScreenPlayShader/CMakeLists.txt | 9 ++++++-- ScreenPlaySysInfo/CMakeLists.txt | 9 ++++++-- ScreenPlayUtil/CMakeLists.txt | 7 +++++-- ScreenPlayWallpaper/CMakeLists.txt | 17 ++++++++------- ScreenPlayWidget/CMakeLists.txt | 12 +++++++++-- 7 files changed, 62 insertions(+), 36 deletions(-) diff --git a/ScreenPlay/CMakeLists.txt b/ScreenPlay/CMakeLists.txt index 4c631b4d..0e9ffdcd 100644 --- a/ScreenPlay/CMakeLists.txt +++ b/ScreenPlay/CMakeLists.txt @@ -90,22 +90,6 @@ add_executable(${PROJECT_NAME} ${src} ${headers} ${resources} ${qml} ${fonts}) target_compile_definitions(${PROJECT_NAME} PRIVATE "GIT_VERSION=${GIT_VERSION}") -target_link_libraries( - ${PROJECT_NAME} - PRIVATE Qt${QT_VERSION_MAJOR}::Quick - Qt${QT_VERSION_MAJOR}::Gui - Qt${QT_VERSION_MAJOR}::Widgets - Qt${QT_VERSION_MAJOR}::Core - Qt${QT_VERSION_MAJOR}::WebSockets - Qt${QT_VERSION_MAJOR}::WebEngine - Qt${QT_VERSION_MAJOR}::Svg - ScreenPlaySDK - ScreenPlayUtil - benchmark::benchmark - benchmark::benchmark_main - doctest::doctest - sentry::sentry) - if(WIN32) # Icon target_sources(${PROJECT_NAME} PRIVATE ScreenPlay.rc) @@ -160,3 +144,20 @@ if(APPLE) ${CMAKE_BINARY_DIR}/bin/ScreenPlay.app/Contents/MacOS/ ) endif() + +target_link_libraries( + ${PROJECT_NAME} + PRIVATE + Qt${QT_VERSION_MAJOR}::Quick + Qt${QT_VERSION_MAJOR}::Gui + Qt${QT_VERSION_MAJOR}::Widgets + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::WebSockets + Qt${QT_VERSION_MAJOR}::WebEngine + Qt${QT_VERSION_MAJOR}::Svg + ScreenPlaySDK + ScreenPlayUtil + benchmark::benchmark + benchmark::benchmark_main + doctest::doctest + sentry::sentry) diff --git a/ScreenPlaySDK/CMakeLists.txt b/ScreenPlaySDK/CMakeLists.txt index 07ac0d61..dbee2eb5 100644 --- a/ScreenPlaySDK/CMakeLists.txt +++ b/ScreenPlaySDK/CMakeLists.txt @@ -18,7 +18,12 @@ set(headers inc/screenplay-sdk_plugin.h inc/screenplaysdk.h) add_library(${PROJECT_NAME} ${src} ${headers}) -target_link_libraries(${PROJECT_NAME} PRIVATE Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Quick Qt${QT_VERSION_MAJOR}::Gui - Qt${QT_VERSION_MAJOR}::Network) - target_include_directories(${PROJECT_NAME} PUBLIC inc) + +target_link_libraries( + ${PROJECT_NAME} + PRIVATE + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Quick + Qt${QT_VERSION_MAJOR}::Gui + Qt${QT_VERSION_MAJOR}::Network) diff --git a/ScreenPlayShader/CMakeLists.txt b/ScreenPlayShader/CMakeLists.txt index c81f5658..052924b3 100644 --- a/ScreenPlayShader/CMakeLists.txt +++ b/ScreenPlayShader/CMakeLists.txt @@ -20,8 +20,6 @@ set(shader shader.qrc) add_library(${PROJECT_NAME} SHARED ${src} ${headers} ${shader}) -target_link_libraries(${PROJECT_NAME} PRIVATE Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Quick Qt${QT_VERSION_MAJOR}::Gui) - target_include_directories(${PROJECT_NAME} PUBLIC inc) # QML module deployment @@ -58,3 +56,10 @@ else() $ ${DESTDIR}/$) endif() + +target_link_libraries( + ${PROJECT_NAME} + PRIVATE + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Quick + Qt${QT_VERSION_MAJOR}::Gui) diff --git a/ScreenPlaySysInfo/CMakeLists.txt b/ScreenPlaySysInfo/CMakeLists.txt index 4d1bf54e..9a0578e1 100644 --- a/ScreenPlaySysInfo/CMakeLists.txt +++ b/ScreenPlaySysInfo/CMakeLists.txt @@ -36,8 +36,6 @@ set(headers add_library(${PROJECT_NAME} SHARED ${src} ${headers}) -target_link_libraries(${PROJECT_NAME} PRIVATE Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Quick infoware) - # QML module deployment set(URI "ScreenPlay/Sysinfo") string(REPLACE "." "/" TARGETPATH ${URI}) @@ -62,3 +60,10 @@ add_custom_command( TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $ ${DESTDIR}/$) + +target_link_libraries( + ${PROJECT_NAME} + PRIVATE + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Quick + infoware) diff --git a/ScreenPlayUtil/CMakeLists.txt b/ScreenPlayUtil/CMakeLists.txt index e39867de..5bcec57f 100644 --- a/ScreenPlayUtil/CMakeLists.txt +++ b/ScreenPlayUtil/CMakeLists.txt @@ -18,9 +18,12 @@ set(HEADER inc/public/ScreenPlayUtil/util.h inc/public/ScreenPlayUtil/contenttyp add_library(${PROJECT_NAME} STATIC ${SOURCES} ${HEADER}) -target_link_libraries(${PROJECT_NAME} PRIVATE Qt${QT_VERSION_MAJOR}::Core) - target_include_directories( ${PROJECT_NAME} PUBLIC inc/public/ PRIVATE src/) + +target_link_libraries( + ${PROJECT_NAME} + PRIVATE + Qt${QT_VERSION_MAJOR}::Core) diff --git a/ScreenPlayWallpaper/CMakeLists.txt b/ScreenPlayWallpaper/CMakeLists.txt index ed070bc3..cec20372 100644 --- a/ScreenPlayWallpaper/CMakeLists.txt +++ b/ScreenPlayWallpaper/CMakeLists.txt @@ -41,8 +41,6 @@ if(WIN32) target_link_libraries(${PROJECT_NAME} PRIVATE shcore.lib) endif() -target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::Quick Qt5::Gui Qt5::Widgets Qt5::Core Qt5::WebEngine ScreenPlaySDK ScreenPlayUtil) - if(APPLE) set_target_properties(${PROJECT_NAME} PROPERTIES MACOSX_BUNDLE TRUE @@ -53,11 +51,12 @@ endif() target_link_libraries( ${PROJECT_NAME} - PRIVATE Qt${QT_VERSION_MAJOR}::Quick - Qt${QT_VERSION_MAJOR}::Gui - Qt${QT_VERSION_MAJOR}::Widgets - Qt${QT_VERSION_MAJOR}::Core - Qt${QT_VERSION_MAJOR}::WebEngine - ScreenPlaySDK - ScreenPlayUtil) + PRIVATE + Qt${QT_VERSION_MAJOR}::Quick + Qt${QT_VERSION_MAJOR}::Gui + Qt${QT_VERSION_MAJOR}::Widgets + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::WebEngine + ScreenPlaySDK + ScreenPlayUtil) diff --git a/ScreenPlayWidget/CMakeLists.txt b/ScreenPlayWidget/CMakeLists.txt index e7e4840e..c7e70745 100644 --- a/ScreenPlayWidget/CMakeLists.txt +++ b/ScreenPlayWidget/CMakeLists.txt @@ -37,5 +37,13 @@ if(APPLE) ) endif() -target_link_libraries(${PROJECT_NAME} PRIVATE Qt${QT_VERSION_MAJOR}::Quick Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::Widgets - Qt${QT_VERSION_MAJOR}::Core ScreenPlaySDK ScreenPlayUtil) +target_link_libraries( + ${PROJECT_NAME} + PRIVATE + Qt${QT_VERSION_MAJOR}::Quick + Qt${QT_VERSION_MAJOR}::Gui + Qt${QT_VERSION_MAJOR}::Widgets + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::WebEngine + ScreenPlaySDK + ScreenPlayUtil)