Author: tkreuzer Date: Thu Jan 27 21:50:54 2011 New Revision: 50519
URL: http://svn.reactos.org/svn/reactos?rev=50519&view=rev Log: [CMAKE] get the library suffix from the target instead of passing it to the macro.
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=5051... ============================================================================== --- branches/cmake-bringup/gcc.cmake [iso-8859-1] (original) +++ branches/cmake-bringup/gcc.cmake [iso-8859-1] Thu Jan 27 21:50:54 2011 @@ -268,21 +268,18 @@
get_filename_component(_name ${_exports_file} NAME_WE) get_filename_component(_extension ${_exports_file} EXT) + get_target_property(_suffix ${_name} SUFFIX)
if (${_extension} STREQUAL ".spec") - if (${ARGC} GREATER 1) - set(DLLNAME_OPTION "-n=${ARGV1}") - else() - set(DLLNAME_OPTION "") - endif()
add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/importlibs/lib${_name}.a - COMMAND native-spec2def ${DLLNAME_OPTION} -a=${ARCH2} -d=${CMAKE_CURRENT_BINARY_DIR}/${_name}_implib.def ${CMAKE_CURRENT_SOURCE_DIR}/${_exports_file} + COMMAND native-spec2def -n=${_name}.${_suffix} -a=${ARCH2} -d=${CMAKE_CURRENT_BINARY_DIR}/${_name}_implib.def ${CMAKE_CURRENT_SOURCE_DIR}/${_exports_file} COMMAND ${MINGW_PREFIX}dlltool --def ${CMAKE_CURRENT_BINARY_DIR}/${_name}_implib.def --kill-at --output-lib=${CMAKE_BINARY_DIR}/importlibs/lib${_name}.a DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_exports_file})
elseif(${_extension} STREQUAL ".def") + message("Use of def files for import libs is deprecated: ${_exports_file}") add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/importlibs/lib${_name}.a COMMAND ${MINGW_PREFIX}dlltool --def ${CMAKE_CURRENT_SOURCE_DIR}/${_exports_file} --kill-at --output-lib=${CMAKE_BINARY_DIR}/importlibs/lib${_name}.a
Modified: branches/cmake-bringup/msc.cmake URL: http://svn.reactos.org/svn/reactos/branches/cmake-bringup/msc.cmake?rev=5051... ============================================================================== --- branches/cmake-bringup/msc.cmake [iso-8859-1] (original) +++ branches/cmake-bringup/msc.cmake [iso-8859-1] Thu Jan 27 21:50:54 2011 @@ -138,11 +138,12 @@ # Thanks MS for creating a stupid linker macro(add_importlib_target _exports_file) get_filename_component(_name ${_exports_file} NAME_WE) + get_target_property(_suffix ${_name} SUFFIX)
# Generate the asm stub file and the export def file add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.asm ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_exp.def - COMMAND native-spec2def --ms --kill-at -r -d=${CMAKE_BINARY_DIR}/importlibs/lib${_name}_exp.def -l=${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.asm ${CMAKE_CURRENT_SOURCE_DIR}/${_exports_file} + COMMAND native-spec2def --ms --kill-at -r -n=${_name}.${_suffix} -d=${CMAKE_BINARY_DIR}/importlibs/lib${_name}_exp.def -l=${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.asm ${CMAKE_CURRENT_SOURCE_DIR}/${_exports_file} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_exports_file})
# Assemble the stub file