Skip to content

Commit 7959f09

Browse files
timholybarche
authored andcommitted
Add more detail about Julia paths
xref #45
1 parent b7d2111 commit 7959f09

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,22 @@ for use in other C++ projects. To build a Julia interface to a C++ library, you
88

99
## Building libcxxwrap-julia
1010

11-
The main CMake option of interest is `Julia_PREFIX`, which should point to the Julia installation prefix you want to use, i.e. the directory containing the `bin` and `lib` directories and so on. On Linux or Mac, the sequence of commands to follow is:
11+
The main CMake option of interest is `Julia_PREFIX`, which should point to the Julia installation you want to use. The `PREFIX` is a directory, one containing the `bin` and `lib` directories and so on. If you are using a binary download of Julia (https://julialang.org/downloads/), this is the top-level directory; if you build Julia from source (https://github.com/JuliaLang/julia), it would be the `usr` directory of the repository. Below we will call this directory `/home/user/path/to/julia`, but you should substitute your actual path in the commands below.
12+
13+
On Linux or Mac, the sequence of commands to follow is:
1214

1315
```bash
1416
git clone https://github.com/JuliaInterop/libcxxwrap-julia.git
1517
mkdir libcxxwrap-julia-build
1618
cd libcxxwrap-julia-build
17-
cmake -DJulia_PREFIX=/home/user/julia-1.4.0 ../libcxxwrap-julia
19+
cmake -DJulia_PREFIX=home/user/path/to/julia ../libcxxwrap-julia
1820
cmake --build . --config Release
1921
```
2022

2123
Instead of specifying the prefix, it is also possible to directly set the Julia executable, using:
2224

2325
```bash
24-
cmake -DJulia_EXECUTABLE=/home/user/julia-1.4.0/bin/julia ../libcxxwrap-julia
26+
cmake -DJulia_EXECUTABLE=/home/user/path/to/julia/bin/julia ../libcxxwrap-julia
2527
```
2628

2729
Next, you can build your own code against this by setting the `JlCxx_DIR` CMake variable to the build directory (`libcxxwrap-julia-build`) used above, or add it to the `CMAKE_PREFIX_PATH` CMake variable.
@@ -49,4 +51,4 @@ Binaries for the master version are usually available at https://github.com/barc
4951

5052
```
5153
add https://github.com/barche/libcxxwrap_julia_jll.jl.git
52-
```
54+
```

0 commit comments

Comments
 (0)