Installation
trueform is a C++17 header-only library with Python bindings and VTK integration. It depends on oneTBB.
From pip
The pip package includes C++ headers with cmake and conan integration modules:
pip install trueform
Choose your build system below.
Conan
Add trueform to your local Conan cache. Conan handles TBB automatically.
python -m trueform.conan create
Then use it in your project's conanfile.txt:
[requires]
trueform/[>=0.1.0]
Or in conanfile.py:
def requirements(self):
self.requires("trueform/[>=0.1.0]")
Build with Conan:
conan install . --build=missing
cmake --preset conan-release
cmake --build --preset conan-release
- Defaults to
--build=missingif no--buildoption is provided python -m trueform.conan create [options]— pass additional arguments toconan createpython -m trueform.conan --path— print conanfile directory for manual use
CMake
Requires TBB installed separately.
brew install tbb
sudo apt-get install libtbb-dev
vcpkg install tbb
Use the header-only library as a CMake package:
cmake_minimum_required(VERSION 3.16)
project(my_app LANGUAGES CXX)
find_package(trueform REQUIRED CONFIG)
add_executable(my_app main.cpp)
target_link_libraries(my_app PRIVATE tf::trueform)
Configure your build so CMake can find the package:
cmake -B build -Dtrueform_ROOT=$(python -m trueform.cmake)
cmake --build build
python -m trueform.cmake— CMake config directorypython -m trueform.cmake --include_dir— C++ headers path
cmake -B build -DTBB_ROOT=/path/to/tbb
NuGet (Windows / Visual Studio)
For Visual Studio projects using MSBuild. TBB is included automatically as a dependency.
Install-Package polydera.trueform
dotnet add package polydera.trueform
The package provides C++ headers and a .targets file that configures include paths and C++17 automatically. The inteltbb.devel.win dependency is pulled in with headers and import libraries.
Manual Installation
For users who prefer not to use pip.
Conan
Create the package from the recipe in the repository:
git clone https://github.com/polydera/trueform.git
conan create trueform/conan/trueform --build=missing
Then use in your project as shown above.
-s compiler.cppstd=17.CMake
Requires TBB installed separately — see CMake section above for installation instructions.
FetchContent
Download trueform at configure time.
cmake_minimum_required(VERSION 3.16)
project(my_app LANGUAGES CXX)
include(FetchContent)
FetchContent_Declare(
trueform
GIT_REPOSITORY https://github.com/polydera/trueform.git
GIT_TAG main
)
FetchContent_MakeAvailable(trueform)
add_executable(my_app main.cpp)
target_link_libraries(my_app PRIVATE tf::trueform)
cmake -B build
cmake --build build
GIT_TAG.System Install
Clone and install trueform system-wide.
git clone https://github.com/polydera/trueform.git
cd trueform
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release
cmake --install build --config Release
Then use find_package in your project:
cmake_minimum_required(VERSION 3.16)
project(my_app LANGUAGES CXX)
find_package(trueform REQUIRED CONFIG)
add_executable(my_app main.cpp)
target_link_libraries(my_app PRIVATE tf::trueform)
cmake -B build
cmake --build build
cmake --install build --prefix ~/mylibs
cmake -B build -DCMAKE_PREFIX_PATH=~/mylibs
Verify Installation
#include <trueform/trueform.hpp>
#include <iostream>
int main() {
auto pt = tf::make_point(1.0, 2.0, 3.0);
std::cout << "trueform is working!" << std::endl;
return 0;
}
VTK Integration
For VTK integration (tf::vtk), see the VTK documentation for build and installation instructions.
