diff --git a/src/bindings/python/CMakeLists.txt b/src/bindings/python/CMakeLists.txt index c98abd754f..966dc02647 100644 --- a/src/bindings/python/CMakeLists.txt +++ b/src/bindings/python/CMakeLists.txt @@ -67,7 +67,7 @@ set_source_files_properties(${SWIG_INTERFACE_SRCS} PROPERTIES set(SETUP_PY_PACKAGE_FILES "'\${TARGET_FILE_NAME_cellml}'") list(APPEND FINALISE_PYTHON_BINDINGS_ARGUMENTS -DTARGET_FILE_NAME_cellml=$) -if (UNIX AND NOT APPLE) +if (UNIX AND NOT APPLE AND LIBCELLML_BUILD_SHARED) list(APPEND SETUP_PY_PACKAGE_FILES "'\${TARGET_SONAME_FILE_NAME_cellml}'") list(APPEND FINALISE_PYTHON_BINDINGS_ARGUMENTS -DTARGET_SONAME_FILE_NAME_cellml=$) set(_GENERATOR_EXPRESSION_LIBCELLML_SONAME $)