From: Amine Khaldi Date: Fri, 28 Jan 2011 11:25:24 +0000 (+0000) Subject: [CMAKE] X-Git-Tag: backups/GSoC_2011/GSoC_Themes@51550~168 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=14c01bd73c1d0b0e58792bc331c54499938b1452 [CMAKE] - Properly handle setting the suffix variable. Fixes import libs creation. svn path=/branches/cmake-bringup/; revision=50533 --- diff --git a/gcc.cmake b/gcc.cmake index 708b07ab72a..586565b0954 100644 --- a/gcc.cmake +++ b/gcc.cmake @@ -269,6 +269,14 @@ macro(add_importlib_target _exports_file) 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") diff --git a/msc.cmake b/msc.cmake index 0d08ffec99d..91d28862b76 100644 --- a/msc.cmake +++ b/msc.cmake @@ -139,6 +139,14 @@ endmacro() macro(add_importlib_target _exports_file) get_filename_component(_name ${_exports_file} NAME_WE) 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() # Generate the asm stub file and the export def file add_custom_command(