| 1 |
From 65571942d4f19d508174f6f89aeaac5ffe380a6e Mon Sep 17 00:00:00 2001
|
| 2 |
From: Michael Palimaka <kensington@gentoo.org>
|
| 3 |
Date: Tue, 6 Nov 2012 23:35:34 +1100
|
| 4 |
Subject: [PATCH] Set some proper paths to make cmake find our tools.
|
| 5 |
|
| 6 |
The ebuild now adds an extra / at the end of $EPREFIX so that it is
|
| 7 |
never the empty string (so that CMAKE_SYSTEM_PREFIX_PATH remains
|
| 8 |
correct)
|
| 9 |
|
| 10 |
Original patch by Heiko Przybyl.
|
| 11 |
Updated by Chris Reffett (cmake-2.8.8)
|
| 12 |
Updated by Johannes Huber (cmake-2.8.9)
|
| 13 |
Updated by Michael Palimaka (cmake-2.8.10)
|
| 14 |
---
|
| 15 |
Modules/Platform/Darwin.cmake | 12 +++++++----
|
| 16 |
Modules/Platform/UnixPaths.cmake | 43 ++++++++++++++++++++--------------------
|
| 17 |
2 files changed, 29 insertions(+), 26 deletions(-)
|
| 18 |
|
| 19 |
diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake
|
| 20 |
index a401762..775e547 100644
|
| 21 |
--- a/Modules/Platform/Darwin.cmake
|
| 22 |
+++ b/Modules/Platform/Darwin.cmake
|
| 23 |
@@ -251,24 +251,28 @@ set(CMAKE_CXX_CREATE_MACOSX_FRAMEWORK
|
| 24 |
"<CMAKE_CXX_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <LINK_FLAGS> -o <TARGET> <SONAME_FLAG> <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
|
| 25 |
|
| 26 |
|
| 27 |
-# default to searching for frameworks first
|
| 28 |
+# default to searching for frameworks last
|
| 29 |
if(NOT DEFINED CMAKE_FIND_FRAMEWORK)
|
| 30 |
- set(CMAKE_FIND_FRAMEWORK FIRST)
|
| 31 |
+ set(CMAKE_FIND_FRAMEWORK LAST)
|
| 32 |
endif()
|
| 33 |
# set up the default search directories for frameworks
|
| 34 |
set(CMAKE_SYSTEM_FRAMEWORK_PATH
|
| 35 |
+ @GENTOO_PORTAGE_EPREFIX@Frameworks
|
| 36 |
+ @GENTOO_PORTAGE_EPREFIX@usr/lib
|
| 37 |
~/Library/Frameworks
|
| 38 |
/Library/Frameworks
|
| 39 |
/Network/Library/Frameworks
|
| 40 |
/System/Library/Frameworks)
|
| 41 |
|
| 42 |
-# default to searching for application bundles first
|
| 43 |
+# default to searching for application bundles last
|
| 44 |
if(NOT DEFINED CMAKE_FIND_APPBUNDLE)
|
| 45 |
- set(CMAKE_FIND_APPBUNDLE FIRST)
|
| 46 |
+ set(CMAKE_FIND_APPBUNDLE LAST)
|
| 47 |
endif()
|
| 48 |
# set up the default search directories for application bundles
|
| 49 |
set(_apps_paths)
|
| 50 |
foreach(_path
|
| 51 |
+ @GENTOO_PORTAGE_EPREFIX@Applications
|
| 52 |
+ @GENTOO_PORTAGE_EPREFIX@usr/bin
|
| 53 |
"~/Applications"
|
| 54 |
"/Applications"
|
| 55 |
"${OSX_DEVELOPER_ROOT}/../Applications" # Xcode 4.3+
|
| 56 |
diff --git a/Modules/Platform/UnixPaths.cmake b/Modules/Platform/UnixPaths.cmake
|
| 57 |
index ccb2663..0501d53 100644
|
| 58 |
--- a/Modules/Platform/UnixPaths.cmake
|
| 59 |
+++ b/Modules/Platform/UnixPaths.cmake
|
| 60 |
@@ -33,6 +33,7 @@ get_filename_component(_CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" PATH)
|
| 61 |
# search types.
|
| 62 |
list(APPEND CMAKE_SYSTEM_PREFIX_PATH
|
| 63 |
# Standard
|
| 64 |
+ @GENTOO_PORTAGE_EPREFIX@usr/local @GENTOO_PORTAGE_EPREFIX@usr @GENTOO_PORTAGE_EPREFIX@
|
| 65 |
/usr/local /usr /
|
| 66 |
|
| 67 |
# CMake install location
|
| 68 |
@@ -44,43 +45,41 @@ list(APPEND CMAKE_SYSTEM_PREFIX_PATH
|
| 69 |
|
| 70 |
# List common include file locations not under the common prefixes.
|
| 71 |
list(APPEND CMAKE_SYSTEM_INCLUDE_PATH
|
| 72 |
- # Windows API on Cygwin
|
| 73 |
- /usr/include/w32api
|
| 74 |
-
|
| 75 |
- # X11
|
| 76 |
- /usr/X11R6/include /usr/include/X11
|
| 77 |
-
|
| 78 |
- # Other
|
| 79 |
- /usr/pkg/include
|
| 80 |
- /opt/csw/include /opt/include
|
| 81 |
- /usr/openwin/include
|
| 82 |
+ @GENTOO_PORTAGE_EPREFIX@usr/include
|
| 83 |
)
|
| 84 |
|
| 85 |
list(APPEND CMAKE_SYSTEM_LIBRARY_PATH
|
| 86 |
- # Windows API on Cygwin
|
| 87 |
- /usr/lib/w32api
|
| 88 |
-
|
| 89 |
- # X11
|
| 90 |
- /usr/X11R6/lib /usr/lib/X11
|
| 91 |
-
|
| 92 |
- # Other
|
| 93 |
- /usr/pkg/lib
|
| 94 |
- /opt/csw/lib /opt/lib
|
| 95 |
- /usr/openwin/lib
|
| 96 |
+ @GENTOO_PORTAGE_GCCLIBDIR@/gcc
|
| 97 |
+ @GENTOO_PORTAGE_GCCLIBDIR@
|
| 98 |
+ @GENTOO_PORTAGE_EPREFIX@usr/lib64
|
| 99 |
+ @GENTOO_PORTAGE_EPREFIX@usr/libx32
|
| 100 |
+ @GENTOO_PORTAGE_EPREFIX@usr/lib32
|
| 101 |
+ @GENTOO_PORTAGE_EPREFIX@usr/lib
|
| 102 |
+ @GENTOO_PORTAGE_EPREFIX@lib
|
| 103 |
)
|
| 104 |
|
| 105 |
list(APPEND CMAKE_SYSTEM_PROGRAM_PATH
|
| 106 |
- /usr/pkg/bin
|
| 107 |
+ @GENTOO_PORTAGE_EPREFIX@usr/bin
|
| 108 |
+ @GENTOO_PORTAGE_EPREFIX@bin
|
| 109 |
)
|
| 110 |
|
| 111 |
list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
|
| 112 |
- /lib /usr/lib /usr/lib32 /usr/lib64
|
| 113 |
+ @GENTOO_PORTAGE_GCCLIBDIR@/gcc
|
| 114 |
+ @GENTOO_PORTAGE_GCCLIBDIR@
|
| 115 |
+ @GENTOO_PORTAGE_EPREFIX@usr/lib64
|
| 116 |
+ @GENTOO_PORTAGE_EPREFIX@usr/libx32
|
| 117 |
+ @GENTOO_PORTAGE_EPREFIX@usr/lib32
|
| 118 |
+ @GENTOO_PORTAGE_EPREFIX@usr/lib
|
| 119 |
+ @GENTOO_PORTAGE_EPREFIX@lib
|
| 120 |
+ /lib /usr/lib /usr/lib32 /usr/lib64 /usr/libx32
|
| 121 |
)
|
| 122 |
|
| 123 |
list(APPEND CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES
|
| 124 |
+ @GENTOO_PORTAGE_EPREFIX@usr/include
|
| 125 |
/usr/include
|
| 126 |
)
|
| 127 |
list(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES
|
| 128 |
+ @GENTOO_PORTAGE_EPREFIX@usr/include
|
| 129 |
/usr/include
|
| 130 |
)
|
| 131 |
|
| 132 |
--
|
| 133 |
1.8.0
|
| 134 |
|