AcademySoftwareFoundation / openvdb

OpenVDB - Sparse volume data structure and tools
http://www.openvdb.org/
Apache License 2.0
2.71k stars 660 forks source link

[BUG] FindOpenVDB modifies BUILD_SHARED_LIBS option #1623

Closed mshabunin closed 1 year ago

mshabunin commented 1 year ago

Environment

Operating System: Alpine Linux Version / Commit SHA: 10.0.1 Other: GCC

Describe the bug

FindOpenVDB.cmake provided by this package modifies BUILD_SHARED_LIBS cmake variable thus breaking user's build.

To Reproduce

Steps to reproduce the behavior:

  1. Install VTK library with OpenVDB support (probably from Alpine packages repository)
  2. Build OpenCV (which depends on VTK which depends on OpenVDB) with BUILD_SHARED_LIBS=OFF option

Result: dynamic libraries (.so) produced as a result

Expected behavior

Static libraries (.a) are produced as a result of the build

Additional context