https://github.com/yuki-koyama/easy-qhull
A helper repository to use qhull in cmake-based c++ projects
https://github.com/yuki-koyama/easy-qhull
cmake cpp helper qhull
Last synced: 3 months ago
JSON representation
A helper repository to use qhull in cmake-based c++ projects
- Host: GitHub
- URL: https://github.com/yuki-koyama/easy-qhull
- Owner: yuki-koyama
- License: mit
- Created: 2019-03-18T11:11:15.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-03-19T10:26:15.000Z (about 6 years ago)
- Last Synced: 2025-01-17T13:27:35.554Z (5 months ago)
- Topics: cmake, cpp, helper, qhull
- Language: CMake
- Size: 2.93 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# easy-qhull
A helper repository to use Qhull in CMake-based C++ projects
## Goal
This repository has been created to make it as easy as possible to use [Qhull](https://github.com/yuki-koyama/easy-qhull) functionality in CMake-based C++ projects.
The specific goal is to allow users to use it simply by `git submodule add ...` and `add_subdirectory(...)`.
## Details
This repository currently uses Qhull 7.3.0.
The `CMakeLists.txt` in this repository defines a target for building Qhull, named `qhull`.
Specifically, `qhull` builds a static library that combines together the two libraries in the original Qhull repository, `libqhullstatic_r` and `libqhullcpp`.
## Example
Suppose that you have a C++ project that looks like
```
$ ls -a
.git
CMakeLists.txt
main.cpp
```To use `Qhull`, add `easy-qhull` as a git submodule:
```
$ git submodule add https://github.com/yuki-koyama/easy-qhull.git ./external/easy-qhull
$ git submodule update --init --recursive
```Then, edit `CMakeLists.txt`:
```cmake
...
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/external/easy-qhull)
...
add_executable(my-program ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp)
target_link_libraries(my-program qhull)
...
```Now you can use `Qhull` functionality in `main.cpp`:
```cpp
#includeint main()
{
orgQhull::Qhull qhull;
qhull.run(...);
...
return 0;
}
```Finally, this project can be built by a typical CMake cycle, for example,
```
$ cmake . && make
```## Original Motivation
(TODO)
## Limitations
(TODO)
## Future Work
- Add utility functions to further wrap the Qhull functionality