- Properly handle setting the suffix variable. Fixes import libs creation.
svn path=/branches/cmake-bringup/; revision=50533
get_filename_component(_name ${_exports_file} NAME_WE)
get_filename_component(_extension ${_exports_file} EXT)
get_target_property(_suffix ${_name} SUFFIX)
+ if(${_suffix} STREQUAL "_suffix-NOTFOUND")
+ get_target_property(_type ${_name} TYPE)
+ if(${_type} MATCHES EXECUTABLE)
+ set(_suffix ".exe")
+ else()
+ set(_suffix ".dll")
+ endif()
+ endif()
if (${_extension} STREQUAL ".spec")
macro(add_importlib_target _exports_file)\r
get_filename_component(_name ${_exports_file} NAME_WE)\r
get_target_property(_suffix ${_name} SUFFIX)\r
+ if(${_suffix} STREQUAL "_suffix-NOTFOUND")\r
+ get_target_property(_type ${_name} TYPE)\r
+ if(${_type} MATCHES EXECUTABLE)\r
+ set(_suffix ".exe")\r
+ else()\r
+ set(_suffix ".dll")\r
+ endif()\r
+ endif()\r
\r
# Generate the asm stub file and the export def file\r
add_custom_command(\r