From 3669ca20836f3e6825e7ec52d9401615a0715ebf Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Wed, 14 Oct 2020 01:33:46 +0200 Subject: [PATCH] [libkwineffects] Remove KWIN4_ADD_GLUTILS_BACKEND cmake macro Defining a macro and then using it only once is a bit strange. --- libkwineffects/CMakeLists.txt | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/libkwineffects/CMakeLists.txt b/libkwineffects/CMakeLists.txt index cdce1c4ed6..7be8a13646 100644 --- a/libkwineffects/CMakeLists.txt +++ b/libkwineffects/CMakeLists.txt @@ -92,24 +92,17 @@ set(kwin_GLUTILSLIB_SRCS logging.cpp ) -macro(KWIN4_ADD_GLUTILS_BACKEND name glinclude) - include_directories(${glinclude}) - add_library(${name} SHARED ${kwin_GLUTILSLIB_SRCS}) - generate_export_header(${name} BASE_NAME kwinglutils EXPORT_FILE_NAME kwinglutils_export.h) - target_link_libraries(${name} PUBLIC XCB::XCB KF5::CoreAddons KF5::ConfigCore KF5::WindowSystem) - set_target_properties(${name} PROPERTIES - VERSION ${KWINEFFECTS_VERSION_STRING} - SOVERSION ${KWINEFFECTS_SOVERSION} - ) - target_link_libraries(${name} PUBLIC ${ARGN}) +add_library(kwinglutils SHARED ${kwin_GLUTILSLIB_SRCS}) +generate_export_header(kwinglutils BASE_NAME kwinglutils EXPORT_FILE_NAME kwinglutils_export.h) +target_include_directories(kwinglutils PUBLIC ${epoxy_INCLUDE_DIR}) +target_link_libraries(kwinglutils PUBLIC XCB::XCB KF5::CoreAddons KF5::ConfigCore KF5::WindowSystem ${epoxy_LIBRARY}) +set_target_properties(kwinglutils PROPERTIES + VERSION ${KWINEFFECTS_VERSION_STRING} + SOVERSION ${KWINEFFECTS_SOVERSION} + OUTPUT_NAME ${KWIN_NAME}glutils +) - install(TARGETS ${name} EXPORT KWinEffectsTargets ${INSTALL_TARGETS_DEFAULT_ARGS}) -endmacro() - -kwin4_add_glutils_backend(kwinglutils ${epoxy_INCLUDE_DIR} ${epoxy_LIBRARY}) -set_target_properties(kwinglutils PROPERTIES OUTPUT_NAME ${KWIN_NAME}glutils) - -target_link_libraries(kwinglutils PUBLIC ${epoxy_LIBRARY}) +install(TARGETS kwinglutils EXPORT KWinEffectsTargets ${INSTALL_TARGETS_DEFAULT_ARGS}) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kwinconfig.h