From d112cebb1a87aa4528b84dce583c3793c525202a Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Mon, 27 Nov 2023 21:03:37 +0800 Subject: [PATCH] Fix for cross compiling --- CMakeLists.txt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b3ac06eb2c..832f48bccd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,14 +11,18 @@ include(CTest) include(cmake/deps.cmake) include(cmake/config.cmake) add_subdirectory(src) -include(cmake/data.cmake) +if(NOT CMAKE_CROSSCOMPILING) + include(cmake/data.cmake) +endif() include(cmake/docs.cmake) include(cmake/package.cmake) include(CPack) -include(CTest) -add_subdirectory(tests) +if(NOT CMAKE_CROSSCOMPILING) + include(CTest) + add_subdirectory(tests) +endif() option(BUILD_SHARED_LIBS "Build shared libraries" OFF) @@ -33,4 +37,4 @@ message(STATUS " async: ${USE_ASYNC}") install( DIRECTORY vim/ftdetect vim/syntax DESTINATION share/vim/vimfiles -) \ No newline at end of file +)