Problem
When building with BUILD_SHARED_LIBS=OFF, the install(EXPORT libdigidocppExport ...) at src/CMakeLists.txt:256 fails because the export set includes digidocpp but not its private link dependencies (minizip, digidocpp_priv/digidocpp_tsl). CMake requires all linked targets to be in the export set for static libraries.
Error:
CMake Error: install(EXPORT "libdigidocppExport" ...) includes target "digidocpp"
which requires target "minizip" that is not in any export set.
Suggested fix
Either:
- Add the private targets (
minizip, digidocpp_priv) to the export set, or
- Guard the export install with a static build check:
if(BUILD_SHARED_LIBS AND NOT ANDROID)
install(EXPORT libdigidocppExport ...)
endif()
Current workaround
Setting ANDROID=TRUE before add_subdirectory() skips the export install via the existing if(NOT ANDROID) guard at line 264, but this is a misuse of that flag.
Context
Found while building Python bindings with BUILD_SHARED_LIBS=OFF for self-contained wheel packaging. Affects v4.3.0 and current main.
Problem
When building with
BUILD_SHARED_LIBS=OFF, theinstall(EXPORT libdigidocppExport ...)atsrc/CMakeLists.txt:256fails because the export set includesdigidocppbut not its private link dependencies (minizip,digidocpp_priv/digidocpp_tsl). CMake requires all linked targets to be in the export set for static libraries.Error:
Suggested fix
Either:
minizip,digidocpp_priv) to the export set, orCurrent workaround
Setting
ANDROID=TRUEbeforeadd_subdirectory()skips the export install via the existingif(NOT ANDROID)guard at line 264, but this is a misuse of that flag.Context
Found while building Python bindings with
BUILD_SHARED_LIBS=OFFfor self-contained wheel packaging. Affects v4.3.0 and current main.