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
|
As we moved the libraries of Qt5 from /usr/local/lib to /usr/local/lib/qt5 the
cmake files would get installed into /usr/local/lib/qt5/cmake. This however is
not really convenient for use with other applications depending on Qt via cmake.
For ports we could modify cmake.mk to always append /usr/local/lib/qt5 to the
search path. This would however still break applications outside of the ports
tree that users want to compile via cmake. An other option would be to patch
devel/cmake to add /usr/local/lib/qt5/cmake to the default search paths.
We chose the third option. To patch qmake's internal cmake generation function
to fix up the paths so that cmake files still land in the the "correct" location
in /usr/local/lib/cmake -- as this seemed to be the least intrusive method.
--- mkspecs/features/create_cmake.prf.orig 2017-06-28 11:54:29.000000000 +0200
+++ mkspecs/features/create_cmake.prf 2017-07-14 15:04:51.254262000 +0200
@@ -48,7 +48,7 @@
}
CMAKE_INCLUDE_DIR = $$cmakeRelativePath($$[QT_INSTALL_HEADERS], $$[QT_INSTALL_PREFIX])
-contains(CMAKE_INCLUDE_DIR, "^\\.\\./.*") {
+contains(CMAKE_INCLUDE_DIR, "^\\.\\./.*")|freebsd {
CMAKE_INCLUDE_DIR = $$[QT_INSTALL_HEADERS]/
CMAKE_INCLUDE_DIR_IS_ABSOLUTE = True
}
@@ -56,7 +56,7 @@
!exists($$first(QT.$${MODULE}_private.includes)): CMAKE_NO_PRIVATE_INCLUDES = true
CMAKE_LIB_DIR = $$cmakeRelativePath($$[QT_INSTALL_LIBS], $$[QT_INSTALL_PREFIX])
-contains(CMAKE_LIB_DIR,"^\\.\\./.*") {
+contains(CMAKE_LIB_DIR,"^\\.\\./.*")|freebsd {
CMAKE_LIB_DIR = $$[QT_INSTALL_LIBS]/
CMAKE_LIB_DIR_IS_ABSOLUTE = True
} else {
@@ -67,13 +67,13 @@
}
CMAKE_BIN_DIR = $$cmakeRelativePath($$[QT_HOST_BINS], $$[QT_INSTALL_PREFIX])
-contains(CMAKE_BIN_DIR, "^\\.\\./.*") {
+contains(CMAKE_BIN_DIR, "^\\.\\./.*")|freebsd {
CMAKE_BIN_DIR = $$[QT_HOST_BINS]/
CMAKE_BIN_DIR_IS_ABSOLUTE = True
}
CMAKE_PLUGIN_DIR = $$cmakeRelativePath($$[QT_INSTALL_PLUGINS], $$[QT_INSTALL_PREFIX])
-contains(CMAKE_PLUGIN_DIR, "^\\.\\./.*") {
+contains(CMAKE_PLUGIN_DIR, "^\\.\\./.*")|freebsd {
CMAKE_PLUGIN_DIR = $$[QT_INSTALL_PLUGINS]/
CMAKE_PLUGIN_DIR_IS_ABSOLUTE = True
}
@@ -167,7 +167,7 @@
cmake_target_file
cmake_qt5_plugin_file.files = $$cmake_target_file.output
- cmake_qt5_plugin_file.path = $$[QT_INSTALL_LIBS]/cmake/Qt5$${CMAKE_MODULE_NAME}
+ cmake_qt5_plugin_file.path = $$[QT_INSTALL_PREFIX]/lib/cmake/Qt5$${CMAKE_MODULE_NAME}
INSTALLS += cmake_qt5_plugin_file
return()
@@ -314,7 +314,7 @@
cmake_qt5_module_files.files += $$cmake_macros_file.output
}
-cmake_qt5_module_files.path = $$[QT_INSTALL_LIBS]/cmake/Qt5$${CMAKE_MODULE_NAME}
+cmake_qt5_module_files.path = $$[QT_INSTALL_PREFIX]/lib/cmake/Qt5$${CMAKE_MODULE_NAME}
# We are generating cmake files. Most developers of Qt are not aware of cmake,
# so we require automatic tests to be available. The only module which should
|