Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,11 @@ option(OSD_PATCH_SHADER_SOURCE_MSL "MSL Patch Shader Source" OFF)
option(OPENSUBDIV_GREGORY_EVAL_TRUE_DERIVATIVES "Enable true derivative evaluation for Gregory basis patches" OFF)

option(BUILD_SHARED_LIBS "Build shared libraries" ON)
option(BUILD_STATIC_LIBS "Build static libraries" ON)

if (NOT BUILD_SHARED_LIBS AND NOT BUILD_STATIC_LIBS)
message(FATAL_ERROR "Must enable BUILD_SHARED_LIBS or BUILD_STATIC_LIBS.")
endif()

# Save the current value of BUILD_SHARED_LIBS and restore it after
# processing Find* modules, since some of the Find* modules invoked
Expand Down
3 changes: 3 additions & 0 deletions opensubdiv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ if (NOT NO_LIB)

#---------------------------------------------------------------------------

if (BUILD_STATIC_LIBS)

# Build static libs ------------------------------------
add_library(osd_static_cpu
STATIC
Expand Down Expand Up @@ -178,6 +180,7 @@ if (NOT NO_LIB)
install( TARGETS osd_static_gpu EXPORT opensubdiv-targets DESTINATION "${CMAKE_LIBDIR_BASE}" )
endif()

endif() # Build static libs

# Build dynamic libs ----------------------------------
if (BUILD_SHARED_LIBS AND NOT WIN32 AND NOT IOS)
Expand Down
Loading