Hi,
as I want to bring kolourpaint to KF5, what is missing is a Qt5 based release
of the old
qimageblitz library, which still resides in SVN at
svn://anonsvn.kde.org/home/kde/trunk/kdesupport/qimageblitz
As this is probably the problem that I can not add a review request on
reviewboard, here is
a simple patch which allows to co-install the Qt4 and the Qt5 version.
Can someone review this, please ?
If this is ok, how would one make an official relase of this new version ?
Is it just tagging the repo ?
(If so, I'm an SVN noob. How to, please ?)
Thanks!
--
Best regards/Schöne Grüße
Martin
A: Because it breaks the logical sequence of discussion
Q: Why is top posting bad?
() ascii ribbon campaign - against html e-mail
/\ - against proprietary attachments
Geschenkideen, Accessoires, Seifen, Kulinarisches: www.lillehus.at
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt (revision 1454199)
+++ CMakeLists.txt (working copy)
@@ -9,6 +9,7 @@
find_package(Qt5Core QUIET)
endif()
if (Qt5Core_FOUND)
+ set(QT_PREFIX "5")
message(STATUS "Building with Qt5 support")
cmake_minimum_required(VERSION 2.8.8) # Bump requirement for automoc and convenience macros.
set(CMAKE_AUTOMOC ON)
@@ -15,6 +16,7 @@
find_package(Qt5Core REQUIRED)
find_package(Qt5Gui REQUIRED)
else()
+ set(QT_PREFIX "")
find_package(Qt4 REQUIRED)
# properly set up compile flags (QT_DEBUG/QT_NO_DEBUG, ...)
include(${QT_USE_FILE})
Index: blitz/CMakeLists.txt
===================================================================
--- blitz/CMakeLists.txt (revision 1454199)
+++ blitz/CMakeLists.txt (working copy)
@@ -72,13 +72,15 @@
ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
)
-install( FILES qimageblitz.h qimageblitz_export.h blitzcpu.h DESTINATION include/qimageblitz COMPONENT Devel )
+set(INCLUDE_INSTALL_DIR include/qimageblitz${QT_PREFIX})
+install( FILES qimageblitz.h qimageblitz_export.h blitzcpu.h DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel )
+
if(NOT WIN32)
- configure_file("qimageblitz.pc.cmake" "${CMAKE_CURRENT_BINARY_DIR}/qimageblitz.pc"
+ configure_file("qimageblitz.pc.cmake" "${CMAKE_CURRENT_BINARY_DIR}/qimageblitz${QT_PREFIX}.pc"
@ONLY)
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qimageblitz.pc DESTINATION
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qimageblitz${QT_PREFIX}.pc DESTINATION
${LIB_INSTALL_DIR}/pkgconfig)
endif(NOT WIN32)
Index: test/CMakeLists.txt
===================================================================
--- test/CMakeLists.txt (revision 1454199)
+++ test/CMakeLists.txt (working copy)
@@ -23,14 +23,14 @@
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
-add_executable(blitztest ${blitztest_SRCS})
+add_executable(blitztest${QT_PREFIX} ${blitztest_SRCS})
if (Qt5Core_FOUND)
- qt5_use_modules(blitztest Core Gui Widgets)
+ qt5_use_modules(blitztest${QT_PREFIX} Core Gui Widgets)
endif()
-target_link_libraries(blitztest ${QT_QTCORE_LIBRARY}
+target_link_libraries(blitztest${QT_PREFIX} ${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY} qimageblitz)
-install(TARGETS blitztest DESTINATION ${BIN_INSTALL_DIR})
+install(TARGETS blitztest${QT_PREFIX} DESTINATION ${BIN_INSTALL_DIR})