Define _MIDL_USE_GUIDDEF_, this causes __decspec(selectany) to be used on the iids. This way we don't need any linker flags to silence warnings and it also fixes errors when linking later.

svn path=/branches/cmake-bringup/; revision=50573
This commit is contained in:
Timo Kreuzer 2011-01-30 22:10:55 +00:00
parent 1b18ef5578
commit ea3b37d0f8

View file

@ -1,4 +1,6 @@
add_definitions(-D_MIDL_USE_GUIDDEF_)
list(APPEND IDL_SOURCES
# These are the ones that MS uuid contains:
# activaut.idl
@ -211,11 +213,5 @@ list(APPEND SOURCE
otherguids.c
undoc.c)
if(MSVC)
# Disable warning about duplicate symbols. MS uuid lib contains them as well.
# Cmake doesn't handle LINK_FLAGS here
set(CMAKE_C_CREATE_STATIC_LIBRARY "<CMAKE_LINKER> /lib ${CMAKE_CL_NOLOGO} <LINK_FLAGS> /ignore:4006 /out:<TARGET> <OBJECTS> ")
endif()
add_library(uuid ${SOURCE})
add_dependencies(uuid psdk)