mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
37 lines
1.1 KiB
Diff
37 lines
1.1 KiB
Diff
|
diff --git a/cmake/FindJulia.cmake b/cmake/FindJulia.cmake
|
||
|
index 77c9f7f8..2d4e1f6a 100644
|
||
|
--- a/cmake/FindJulia.cmake
|
||
|
+++ b/cmake/FindJulia.cmake
|
||
|
@@ -1,7 +1,7 @@
|
||
|
if(JULIA_FOUND)
|
||
|
return()
|
||
|
endif()
|
||
|
-
|
||
|
+
|
||
|
# Find julia executable
|
||
|
find_program(JULIA_EXECUTABLE julia DOC "Julia executable")
|
||
|
|
||
|
@@ -31,8 +31,14 @@ endif()
|
||
|
#
|
||
|
# Julia includes
|
||
|
#
|
||
|
+if(${JULIA_VERSION_STRING} VERSION_LESS 0.7.0)
|
||
|
+ set(JULIA_BINDIR "JULIA_HOME")
|
||
|
+else()
|
||
|
+ set(JULIA_BINDIR "Sys.BINDIR")
|
||
|
+endif()
|
||
|
+
|
||
|
execute_process(
|
||
|
- COMMAND ${JULIA_EXECUTABLE} -E "joinpath(match(r\"(.*)(bin)\",JULIA_HOME).captures[1],\"include\",\"julia\")"
|
||
|
+ COMMAND ${JULIA_EXECUTABLE} -E "joinpath(match(r\"(.*)(bin)\",${JULIA_BINDIR}).captures[1],\"include\",\"julia\")"
|
||
|
OUTPUT_VARIABLE JULIA_INCLUDE_DIRS
|
||
|
# COMMAND ${JULIA_EXECUTABLE} -E "abspath(joinpath(JULIA_HOME, \"../..\", \"src\"))"
|
||
|
# OUTPUT_VARIABLE JULIA_INCLUDE_DIRS
|
||
|
@@ -80,4 +86,4 @@ find_package_handle_standard_args(
|
||
|
REQUIRED_VARS JULIA_LIBRARY JULIA_LIBRARY_DIR JULIA_INCLUDE_DIRS
|
||
|
VERSION_VAR JULIA_VERSION_STRING
|
||
|
FAIL_MESSAGE "Julia not found"
|
||
|
-)
|
||
|
\ No newline at end of file
|
||
|
+)
|