Commit f3a10191 authored by Brad King's avatar Brad King Committed by Kitware Robot
Browse files

Merge topic 'UseSWIG-fix12184'

74f5545d UseSWIG: set .bundle ext on OSX and no prefix (#12184)
parents 406635fd 74f5545d
......@@ -213,8 +213,7 @@ macro(SWIG_ADD_MODULE name language)
# Linux :
set_target_properties (${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES SUFFIX ".jnilib")
endif ()
endif ()
if ("${swig_lowercase_language}" STREQUAL "python")
elseif ("${swig_lowercase_language}" STREQUAL "python")
# this is only needed for the python case where a is generated
set_target_properties(${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES PREFIX "")
# Python extension modules on Windows must have the extension ".pyd"
......@@ -228,6 +227,17 @@ macro(SWIG_ADD_MODULE name language)
set_target_properties(${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES SUFFIX ".pyd")
elseif ("${swig_lowercase_language}" STREQUAL "ruby")
# In ruby you want:
# require 'LIBRARY'
# then ruby will look for a library whose name is platform dependent, namely
# MacOS : LIBRARY.bundle
# Windows: LIBRARY.dll
# Linux :
set_target_properties (${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES PREFIX "")
if (APPLE)
set_target_properties (${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES SUFFIX ".bundle")
endif ()
endif ()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment