Skip to content
Merged
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
16 changes: 15 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,21 @@ set (LIBSBML_FIND_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/FindLIBSBML.
#

# Build static / shared library
# option(BUILD_SHARED_LIBS "Build shared library. (Set to OFF to build static libraries.)" OFF)
#
# Here we check whether the user has defined BUILD_SHARED_LIBS. If it is
# defined we will honor the value, otherwise we continue to use the
# LIBSBML_SKIP variables to determine whether to build shared or static
# libraries.

if(DEFINED BUILD_SHARED_LIBS)
if (BUILD_SHARED_LIBS)
set(LIBSBML_SKIP_SHARED_LIBRARY OFF)
set(LIBSBML_SKIP_STATIC_LIBRARY ON)
else()
set(LIBSBML_SKIP_SHARED_LIBRARY ON)
set(LIBSBML_SKIP_STATIC_LIBRARY OFF)
endif()
endif()

# Whether to compile examples
option(WITH_EXAMPLES "Compile the libSBML example programs." OFF)
Expand Down