From 536c143997fa146dc77d6e8defc24032452e5a4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sun, 2 Nov 2014 23:54:28 +0100 Subject: [PATCH] gnu: cmake: Add search paths for CMAKE_{INCLUDE,LIBRARY,MODULE}_PATH. * gnu/packages/cmake.scm (cmake)[native-search-paths]: New field. * guix/build/cmake-build-system.scm (configure): Remove 'setenv' calls for "CMAKE_LIBRARY_PATH" and "CMAKE_INCLUDE_PATH". --- gnu/packages/cmake.scm | 19 +++++++++++++++++++ guix/build/cmake-build-system.scm | 2 -- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm index 63805ef..e0349be 100644 --- a/gnu/packages/cmake.scm +++ b/gnu/packages/cmake.scm @@ -100,6 +100,25 @@ ("expat" ,expat) ("bzip2" ,bzip2) ("libarchive" ,libarchive))) + + (native-search-paths + (list + ;; Search path used by the 'FIND_XXX' functions. + (search-path-specification + (variable "CMAKE_PROGRAM_PATH") + (directories '("bin"))) + (search-path-specification + (variable "CMAKE_INCLUDE_PATH") + (directories '("include"))) + (search-path-specification + (variable "CMAKE_LIBRARY_PATH") + (directories '("lib" "lib64"))) + + ;; Search path used by 'FIND_PACKAGE' and 'INCLUDE'. + (search-path-specification + (variable "CMAKE_MODULE_PATH") + (directories '("lib/cmake"))))) + (home-page "http://www.cmake.org/") (synopsis "Cross-platform build system") (description diff --git a/guix/build/cmake-build-system.scm b/guix/build/cmake-build-system.scm index b1598dd..766797e 100644 --- a/guix/build/cmake-build-system.scm +++ b/guix/build/cmake-build-system.scm @@ -60,8 +60,6 @@ ;; add (other) libraries of the project itself to rpath ,(string-append "-DCMAKE_INSTALL_RPATH=" out "/lib") ,@configure-flags))) - (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH")) - (setenv "CMAKE_INCLUDE_PATH" (getenv "CPATH")) (format #t "running 'cmake' with arguments ~s~%" args) (zero? (apply system* "cmake" args))))) -- 2.1.2