diff options
Diffstat (limited to 'Modules/UseSWIG.cmake')
-rw-r--r-- | Modules/UseSWIG.cmake | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake index 4ae6f81..23bf933 100644 --- a/Modules/UseSWIG.cmake +++ b/Modules/UseSWIG.cmake @@ -85,6 +85,9 @@ macro(SWIG_GET_EXTRA_OUTPUT_FILES language outfiles generatedpath infile) set(${outfiles} "") get_source_file_property(SWIG_GET_EXTRA_OUTPUT_FILES_module_basename ${infile} SWIG_MODULE_NAME) + if(SWIG_GET_EXTRA_OUTPUT_FILES_module_basename STREQUAL "NOTFOUND") + get_filename_component(SWIG_GET_EXTRA_OUTPUT_FILES_module_basename "${infile}" NAME_WE) + endif() foreach(it ${SWIG_${language}_EXTRA_FILE_EXTENSION}) set(${outfiles} ${${outfiles}} "${generatedpath}/${SWIG_GET_EXTRA_OUTPUT_FILES_module_basename}.${it}") @@ -100,10 +103,6 @@ macro(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile) get_source_file_property(swig_source_file_generated ${infile} GENERATED) get_source_file_property(swig_source_file_cplusplus ${infile} CPLUSPLUS) get_source_file_property(swig_source_file_flags ${infile} SWIG_FLAGS) - get_source_file_property(_SWIG_MODULE_NAME ${infile} SWIG_MODULE_NAME) - if ( NOT _SWIG_MODULE_NAME ) - set_source_files_properties(${infile} PROPERTIES SWIG_MODULE_NAME ${name}) - endif () if("${swig_source_file_flags}" STREQUAL "NOTFOUND") set(swig_source_file_flags "") endif() @@ -201,6 +200,7 @@ macro(SWIG_ADD_MODULE name language) MODULE ${swig_generated_sources} ${swig_other_sources}) + set_target_properties(${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES NO_SONAME ON) string(TOLOWER "${language}" swig_lowercase_language) if ("${swig_lowercase_language}" STREQUAL "octave") set_target_properties(${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES PREFIX "") |