mirror of
https://github.com/reactos/reactos.git
synced 2025-01-11 00:30:58 +00:00
[CMAKE - MSC]
- Add set_image_base macro - add psdk and buildno dependencies to modules svn path=/branches/cmake-bringup/; revision=49279
This commit is contained in:
parent
394ca95775
commit
ab5836ad90
1 changed files with 10 additions and 0 deletions
10
msc.cmake
10
msc.cmake
|
@ -39,6 +39,15 @@ macro(set_subsystem MODULE SUBSYSTEM)
|
||||||
set_target_properties(${MODULE} PROPERTIES LINK_FLAGS ${NEW_LINKER_FLAGS})
|
set_target_properties(${MODULE} PROPERTIES LINK_FLAGS ${NEW_LINKER_FLAGS})
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
macro(set_image_base MODULE IMAGE_BASE)
|
||||||
|
set(NEW_LINKER_FLAGS "/BASE:${IMAGE_BASE}")
|
||||||
|
get_target_property(LINKER_FLAGS ${MODULE} LINK_FLAGS)
|
||||||
|
if(LINKER_FLAGS)
|
||||||
|
set(NEW_LINKER_FLAGS "${LINKER_FLAGS} ${NEW_LINKER_FLAGS}")
|
||||||
|
endif()
|
||||||
|
set_target_properties(${MODULE} PROPERTIES LINK_FLAGS ${NEW_LINKER_FLAGS})
|
||||||
|
endmacro()
|
||||||
|
|
||||||
macro(add_importlibs MODULE)
|
macro(add_importlibs MODULE)
|
||||||
foreach(LIB ${ARGN})
|
foreach(LIB ${ARGN})
|
||||||
target_link_libraries(${MODULE} ${LIB}.LIB)
|
target_link_libraries(${MODULE} ${LIB}.LIB)
|
||||||
|
@ -46,6 +55,7 @@ macro(add_importlibs MODULE)
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
macro(set_module_type MODULE TYPE)
|
macro(set_module_type MODULE TYPE)
|
||||||
|
add_dependencies(${MODULE} psdk buildno_header)
|
||||||
if(${TYPE} MATCHES nativecui)
|
if(${TYPE} MATCHES nativecui)
|
||||||
set_subsystem(${MODULE} native)
|
set_subsystem(${MODULE} native)
|
||||||
add_importlibs(${MODULE} ntdll)
|
add_importlibs(${MODULE} ntdll)
|
||||||
|
|
Loading…
Reference in a new issue