mirror of
https://github.com/reactos/reactos.git
synced 2024-08-03 18:10:54 +00:00
[CMAKE]
Rename add_importlib_def to add_importlib_target add importlib targets for ntdll, msvcrt, shell32, user32 svn path=/branches/cmake-bringup/; revision=49427
This commit is contained in:
parent
a3623f23de
commit
2b2d3d2776
|
@ -55,4 +55,4 @@ add_dependencies(ntdll ntstatus)
|
|||
|
||||
add_minicd_target(ntdll reactos/system32 ntdll.dll)
|
||||
add_cab_target(ntdll 1)
|
||||
add_importlib_def(${CMAKE_CURRENT_BINARY_DIR}/ntdll.def)
|
||||
add_importlib_target(${CMAKE_CURRENT_BINARY_DIR}/ntdll.def)
|
||||
|
|
|
@ -121,4 +121,4 @@ add_importlibs(kernel32 ntdll)
|
|||
add_pch(kernel32 ${CMAKE_CURRENT_SOURCE_DIR}/k32.h ${SOURCE})
|
||||
add_dependencies(kernel32 errcodes)
|
||||
add_cab_target(kernel32 1)
|
||||
add_importlib_def(${CMAKE_CURRENT_BINARY_DIR}/kernel32.def)
|
||||
add_importlib_target(${CMAKE_CURRENT_BINARY_DIR}/kernel32.def)
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
|
||||
spec2def(msvcrt.dll msvcrt.spec)
|
||||
|
||||
add_definitions(
|
||||
-DUSE_MSVCRT_PREFIX
|
||||
-D_MSVCRT_
|
||||
|
@ -11,7 +13,11 @@ add_definitions(
|
|||
|
||||
include_directories(${REACTOS_SOURCE_DIR}/lib/sdk/crt/include)
|
||||
|
||||
list(APPEND SOURCE dllmain.c msvcrt_stubs.c msvcrt.rc)
|
||||
list(APPEND SOURCE
|
||||
dllmain.c
|
||||
msvcrt_stubs.c
|
||||
msvcrt.rc
|
||||
${CMAKE_CURRENT_BINARY_DIR}/msvcrt.def)
|
||||
|
||||
add_library(msvcrt SHARED
|
||||
${CMAKE_CURRENT_BINARY_DIR}/msvcrt_precomp.h.gch
|
||||
|
@ -21,7 +27,6 @@ set_target_properties(msvcrt PROPERTIES LINK_FLAGS "-u __seh_longjmp_unwind@4")
|
|||
set_module_type(msvcrt win32dll)
|
||||
|
||||
target_link_libraries(msvcrt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/msvcrt.def
|
||||
crt
|
||||
wine
|
||||
${PSEH_LIB})
|
||||
|
@ -29,3 +34,5 @@ target_link_libraries(msvcrt
|
|||
add_pch(msvcrt ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE})
|
||||
add_importlibs(msvcrt kernel32 ntdll)
|
||||
add_cab_target(msvcrt 1)
|
||||
add_importlib_target(${CMAKE_CURRENT_BINARY_DIR}/msvcrt.def)
|
||||
|
||||
|
|
|
@ -45,3 +45,5 @@ target_link_libraries(rpcrt4
|
|||
add_importlibs(rpcrt4 msvcrt user32 advapi32 secur32 iphlpapi ws2_32 kernel32 ntdll)
|
||||
add_dependencies(rpcrt4 winesdk)
|
||||
add_cab_target(rpcrt4 1)
|
||||
add_importlib_target(${CMAKE_CURRENT_BINARY_DIR}/rpcrt4.def)
|
||||
|
||||
|
|
|
@ -94,4 +94,6 @@ add_importlibs(shell32
|
|||
ntdll)
|
||||
|
||||
|
||||
add_cab_target(shell32 1)
|
||||
add_cab_target(shell32 1)
|
||||
add_importlib_target(${CMAKE_CURRENT_BINARY_DIR}/shell32.def)
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
|
||||
set_unicode()
|
||||
|
||||
spec2def(user32.dll user32.pspec)
|
||||
|
||||
add_definitions(-D_DLL -D__USE_CRTIMP)
|
||||
|
||||
include_directories(
|
||||
|
@ -64,7 +66,7 @@ list(APPEND SOURCE
|
|||
windows/winpos.c
|
||||
user32_stubs.c
|
||||
user32.rc
|
||||
user32.def)
|
||||
${CMAKE_CURRENT_BINARY_DIR}/user32.def)
|
||||
|
||||
set_source_files_properties(user32.def PROPERTIES EXTERNAL_OBJECT TRUE)
|
||||
|
||||
|
@ -82,3 +84,5 @@ target_link_libraries(user32
|
|||
add_pch(user32 ${CMAKE_CURRENT_SOURCE_DIR}/include/user32.h ${SOURCE})
|
||||
add_importlibs(user32 gdi32 advapi32 imm32 kernel32 ntdll)
|
||||
add_cab_target(user32 1)
|
||||
add_importlib_target(${CMAKE_CURRENT_BINARY_DIR}/user32.def)
|
||||
|
||||
|
|
15
msc.cmake
15
msc.cmake
|
@ -14,6 +14,8 @@ else()
|
|||
add_definitions(/GS- /Zl /Zi)
|
||||
add_definitions(-Dinline=__inline -D__STDC__=1)
|
||||
|
||||
link_directories("${REACTOS_BINARY_DIR}/importlibs" ${REACTOS_BINARY_DIR}/lib/3rdparty/mingw)
|
||||
|
||||
set(CMAKE_RC_CREATE_SHARED_LIBRARY "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
|
||||
|
||||
|
||||
|
@ -59,7 +61,18 @@ macro(set_module_type MODULE TYPE)
|
|||
endif ()
|
||||
if (${TYPE} MATCHES win32cui)
|
||||
set_subsystem(${MODULE} console)
|
||||
set_entrypoint(${MODULE} mainCRTStartup)
|
||||
endif ()
|
||||
if(${TYPE} MATCHES win32dll)
|
||||
set_entrypoint(${MODULE} __DllMainCRTStartup)
|
||||
if(DEFINED baseaddress_${MODULE})
|
||||
set_image_base(${MODULE} ${baseaddress_${MODULE}})
|
||||
else()
|
||||
message(STATUS "${MODULE} has no base address")
|
||||
endif()
|
||||
target_link_libraries(${MODULE} mingw_common mingw_dllmain)
|
||||
endif()
|
||||
|
||||
endmacro()
|
||||
|
||||
macro(set_unicode)
|
||||
|
@ -82,7 +95,7 @@ set(IDL_SERVER_ARG /sstub) #.c for stub server library
|
|||
set(IDL_CLIENT_ARG /cstub) #.c for stub client library
|
||||
|
||||
|
||||
macro(add_importlib_def _def_file)
|
||||
macro(add_importlib_target _def_file)
|
||||
get_filename_component(_name ${_def_file} NAME_WE)
|
||||
add_custom_target(
|
||||
lib${_name}
|
||||
|
|
Loading…
Reference in a new issue