Author: akhaldi Date: Fri Jan 28 11:25:24 2011 New Revision: 50533
URL: http://svn.reactos.org/svn/reactos?rev=50533&view=rev Log: [CMAKE] - Properly handle setting the suffix variable. Fixes import libs creation.
Modified: branches/cmake-bringup/gcc.cmake branches/cmake-bringup/msc.cmake
Modified: branches/cmake-bringup/gcc.cmake URL: http://svn.reactos.org/svn/reactos/branches/cmake-bringup/gcc.cmake?rev=5053... ============================================================================== --- branches/cmake-bringup/gcc.cmake [iso-8859-1] (original) +++ branches/cmake-bringup/gcc.cmake [iso-8859-1] Fri Jan 28 11:25:24 2011 @@ -269,6 +269,14 @@ 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")
Modified: branches/cmake-bringup/msc.cmake URL: http://svn.reactos.org/svn/reactos/branches/cmake-bringup/msc.cmake?rev=5053... ============================================================================== --- branches/cmake-bringup/msc.cmake [iso-8859-1] (original) +++ branches/cmake-bringup/msc.cmake [iso-8859-1] Fri Jan 28 11:25:24 2011 @@ -139,6 +139,14 @@ 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(