mirror of
https://github.com/reactos/reactos.git
synced 2024-08-03 18:10:54 +00:00
[CMAKE]
Implement add_importlib_target macro to build importlibs for MSVC. We can't use MSVC's libraries, as they are incomplete. gcc version does nothing. svn path=/branches/cmake-bringup/; revision=49377
This commit is contained in:
parent
e25c1a8cee
commit
ee10c4c2c7
|
@ -157,4 +157,8 @@ set(IDL_TYPELIB_ARG -t -T) #.tlb
|
|||
set(IDL_SERVER_ARG -s -S) #.c for server library
|
||||
set(IDL_CLIENT_ARG -c -C) #.c for stub client library
|
||||
|
||||
endif()
|
||||
macro(add_importlib_target _name)
|
||||
# empty for now, while import libs are shipped
|
||||
endmacro()
|
||||
|
||||
endif()
|
||||
|
|
29
msc.cmake
29
msc.cmake
|
@ -48,12 +48,6 @@ macro(set_image_base MODULE IMAGE_BASE)
|
|||
set_target_properties(${MODULE} PROPERTIES LINK_FLAGS ${NEW_LINKER_FLAGS})
|
||||
endmacro()
|
||||
|
||||
macro(add_importlibs MODULE)
|
||||
foreach(LIB ${ARGN})
|
||||
target_link_libraries(${MODULE} ${LIB}.LIB)
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
macro(set_module_type MODULE TYPE)
|
||||
add_dependencies(${MODULE} psdk buildno_header)
|
||||
if(${TYPE} MATCHES nativecui)
|
||||
|
@ -87,4 +81,25 @@ set(IDL_TYPELIB_ARG /tlb) #.tlb
|
|||
set(IDL_SERVER_ARG /sstub) #.c for stub server library
|
||||
set(IDL_CLIENT_ARG /cstub) #.c for stub client library
|
||||
|
||||
endif()
|
||||
|
||||
macro(add_importlib_target _name)
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_BINARY_DIR}/importlibs/lib${_name}.lib
|
||||
COMMAND LINK /LIB /MACHINE:X86 /DEF:${CMAKE_CURRENT_BINARY_DIR}/${_name}.def /OUT:${CMAKE_BINARY_DIR}/importlibs/lib${_name}.lib
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${_name}.def
|
||||
)
|
||||
add_custom_target(lib${_name}
|
||||
DEPENDS ${CMAKE_BINARY_DIR}/importlibs/lib${_name}.lib
|
||||
)
|
||||
endmacro()
|
||||
|
||||
macro(add_importlibs MODULE)
|
||||
foreach(LIB ${ARGN})
|
||||
target_link_libraries(${MODULE} ${CMAKE_BINARY_DIR}/importlibs/lib${LIB}.lib)
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/importlibs)
|
||||
|
||||
endif()
|
||||
|
||||
|
|
Loading…
Reference in a new issue