This section replaces the legacy package install flow with the repository's current source-based workflow.
- CMake 3.21+
- Conan 2.x
- C++ toolchain for your platform
- Python 3
- SWIG 4.x
conan profile detect --forcemacOS example:
conan install . -of build/macos-release -s build_type=Release -o '&:with_uno=False' -o '&:with_python=True' -o '&:with_imagemagick=False' --build=missingLinux example:
conan install . -of build/linux-release -s build_type=Release -o '&:with_uno=False' -o '&:with_python=True' -o '&:with_imagemagick=False' --build=missingWindows example:
conan install . -of build/win-vs2022 -s build_type=Release -s compiler="msvc" -s compiler.version=193 -s arch=x86_64 -o '&:with_uno=False' -o '&:with_python=True' -o '&:with_imagemagick=False' --build=missingmacOS example:
cmake -S . -B build/macos-release \
-DCMAKE_TOOLCHAIN_FILE=build/macos-release/build/Release/generators/conan_toolchain.cmake \
-DCMAKE_BUILD_TYPE=Release \
-DDOCXFACTORY_BUILD_PYTHON=ONcmake --build build/macos-release --config Release -jExpected files:
build/<cfg>/docxfactory.pybuild/<cfg>/python/_docxfactory.so(or platform equivalent extension)
import sys
sys.path.insert(0, "build/macos-release")
sys.path.insert(0, "build/macos-release/python")
import docxfactory
print("DocxFactory import OK")If you delete build/<cfg>, run conan install again before running CMake. The Conan toolchain and dependency config files are generated into the build folder.