* Convert add_importlibs to a function.

svn path=/trunk/; revision=53132
This commit is contained in:
Amine Khaldi 2011-08-07 22:48:11 +00:00
parent e4f1300054
commit 1eb5d7d6db

View file

@ -227,15 +227,15 @@ else()
endmacro() endmacro()
endif() endif()
macro(add_importlibs MODULE) function(add_importlibs _module)
add_dependency_node(${MODULE}) add_dependency_node(${_module})
foreach(LIB ${ARGN}) foreach(LIB ${ARGN})
if ("${LIB}" MATCHES "msvcrt") if ("${LIB}" MATCHES "msvcrt")
add_definitions(-D_DLL -D__USE_CRTIMP) add_definitions(-D_DLL -D__USE_CRTIMP)
target_link_libraries(${MODULE} msvcrtex) target_link_libraries(${_module} msvcrtex)
endif() endif()
target_link_libraries(${MODULE} ${CMAKE_BINARY_DIR}/importlibs/lib${LIB}${CMAKE_STATIC_LIBRARY_SUFFIX}) target_link_libraries(${_module} ${CMAKE_BINARY_DIR}/importlibs/lib${LIB}${CMAKE_STATIC_LIBRARY_SUFFIX})
add_dependencies(${MODULE} lib${LIB}) add_dependencies(${_module} lib${LIB})
add_dependency_edge(${MODULE} ${LIB}) add_dependency_edge(${_module} ${LIB})
endforeach() endforeach()
endmacro() endfunction()