cmake: Make it possible to load cmake files from develop/lib instead of just lib.

This works, but it is not so useful yet, because CMake tries to look
for binaries in "../bin" relative to the lib dir, so any CMake script
that imports targets without specifying their exact path (as LLVM does)
will not work yet.
This commit is contained in:
Augustin Cavalier
2020-02-21 17:51:46 -05:00
parent 9e99e0eae7
commit 8b128b5c81
2 changed files with 27 additions and 1 deletions

View File

@@ -7,7 +7,7 @@ of your choice."
HOMEPAGE="https://cmake.org/"
COPYRIGHT="2002-2019 Kitware, Inc., Insight Consortium"
LICENSE="CMake"
REVISION="1"
REVISION="2"
SOURCE_URI="https://cmake.org/files/v3.16/cmake-$portVersion.tar.gz"
CHECKSUM_SHA256="6da56556c63cab6e9a3e1656e8763ed4a841ac9859fefb63cbe79472e67e8c5f"
SOURCE_DIR="cmake-$portVersion"

View File

@@ -157,3 +157,29 @@ index 7e0af61..4129c00 100644
--
2.24.0
From eb38d3c7ff8edae11ba59ecfd3dcbe98b8a403d3 Mon Sep 17 00:00:00 2001
From: Augustin Cavalier <waddlesplash@gmail.com>
Date: Fri, 21 Feb 2020 15:38:39 -0500
Subject: [PATCH] Modules/Haiku: Set CMAKE_SYSTEM_FRAMEWORK_PATH.
---
Modules/Platform/Haiku.cmake | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Modules/Platform/Haiku.cmake b/Modules/Platform/Haiku.cmake
index 4129c00..9523a92 100644
--- a/Modules/Platform/Haiku.cmake
+++ b/Modules/Platform/Haiku.cmake
@@ -129,6 +129,9 @@ LIST(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
LIST(APPEND CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_HAIKU_DEVELOP_LIB_DIRECTORIES})
+# This is needed for find_package to search develop/lib/cmake/.
+list(APPEND CMAKE_SYSTEM_FRAMEWORK_PATH /boot/system/develop /boot/system/non-packaged/develop)
+
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "/boot/system" CACHE PATH
"Install path prefix, prepended onto install directories." FORCE)
--
2.24.1