File: install.md

package info (click to toggle)
spglib 2.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 14,180 kB
  • sloc: ansic: 125,066; python: 7,717; cpp: 2,197; f90: 2,143; ruby: 792; makefile: 22; sh: 18
file content (64 lines) | stat: -rw-r--r-- 1,261 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# How to install spglib C-API

## Download

The source code is downloaded at <https://github.com/spglib/spglib/releases> or you can
git-clone the spglib repository by

```
% git clone https://github.com/spglib/spglib.git
```

## Install

### Unix-like

After expanding source code, go into the source code directory:

```
% tar xvfz spglib-2.0.0.tar.gz
% cd spglib-2.0.0
```

Build and install in `_build` directory by

```bash
% mkdir _build
% cd _build
% cmake ..
% cmake --build .
% cmake --install (probably installed under /usr/local)
```

Or to install under the parent directory,

```bash
% mkdir _build
% cd _build
% cmake -DCMAKE_INSTALL_PREFIX=.. ..
% cmake --build .
% cmake --install . --prefix ..
```

### Windows & Cygwin

For windows, cmake behaves slightly differently and the following
way is recommended

```bash
% cmake -DCMAKE_INSTALL_PREFIX="$(shell cygpath -w "${BUILD_DIR}")" ..
% cmake --build . --config Release
% cmake --install . --config Release
```

The detail of the windows installation process is discussed in {issue}`118`.

## Usage

1. Include `spglib.h`
2. Link `libsymspg.a` or `libsymspg.so`
3. A compilation example is shown in {path}`example/README.md`.

## Example

A few examples are found in {path}`example` directory.