From d058cb16fd248c23c0b021da152767fcc81a9d55 Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Wed, 29 May 2019 16:59:06 -0600 Subject: [PATCH] CMake: Don't export(PACKAGE) when cross-compiling When cross-compiling, the build directory won't contain anything useful to the host system. Therefore, we shouldn't register the build directory in CMake's package registry. --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1eef5292b0..5417493e6d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -114,4 +114,6 @@ write_basic_package_version_file( install(FILES "${PROJECT_BINARY_DIR}/Panda3DConfigVersion.cmake" DESTINATION "lib/cmake/Panda3D") -export(PACKAGE Panda3D) +if(NOT CMAKE_CROSSCOMPILING) + export(PACKAGE Panda3D) +endif()