Package: populations / 1.2.33+svn0120106+dfsg-2

qt5.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
Author: Andreas Tille <tille@debian.org>
Last-Update: Fri, 17 Nov 2017 21:49:33 +0100
Description: Try to upgrade from Qt4 to Qt5

Index: populations-collab/CMakeFiles/Makefile.cmake
===================================================================
--- populations-collab.orig/CMakeFiles/Makefile.cmake
+++ /dev/null
@@ -1,71 +0,0 @@
-# CMAKE generated file: DO NOT EDIT!
-# Generated by "Unix Makefiles" Generator, CMake Version 2.8
-
-# The generator used is:
-SET(CMAKE_DEPENDS_GENERATOR "Unix Makefiles")
-
-# The top level Makefile was generated from the following files:
-SET(CMAKE_MAKEFILE_DEPENDS
-  "CMakeCache.txt"
-  "CMakeFiles/CMakeCCompiler.cmake"
-  "CMakeFiles/CMakeCXXCompiler.cmake"
-  "CMakeFiles/CMakeSystem.cmake"
-  "CMakeLists.txt"
-  "src/CMakeLists.txt"
-  "src/config.h.cmake"
-  "/usr/share/cmake-2.8/Modules/CMakeCCompiler.cmake.in"
-  "/usr/share/cmake-2.8/Modules/CMakeCInformation.cmake"
-  "/usr/share/cmake-2.8/Modules/CMakeCXXCompiler.cmake.in"
-  "/usr/share/cmake-2.8/Modules/CMakeCXXInformation.cmake"
-  "/usr/share/cmake-2.8/Modules/CMakeCommonLanguageInclude.cmake"
-  "/usr/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake"
-  "/usr/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake"
-  "/usr/share/cmake-2.8/Modules/CMakeDetermineCompilerABI.cmake"
-  "/usr/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake"
-  "/usr/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake"
-  "/usr/share/cmake-2.8/Modules/CMakeFindBinUtils.cmake"
-  "/usr/share/cmake-2.8/Modules/CMakeGenericSystem.cmake"
-  "/usr/share/cmake-2.8/Modules/CMakeParseArguments.cmake"
-  "/usr/share/cmake-2.8/Modules/CMakeParseImplicitLinkInfo.cmake"
-  "/usr/share/cmake-2.8/Modules/CMakeSystem.cmake.in"
-  "/usr/share/cmake-2.8/Modules/CMakeSystemSpecificInformation.cmake"
-  "/usr/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake"
-  "/usr/share/cmake-2.8/Modules/CMakeTestCXXCompiler.cmake"
-  "/usr/share/cmake-2.8/Modules/CMakeTestCompilerCommon.cmake"
-  "/usr/share/cmake-2.8/Modules/CPack.cmake"
-  "/usr/share/cmake-2.8/Modules/CPackComponent.cmake"
-  "/usr/share/cmake-2.8/Modules/CheckSymbolExists.cmake"
-  "/usr/share/cmake-2.8/Modules/Compiler/GNU-C.cmake"
-  "/usr/share/cmake-2.8/Modules/Compiler/GNU-CXX.cmake"
-  "/usr/share/cmake-2.8/Modules/Compiler/GNU.cmake"
-  "/usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake"
-  "/usr/share/cmake-2.8/Modules/FindPackageMessage.cmake"
-  "/usr/share/cmake-2.8/Modules/FindQt4.cmake"
-  "/usr/share/cmake-2.8/Modules/MacroAddFileDependencies.cmake"
-  "/usr/share/cmake-2.8/Modules/Platform/Linux-GNU-C.cmake"
-  "/usr/share/cmake-2.8/Modules/Platform/Linux-GNU-CXX.cmake"
-  "/usr/share/cmake-2.8/Modules/Platform/Linux-GNU.cmake"
-  "/usr/share/cmake-2.8/Modules/Platform/Linux.cmake"
-  "/usr/share/cmake-2.8/Modules/Platform/UnixPaths.cmake"
-  "/usr/share/cmake-2.8/Modules/Qt4ConfigDependentSettings.cmake"
-  "/usr/share/cmake-2.8/Modules/Qt4Macros.cmake"
-  "/usr/share/cmake-2.8/Modules/UseQt4.cmake"
-  "/usr/share/cmake-2.8/Templates/CPackConfig.cmake.in"
-  )
-
-# The corresponding makefile is:
-SET(CMAKE_MAKEFILE_OUTPUTS
-  "Makefile"
-  "CMakeFiles/cmake.check_cache"
-  )
-
-# Byproducts of CMake generate step:
-SET(CMAKE_MAKEFILE_PRODUCTS
-  "CMakeFiles/CMakeDirectoryInformation.cmake"
-  "src/CMakeFiles/CMakeDirectoryInformation.cmake"
-  )
-
-# Dependency information for all targets:
-SET(CMAKE_DEPEND_INFO_FILES
-  "src/CMakeFiles/populations.dir/DependInfo.cmake"
-  )
Index: populations-collab/src/CMakeLists.txt
===================================================================
--- populations-collab.orig/src/CMakeLists.txt
+++ populations-collab/src/CMakeLists.txt
@@ -1,14 +1,22 @@
 
-# this command finds Qt4 libraries and sets all required variables
-# note that it's Qt4, not QT4 or qt4
-#/usr/share/cmake-2.6/Modules/FindQt4.cmake
 SET (QT_USE_QTXML true)
-FIND_PACKAGE( Qt4 REQUIRED )
 
-INCLUDE( ${QT_USE_FILE} )
+# Find includes in corresponding build directories
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
 
-#FIND_PACKAGE(X11 REQUIRED)
-#FIND_PACKAGE(FindThreads REQUIRED)
+# Find the Qt5 libraries
+find_package(Qt5Widgets)
+find_package(Qt5Core)
+
+# Add the include directories for the Qt 5 Widgets module to
+# the compile lines.
+include_directories(${Qt5Widgets_INCLUDE_DIRS})
+
+# Use the compile definitions defined in the Qt 5 Widgets module
+add_definitions(${Qt5Widgets_DEFINITIONS})
+
+# Add compiler flags for building executables (-fPIE)
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS} -fPIC")
 
 IF(WIN32)
   ADD_DEFINITIONS(-DMINGW32)
@@ -34,7 +42,7 @@ arbre.cpp arbreplus.cpp couleur.cpp vect
 IF(WIN32)
 	target_link_libraries (populations ${QT_LIBRARIES})
 ELSE(WIN32)
-	target_link_libraries (populations ${QT_LIBRARIES} m)
+	target_link_libraries (populations Qt5::Widgets Qt5::Core m)
 ENDIF(WIN32)
 
- 
\ No newline at end of file
+