27 lines
1.2 KiB
Diff
27 lines
1.2 KiB
Diff
From 5445921d0c3827758f3ad7946b9aa7b37d6d7d19 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?=C3=89rico=20Nogueira=20Rolim?=
|
|
<34201958+ericonr@users.noreply.github.com>
|
|
Date: Thu, 11 Feb 2021 18:19:20 -0300
|
|
Subject: [PATCH] cmake/Version: fix cross compilation.
|
|
|
|
It's a CMake weirdness, sometimes it can't find files when cross compiling unless that option is added.
|
|
---
|
|
cmake/Version.cmake | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/cmake/Version.cmake b/cmake/Version.cmake
|
|
index fd0487d..8cbf3c0 100644
|
|
--- cmake/Version.cmake
|
|
+++ cmake/Version.cmake
|
|
@@ -1,8 +1,8 @@
|
|
cmake_minimum_required(VERSION 2.8)
|
|
find_program(GIT_EXECUTABLE git DOC "Git version control")
|
|
mark_as_advanced(GIT_EXECUTABLE)
|
|
-find_file(GITDIR NAMES .git PATHS ${CMAKE_CURRENT_SOURCE_DIR} NO_DEFAULT_PATH)
|
|
-find_file(VERSION_FILE NAMES version.py PATHS ${CMAKE_CURRENT_SOURCE_DIR} NO_DEFAULT_PATH)
|
|
+find_file(GITDIR NAMES .git PATHS ${CMAKE_CURRENT_SOURCE_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
|
|
+find_file(VERSION_FILE NAMES version.py PATHS ${CMAKE_CURRENT_SOURCE_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
|
|
if (NOT VERSION_FILE)
|
|
message(SEND_ERROR "Missing version file \"version.py\"")
|
|
endif()
|