Closed luzpaz closed 3 years ago
Best to use python:
import pivy
try:
print(pivy.__version__)
except AttributeError:
print("pivy is outdated, please update ;)")
Thanks @looooo but is even possible to use python during the CMake phase?
Sure eg. in this example: https://github.com/booya-at/parabem/blob/master/src/python/CMakeLists.txt#L1L4
But you need python as a build dependency.
:exploding_head:
had no idea that was possible!
Trying to find a way to output the version of Pivy during a CMake install.
I've ascertained that the version number is located inhttps://github.com/coin3d/pivy/blob/master/pivy/pivy_meta.py
So would I just need to compile a regex similar to how the Coin3D version is parsed in: https://github.com/FreeCAD/FreeCAD/blob/7b87cc8a74b43615711dce7b1964c6394e194f0c/cMake/FindCoin3D.cmake#L109-L118