ACRMGroup / bioplib

The bioplib library
http://www.bioinf.org.uk/software/bioplib/
Other
12 stars 8 forks source link

cmake build #17

Open gf712 opened 6 years ago

gf712 commented 6 years ago

I wrote CMakeList.txt files that use cmake to generate Makefiles. This makes it easier for any user to write to install and has the same behaviour as the current Makefiles. The main advantage is that it looks for dependencies and adds the corresponding libraries.

So to build bioplib, it would be something like this:

mkdir build
cd build/
cmake .. <- this generates the makefiles, and any path variable can be set here, like Makefiles just add -DVariableName, i.e. -DDEST='path/to/folder/' to set install directory
make
make install
make test <- run tests directly from project build directory

Note that all other original make recipies are included in the CMakeList.txt, e.g. make shared. The root CMakeList.txt file also calls another CMakeList.txt file in the test/ directory which builds the test files. (I also moved the test directory to the project directory to make it easier to find..)

I hope this is helpful, as I found it really convenient to install bioplib this way on my machine and I am working on something similar with bioptools!