Skip to content

Commit

Permalink
Set shared library build if supporting Python
Browse files Browse the repository at this point in the history
  • Loading branch information
taylor-a-barnes committed Jan 7, 2025
1 parent a1e0a80 commit 7af9912
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions MDI_Library/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ endif()
if ( libtype STREQUAL "SHARED" )
set(BUILD_SHARED_LIBS ON)
endif()
if ( (NOT BUILD_SHARED_LIBS) AND MDI_Python )
message( WARNING "Python support requires that the MDI Library be compiled as a shared library. Turning on shared library build. To disable this warning, set -DBUILD_SHARED_LIBS=ON or -DMDI_Python=OFF." )
set(BUILD_SHARED_LIBS ON)
endif()
if (BUILD_SHARED_LIBS)
set(mdi_STATIC_BUILD OFF)
else()
Expand Down

0 comments on commit 7af9912

Please sign in to comment.