diff options
author | Marius Bakke <mbakke@fastmail.com> | 2017-08-26 15:15:49 +0200 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2017-08-26 15:15:49 +0200 |
commit | 72e2815d18ad688b0a16ce3b3efba1172423cec4 (patch) | |
tree | b3d6aa01aec86a7f224e15d97a40b64de4e5cdb8 /guix/build/cmake-build-system.scm | |
parent | c20cd0d24d9b5e8a47b864db9799e0992ffd44b9 (diff) | |
parent | 2f837cf7fe100b0584fb02cf8f19d4cfb4e14d88 (diff) | |
download | guix-patches-72e2815d18ad688b0a16ce3b3efba1172423cec4.tar guix-patches-72e2815d18ad688b0a16ce3b3efba1172423cec4.tar.gz |
Merge branch 'core-updates'
Diffstat (limited to 'guix/build/cmake-build-system.scm')
-rw-r--r-- | guix/build/cmake-build-system.scm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/guix/build/cmake-build-system.scm b/guix/build/cmake-build-system.scm index 27f2b5c872..128ab28fe5 100644 --- a/guix/build/cmake-build-system.scm +++ b/guix/build/cmake-build-system.scm @@ -32,7 +32,7 @@ ;; Code: (define* (configure #:key outputs (configure-flags '()) (out-of-source? #t) - build-type + build-type target #:allow-other-keys) "Configure the given package." (let* ((out (assoc-ref outputs "out")) @@ -59,6 +59,15 @@ ,(string-append "-DCMAKE_INSTALL_RPATH=" out "/lib") ;; enable verbose output from builds "-DCMAKE_VERBOSE_MAKEFILE=ON" + + ;; Cross-build + ,@(if target + (list (string-append "-DCMAKE_C_COMPILER=" + target "-gcc") + (if (string-contains target "mingw") + "-DCMAKE_SYSTEM_NAME=Windows" + "-DCMAKE_SYSTEM_NAME=Linux")) + '()) ,@configure-flags))) (format #t "running 'cmake' with arguments ~s~%" args) (zero? (apply system* "cmake" args))))) |