Ticket #46507: add-utilslib-infix.patch

File add-utilslib-infix.patch, 10.4 KB (added by RJVB (René Bertin), 10 years ago)

this allows co-installation of GTk2, Qt4 and Qt5 specific qtcurve-utils libraries

  • CMakeLists.txt

    diff --git a/CMakeLists.txt b/CMakeLists.txt
    index e8dd723..fe0839c 100644
    a b option(QTC_QT4_STYLE_SUPPORT 
    4444option(QTC_GTK2_MODIFY_MOZILLA "Modify Mozilla Gtk2 with js and css." Off)
    4545
    4646## Common settings.
     47# support an infix argument to have different qtcurve-utils libraries, e.g. for
     48# GTk2, Qt4 and Qt5
     49if(DEFINED QTC_UTILSLIB_INFIX)
     50    set(QTC_UTILS_LIBRARY "qtcurve-utils-${QTC_UTILSLIB_INFIX}")
     51else()
     52    set(QTC_UTILS_LIBRARY "qtcurve-utils")
     53endif()
     54message(STATUS "QTC_UTILS_LIBRARY=${QTC_UTILS_LIBRARY}")
     55
    4756# Only try to figure out what kde prefix is if not specified at command line.
    4857if(NOT DEFINED QTC_KDE4_PREFIX)
    4958  find_package(KDE4)
  • gtk2/style/CMakeLists.txt

    diff --git a/gtk2/style/CMakeLists.txt b/gtk2/style/CMakeLists.txt
    index 451ecdd..1f3777a 100644
    a b add_definitions(-Dopts=qtcurve_gtk2_opts) 
    8484target_link_libraries(qtcurve-gtk2
    8585  ${GTK2_LDFLAGS}
    8686  ${GTK2_LIBRARIES}
    87   qtcurve-utils qtcurve-cairo m)
     87  ${QTC_UTILS_LIBRARY} qtcurve-cairo m)
    8888
    8989install(TARGETS qtcurve-gtk2 LIBRARY DESTINATION
    9090  ${GTK2_LIBDIR}/gtk-2.0/${GTK2_BIN_VERSION}/engines)
  • lib/cairo/CMakeLists.txt

    diff --git a/lib/cairo/CMakeLists.txt b/lib/cairo/CMakeLists.txt
    index 3363e46..9153a5e 100644
    a b pkg_check_modules(CAIRO 
    1212  REQUIRED cairo
    1313  REQUIRED pangocairo)
    1414include_directories(${CAIRO_INCLUDE_DIRS})
    15 set(qtcurve_cairo_LINKS qtcurve-utils ${CAIRO_LDFLAGSF} ${CAIRO_LIBRARIES})
     15set(qtcurve_cairo_LINKS ${QTC_UTILS_LIBRARY} ${CAIRO_LDFLAGSF} ${CAIRO_LIBRARIES})
    1616add_definitions("-DQTC_UTILS_INTERNAL" ${CAIRO_CFLAGS})
    1717
    1818add_library(qtcurve-cairo SHARED ${qtcurve_cairo_SRCS})
  • lib/utils/CMakeLists.txt

    diff --git a/lib/utils/CMakeLists.txt b/lib/utils/CMakeLists.txt
    index 0dd71c1..65b6fdd 100644
    a b endif() 
    3333
    3434add_definitions("-DQTC_UTILS_INTERNAL -pthread")
    3535
    36 add_library(qtcurve-utils SHARED
     36add_library(${QTC_UTILS_LIBRARY} SHARED
    3737  ${qtcurve_utils_SRCS})
    3838
    39 target_link_libraries(qtcurve-utils ${qtcurve_utils_LINKS})
     39target_link_libraries(${QTC_UTILS_LIBRARY} ${qtcurve_utils_LINKS})
    4040
    41 set_target_properties(qtcurve-utils PROPERTIES
     41set_target_properties(${QTC_UTILS_LIBRARY} PROPERTIES
    4242  VERSION 1.0
    4343  SOVERSION 1
    4444  COMPILE_FLAGS "-fvisibility=hidden"
    4545  LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
    46 install(TARGETS qtcurve-utils LIBRARY
     46install(TARGETS ${QTC_UTILS_LIBRARY} LIBRARY
    4747  DESTINATION "${LIB_INSTALL_DIR}")
  • qt4/config/CMakeLists.txt

    diff --git a/qt4/config/CMakeLists.txt b/qt4/config/CMakeLists.txt
    index 3b65e09..d54dff9 100644
    a b set_target_properties(kstyle_qtcurve_config_kde4 PROPERTIES 
    5555target_link_libraries(kstyle_qtcurve_config_kde4
    5656  ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS}
    5757  ${KDE4_KDECORE_LIBS} ${QT_QTGUI_LIBRARY}
    58   qtcurve-utils)
     58  ${QTC_UTILS_LIBRARY})
    5959install(TARGETS kstyle_qtcurve_config_kde4
    6060  DESTINATION "${PLUGIN_INSTALL_DIR}")
    6161install(FILES QtCurveui.rc DESTINATION "${DATA_INSTALL_DIR}/QtCurve")
  • qt4/kwin/CMakeLists.txt

    diff --git a/qt4/kwin/CMakeLists.txt b/qt4/kwin/CMakeLists.txt
    index 52c7c03..832b49f 100644
    a b set_target_properties(kwin3_qtcurve_kde4 PROPERTIES 
    3636  LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
    3737  OUTPUT_NAME "kwin3_qtcurve")
    3838target_link_libraries(kwin3_qtcurve_kde4 kdecorations
    39   ${KDE4_KDEUI_LIBS} qtcurve-utils)
     39  ${KDE4_KDEUI_LIBS} ${QTC_UTILS_LIBRARY})
    4040install(TARGETS kwin3_qtcurve_kde4 DESTINATION "${PLUGIN_INSTALL_DIR}")
    4141install(FILES qtcurve.desktop DESTINATION "${DATA_INSTALL_DIR}/kwin/")
  • qt4/kwinconfig/CMakeLists.txt

    diff --git a/qt4/kwinconfig/CMakeLists.txt b/qt4/kwinconfig/CMakeLists.txt
    index 1de6dc2..8f269c6 100644
    a b set_target_properties(kwin_qtcurve_config_kde4 PROPERTIES 
    2525  OUTPUT_NAME "kwin_qtcurve_config")
    2626include_directories("${CMAKE_CURRENT_BINARY_DIR}")
    2727target_link_libraries(kwin_qtcurve_config_kde4
    28   ${KDE4_KDEUI_LIBS} ${QT_QTGUI_LIBRARY} qtcurve-utils)
     28  ${KDE4_KDEUI_LIBS} ${QT_QTGUI_LIBRARY} ${QTC_UTILS_LIBRARY})
    2929install(TARGETS kwin_qtcurve_config_kde4 DESTINATION ${PLUGIN_INSTALL_DIR})
  • qt4/style/CMakeLists.txt

    diff --git a/qt4/style/CMakeLists.txt b/qt4/style/CMakeLists.txt
    index 4ac461f..8b82d92 100644
    a b target_link_libraries(qtcurve-qt4 
    7979  ${QT_QTCORE_LIBRARY}
    8080  ${QT_QTSVG_LIBRARY}
    8181  ${QT_QTDBUS_LIBRARY}
    82   qtcurve-utils)
     82  ${QTC_UTILS_LIBRARY})
    8383
    8484if(QTC_QT4_ENABLE_KDE)
    8585  install(TARGETS qtcurve-qt4 DESTINATION ${QTCURVE_STYLE_DIR})
  • qt5/config/CMakeLists.txt

    diff --git a/qt5/config/CMakeLists.txt b/qt5/config/CMakeLists.txt
    index b4184dd..9409082 100644
    a b target_link_libraries(kstyle_qtcurve5_config 
    6060  KF5::KIOWidgets
    6161  KF5::WidgetsAddons
    6262  KF5::XmlGui)
    63 target_link_libraries(kstyle_qtcurve5_config qtcurve-utils)
     63target_link_libraries(kstyle_qtcurve5_config ${QTC_UTILS_LIBRARY})
    6464
    6565install(TARGETS kstyle_qtcurve5_config DESTINATION ${QT_PLUGIN_INSTALL_DIR})
  • qt5/kwin/CMakeLists.txt

    diff --git a/qt5/kwin/CMakeLists.txt b/qt5/kwin/CMakeLists.txt
    index 52c7c03..832b49f 100644
    a b set_target_properties(kwin3_qtcurve_kde4 PROPERTIES 
    3636  LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
    3737  OUTPUT_NAME "kwin3_qtcurve")
    3838target_link_libraries(kwin3_qtcurve_kde4 kdecorations
    39   ${KDE4_KDEUI_LIBS} qtcurve-utils)
     39  ${KDE4_KDEUI_LIBS} ${QTC_UTILS_LIBRARY})
    4040install(TARGETS kwin3_qtcurve_kde4 DESTINATION "${PLUGIN_INSTALL_DIR}")
    4141install(FILES qtcurve.desktop DESTINATION "${DATA_INSTALL_DIR}/kwin/")
  • qt5/kwinconfig/CMakeLists.txt

    diff --git a/qt5/kwinconfig/CMakeLists.txt b/qt5/kwinconfig/CMakeLists.txt
    index 1de6dc2..8f269c6 100644
    a b set_target_properties(kwin_qtcurve_config_kde4 PROPERTIES 
    2525  OUTPUT_NAME "kwin_qtcurve_config")
    2626include_directories("${CMAKE_CURRENT_BINARY_DIR}")
    2727target_link_libraries(kwin_qtcurve_config_kde4
    28   ${KDE4_KDEUI_LIBS} ${QT_QTGUI_LIBRARY} qtcurve-utils)
     28  ${KDE4_KDEUI_LIBS} ${QT_QTGUI_LIBRARY} ${QTC_UTILS_LIBRARY})
    2929install(TARGETS kwin_qtcurve_config_kde4 DESTINATION ${PLUGIN_INSTALL_DIR})
  • qt5/style/CMakeLists.txt

    diff --git a/qt5/style/CMakeLists.txt b/qt5/style/CMakeLists.txt
    index c78a73d..4a0deb5 100644
    a b set_target_properties(qtcurve-qt5 PROPERTIES 
    6262add_dependencies(qtcurve-qt5 qtc_qt5_check_on_hdr qtc_qt5_check_x_on_hdr
    6363  qtc_qt5_dialog_error_hdr qtc_qt5_dialog_information_hdr
    6464  qtc_qt5_dialog_warning_hdr)
    65 target_link_libraries(qtcurve-qt5 ${QTC_QT5_LINK_LIBS} qtcurve-utils)
     65target_link_libraries(qtcurve-qt5 ${QTC_QT5_LINK_LIBS} ${QTC_UTILS_LIBRARY})
    6666install(TARGETS qtcurve-qt5 LIBRARY DESTINATION ${QTCURVE_STYLE_DIR})
    6767
    6868if(QTC_QT5_ENABLE_KDE)
  • test/CMakeLists.txt

    diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
    index 007c595..b993a3b 100644
    a b add_definitions(-UNDEBUG) 
    44remove_definitions(-DNDEBUG)
    55
    66add_executable(test-version test-version.c)
    7 target_link_libraries(test-version qtcurve-utils)
     7target_link_libraries(test-version ${QTC_UTILS_LIBRARY})
    88add_test(NAME test-version COMMAND test-version)
    99
    1010add_executable(test-buff test-buff.c)
    11 target_link_libraries(test-buff qtcurve-utils)
     11target_link_libraries(test-buff ${QTC_UTILS_LIBRARY})
    1212add_test(NAME test-buff COMMAND test-buff)
    1313
    1414add_executable(test-search test-search.c)
    15 target_link_libraries(test-search qtcurve-utils)
     15target_link_libraries(test-search ${QTC_UTILS_LIBRARY})
    1616add_test(NAME test-search COMMAND test-search)
    1717
    1818add_executable(test-strmap test-strmap.c)
    19 target_link_libraries(test-strmap qtcurve-utils)
     19target_link_libraries(test-strmap ${QTC_UTILS_LIBRARY})
    2020add_test(NAME test-strmap COMMAND test-strmap)
    2121
    2222add_executable(test-printf test-printf.c)
    23 target_link_libraries(test-printf qtcurve-utils)
     23target_link_libraries(test-printf ${QTC_UTILS_LIBRARY})
    2424add_test(NAME test-printf COMMAND test-printf)
    2525
    2626add_executable(test-strlist test-strlist.c)
    27 target_link_libraries(test-strlist qtcurve-utils)
     27target_link_libraries(test-strlist ${QTC_UTILS_LIBRARY})
    2828add_test(NAME test-strlist COMMAND test-strlist)
    2929
    3030add_executable(test-default-arg test-default-arg.c)
    31 target_link_libraries(test-default-arg qtcurve-utils)
     31target_link_libraries(test-default-arg ${QTC_UTILS_LIBRARY})
    3232add_test(NAME test-default-arg COMMAND test-default-arg)
    3333
    3434add_executable(test-default-arg-cpp test-default-arg.cpp)
    35 target_link_libraries(test-default-arg-cpp qtcurve-utils)
     35target_link_libraries(test-default-arg-cpp ${QTC_UTILS_LIBRARY})
    3636add_test(NAME test-default-arg-cpp COMMAND test-default-arg-cpp)
    3737
    3838add_executable(test-color-str test-color-str.c)
    39 target_link_libraries(test-color-str qtcurve-utils)
     39target_link_libraries(test-color-str ${QTC_UTILS_LIBRARY})
    4040add_test(NAME test-color-str COMMAND test-color-str)
    4141
    4242add_executable(test-default test-default.c)
    43 target_link_libraries(test-default qtcurve-utils)
     43target_link_libraries(test-default ${QTC_UTILS_LIBRARY})
    4444add_test(NAME test-default COMMAND test-default)
    4545
    4646add_executable(test-default-cpp test-default.cpp)
    47 target_link_libraries(test-default-cpp qtcurve-utils)
     47target_link_libraries(test-default-cpp ${QTC_UTILS_LIBRARY})
    4848add_test(NAME test-default-cpp COMMAND test-default-cpp)
    4949
    5050add_executable(test-call test-call.c)
    51 target_link_libraries(test-call qtcurve-utils)
     51target_link_libraries(test-call ${QTC_UTILS_LIBRARY})
    5252add_test(NAME test-call COMMAND test-call)
    5353
    5454add_executable(test-call-cpp test-call.cpp)
    55 target_link_libraries(test-call-cpp qtcurve-utils)
     55target_link_libraries(test-call-cpp ${QTC_UTILS_LIBRARY})
    5656add_test(NAME test-call-cpp COMMAND test-call-cpp)
    5757
    5858add_executable(test-process test-process.c)
    59 target_link_libraries(test-process qtcurve-utils)
     59target_link_libraries(test-process ${QTC_UTILS_LIBRARY})
    6060add_test(NAME test-process COMMAND test-process)
    6161
    6262add_executable(test-popen test-popen.c)
    63 target_link_libraries(test-popen qtcurve-utils)
     63target_link_libraries(test-popen ${QTC_UTILS_LIBRARY})
    6464add_test(NAME test-popen COMMAND test-popen)
    6565
    6666add_executable(test-popen-buff test-popen-buff.c)
    67 target_link_libraries(test-popen-buff qtcurve-utils)
     67target_link_libraries(test-popen-buff ${QTC_UTILS_LIBRARY})
    6868add_test(NAME test-popen-buff COMMAND test-popen-buff)