| 1 |
Set some proper paths to make cmake find our tools.
|
| 2 |
Original patch by Heiko Przybyl, updated for cmake-2.8.8 by Chris Reffett
|
| 3 |
|
| 4 |
The ebuild now adds an extra / at the end of $EPREFIX so that it is
|
| 5 |
never the empty string (so that CMAKE_SYSTEM_PREFIX_PATH remains
|
| 6 |
correct)
|
| 7 |
|
| 8 |
--- cmake-2.8.8/Modules/Platform/Darwin.cmake
|
| 9 |
+++ cmake-2.8.8/Modules/Platform/Darwin.cmake
|
| 10 |
@@ -229,20 +229,24 @@
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
-# default to searching for frameworks first
|
| 15 |
-SET(CMAKE_FIND_FRAMEWORK FIRST)
|
| 16 |
+# default to searching for frameworks last
|
| 17 |
+SET(CMAKE_FIND_FRAMEWORK LAST)
|
| 18 |
# set up the default search directories for frameworks
|
| 19 |
SET(CMAKE_SYSTEM_FRAMEWORK_PATH
|
| 20 |
+ @GENTOO_PORTAGE_EPREFIX@Frameworks
|
| 21 |
+ @GENTOO_PORTAGE_EPREFIX@usr/lib
|
| 22 |
~/Library/Frameworks
|
| 23 |
/Library/Frameworks
|
| 24 |
/Network/Library/Frameworks
|
| 25 |
/System/Library/Frameworks)
|
| 26 |
|
| 27 |
-# default to searching for application bundles first
|
| 28 |
-SET(CMAKE_FIND_APPBUNDLE FIRST)
|
| 29 |
+# default to searching for application bundles last
|
| 30 |
+SET(CMAKE_FIND_APPBUNDLE LAST)
|
| 31 |
# set up the default search directories for application bundles
|
| 32 |
SET(_apps_paths)
|
| 33 |
FOREACH(_path
|
| 34 |
+ @GENTOO_PORTAGE_EPREFIX@Applications
|
| 35 |
+ @GENTOO_PORTAGE_EPREFIX@usr/bin
|
| 36 |
"~/Applications"
|
| 37 |
"/Applications"
|
| 38 |
"${OSX_DEVELOPER_ROOT}/../Applications" # Xcode 4.3+
|
| 39 |
diff -ruN cmake-2.8.8.orig/Modules/Platform/UnixPaths.cmake cmake-2.8.8/Modules/Platform/UnixPaths.cmake
|
| 40 |
--- cmake-2.8.8/Modules/Platform/UnixPaths.cmake
|
| 41 |
+++ cmake-2.8.8/Modules/Platform/UnixPaths.cmake
|
| 42 |
@@ -33,6 +33,7 @@
|
| 43 |
# search types.
|
| 44 |
LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH
|
| 45 |
# Standard
|
| 46 |
+ @GENTOO_PORTAGE_EPREFIX@usr/local @GENTOO_PORTAGE_EPREFIX@usr @GENTOO_PORTAGE_EPREFIX@
|
| 47 |
/usr/local /usr /
|
| 48 |
|
| 49 |
# CMake install location
|
| 50 |
@@ -44,43 +45,41 @@
|
| 51 |
|
| 52 |
# List common include file locations not under the common prefixes.
|
| 53 |
LIST(APPEND CMAKE_SYSTEM_INCLUDE_PATH
|
| 54 |
- # Windows API on Cygwin
|
| 55 |
- /usr/include/w32api
|
| 56 |
-
|
| 57 |
- # X11
|
| 58 |
- /usr/X11R6/include /usr/include/X11
|
| 59 |
-
|
| 60 |
- # Other
|
| 61 |
- /usr/pkg/include
|
| 62 |
- /opt/csw/include /opt/include
|
| 63 |
- /usr/openwin/include
|
| 64 |
+ @GENTOO_PORTAGE_EPREFIX@usr/include
|
| 65 |
)
|
| 66 |
|
| 67 |
LIST(APPEND CMAKE_SYSTEM_LIBRARY_PATH
|
| 68 |
- # Windows API on Cygwin
|
| 69 |
- /usr/lib/w32api
|
| 70 |
-
|
| 71 |
- # X11
|
| 72 |
- /usr/X11R6/lib /usr/lib/X11
|
| 73 |
-
|
| 74 |
- # Other
|
| 75 |
- /usr/pkg/lib
|
| 76 |
- /opt/csw/lib /opt/lib
|
| 77 |
- /usr/openwin/lib
|
| 78 |
+ @GENTOO_PORTAGE_GCCLIBDIR@/gcc
|
| 79 |
+ @GENTOO_PORTAGE_GCCLIBDIR@
|
| 80 |
+ @GENTOO_PORTAGE_EPREFIX@usr/lib64
|
| 81 |
+ @GENTOO_PORTAGE_EPREFIX@usr/libx32
|
| 82 |
+ @GENTOO_PORTAGE_EPREFIX@usr/lib32
|
| 83 |
+ @GENTOO_PORTAGE_EPREFIX@usr/lib
|
| 84 |
+ @GENTOO_PORTAGE_EPREFIX@lib
|
| 85 |
)
|
| 86 |
|
| 87 |
LIST(APPEND CMAKE_SYSTEM_PROGRAM_PATH
|
| 88 |
- /usr/pkg/bin
|
| 89 |
+ @GENTOO_PORTAGE_EPREFIX@usr/bin
|
| 90 |
+ @GENTOO_PORTAGE_EPREFIX@bin
|
| 91 |
)
|
| 92 |
|
| 93 |
LIST(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
|
| 94 |
+ @GENTOO_PORTAGE_GCCLIBDIR@/gcc
|
| 95 |
+ @GENTOO_PORTAGE_GCCLIBDIR@
|
| 96 |
+ @GENTOO_PORTAGE_EPREFIX@usr/lib64
|
| 97 |
+ @GENTOO_PORTAGE_EPREFIX@usr/libx32
|
| 98 |
+ @GENTOO_PORTAGE_EPREFIX@usr/lib32
|
| 99 |
+ @GENTOO_PORTAGE_EPREFIX@usr/lib
|
| 100 |
+ @GENTOO_PORTAGE_EPREFIX@lib
|
| 101 |
+ /lib /usr/lib /usr/lib32 /usr/lib64 /usr/libx32
|
| 102 |
- /lib /usr/lib /usr/lib32 /usr/lib64
|
| 103 |
)
|
| 104 |
|
| 105 |
LIST(APPEND CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES
|
| 106 |
+ @GENTOO_PORTAGE_EPREFIX@usr/include
|
| 107 |
/usr/include
|
| 108 |
)
|
| 109 |
LIST(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES
|
| 110 |
+ @GENTOO_PORTAGE_EPREFIX@usr/include
|
| 111 |
/usr/include
|
| 112 |
)
|
| 113 |
|