forked from hvennekate/Molsketch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL
46 lines (42 loc) · 1.71 KB
/
INSTALL
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
Short instructions for building the source with CMake:
0. Prepare
- Unpack the source and change to the source dir
- mkdir build
- cd build
1. Using cmake:
- cmake ..
(occasionally, you may have to use
cmake -G "MinGW Makefiles" ..
instead)
- make
(using Qt5, if available, see below)
1.1 Install the binary (if desired)
- make install
1.2 Make a package (if desired)
- make package
2. Using qmake:
2.1 QMake
You may change the installation path by setting the PREFIX variable:
- qmake PREFIX=<Your install dir> ..
Or you may omit this:
- qmake ..
For Qt5, it may be necessary to use "qmake-qt5" instead of "qmake", depending on your platform.
2.2 Make
Then run
- make
The binary will be in the bin/ subdirectory, the library part in the lib/ subdirectory.
2.3 Installing
- make install
Files will be copied into "bin", "doc", "include", and "lib" directories, relative to PREFIX.
3. Notes on Qt5 vs. Qt4
If Qt5 is used, library and executable names will be appended with "-qt5" (both cmake and qmake).
With qmake, one can choose the version by picking the appropriate version of qmake.
With cmake, Qt5 is automatically selected, if available, otherwise Qt4. If you have both versions
and want to force the usage of Qt4, use
- cmake -D FORCEQt4=TRUE ..
in the cmake step above.
4. Notes on OpenBabel (esp. Windows)
If you have difficulties making qmake or cmake find openbabel, you might want to set the variables OB_LIBRARY_DIRS and OB_INCLUDE_DIRS:
cmake -DOB_LIBRARY_DIRS=<path of openbabel.dll/libopenbabel.so> -DOB_INCLUDE_DIRS=<directory containing babelconfig.h> <path to Molsketch sources>
or
qmake OB_LIBRARY_DIRS=<openbabel.dll/libopenbabel.so directory> OB_INCLUDE_DIRS=<directory containing babelconfig.h> <path to Molsketch sources>