* CMake automatically handles def files when they're added to the source list, so we don't need to mark it as an external object here.

svn path=/trunk/; revision=56321
This commit is contained in:
Amine Khaldi 2012-04-02 15:27:35 +00:00
parent b5e6b0441c
commit 38209482a4

View file

@ -243,8 +243,7 @@ function(spec2def _dllname _spec_file)
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_file}.def ${CMAKE_CURRENT_BINARY_DIR}/${_file}_stubs.c
COMMAND native-spec2def -n=${_dllname} --kill-at -a=${ARCH2} -d=${CMAKE_CURRENT_BINARY_DIR}/${_file}.def -s=${CMAKE_CURRENT_BINARY_DIR}/${_file}_stubs.c ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file} native-spec2def)
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${_file}.def PROPERTIES EXTERNAL_OBJECT TRUE)
if(__add_importlib)
# generate the def for the export lib
add_custom_command(
@ -252,7 +251,7 @@ function(spec2def _dllname _spec_file)
COMMAND native-spec2def -n=${_dllname} -a=${ARCH2} -d=${CMAKE_CURRENT_BINARY_DIR}/${_file}_implib.def ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file} native-spec2def)
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${_file}_implib.def PROPERTIES EXTERNAL_OBJECT TRUE)
#create normal importlib
_add_library(lib${_file} STATIC EXCLUDE_FROM_ALL ${CMAKE_CURRENT_BINARY_DIR}/${_file}_implib.def)
set_target_properties(lib${_file} PROPERTIES LINKER_LANGUAGE "IMPLIB" PREFIX "")