NanoMichael / MicroTeX

A dynamic, cross-platform, and embeddable LaTeX rendering library
MIT License
399 stars 66 forks source link

Can't build static libraries #171

Open afalkenhahn opened 2 months ago

afalkenhahn commented 2 months ago

I'm trying to build MicroTeX as static libraries on Ubuntu like this:

cmake -DCAIRO=ON -DBUILD_STATIC=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON ..
make

This correctly builds libmicrotex.a but for some reason it fails to build libmicrotex-cairo.a. It seems to try to build libmicrotex-cairo as a shared object instead (which fails)

[ 97%] Built target microtex
[ 98%] Linking CXX shared library libmicrotex-cairo.so
CMake Error: failed to create symbolic link 'libmicrotex-cairo.so.1': operation not supported on socket
CMake Error: cmake_symlink_library: System Error: Operation not supported
CMake Error: failed to create symbolic link 'libmicrotex-cairo.so': operation not supported on socket
CMake Error: cmake_symlink_library: System Error: Operation not supported

Any idea how I can build libmicrotex-cairo as a static library?

kpeeters commented 1 month ago

There are a few lines missing in the CMakeLists.txt for cairo; see https://github.com/kpeeters/MicroTeX/commit/d68cf3534416ee9985c6dbfb88a9c4e427ea254d .