akuukka / quickhull

C++ implementation of the 3D QuickHull algorithm
266 stars 52 forks source link

Update cmake #17

Open lego-engineer opened 2 years ago

lego-engineer commented 2 years ago

Hey, thanks for open sourcing this! Saved me some time (and skip the complexity of the qhull library).

I made some changes for my own applications to better support using the library in CMake. I also added the tests in to the CTest framework (though I didn't do any work to split them into separate tests). If building this repo alone, it will build the tests. If it is included as a submodule/subdirectory to a larger cmake project, it will skip the tests. I will probably end up adding some install/packaging targets later.

Building the library can be done by:

cmake -S . -B build
# Build the project (library and tests)
cmake --build build 
# run the tests
cd build
make test # or the usual ./tests/QuickHullTests.exe

Thanks again!