I tried to build libCellML as a static library and without Python bindings, i.e. using something like:
mkdir build
cd build
cmake -G Ninja .. -DBINDINGS_PYTHON=OFF -DBUILD_SHARED=OFF
However, when I then try to build libCellML, I am getting several CMake errors that read:
CMake Error at src/bindings/python/CMakeLists.txt:170 (add_custom_command):
Error evaluating generator expression:
$<TARGET_SONAME_FILE_NAME:cellml>
TARGET_SONAME_FILE is allowed only for SHARED libraries.
On further investigation, I noticed that it's because we test for Python_Development_FOUND rather than PYTHON_BINDINGS_AVAILABLEhere. On my machine (Ubuntu 20.04 LTS), Python_Development_FOUND is equal to FALSE while Python_Development.Module_FOUND is equal to TRUE hence PYTHON_BINDINGS_AVAILABLE ends up being equal to TRUE.
I tried to build libCellML as a static library and without Python bindings, i.e. using something like:
However, when I then try to build libCellML, I am getting several CMake errors that read:
On further investigation, I noticed that it's because we test for
Python_Development_FOUND
rather thanPYTHON_BINDINGS_AVAILABLE
here. On my machine (Ubuntu 20.04 LTS),Python_Development_FOUND
is equal toFALSE
whilePython_Development.Module_FOUND
is equal toTRUE
hencePYTHON_BINDINGS_AVAILABLE
ends up being equal toTRUE
.