Author: tkreuzer
Date: Tue Nov 2 09:22:58 2010
New Revision: 49427
URL:
http://svn.reactos.org/svn/reactos?rev=49427&view=rev
Log:
[CMAKE]
Rename add_importlib_def to add_importlib_target
add importlib targets for ntdll, msvcrt, shell32, user32
Modified:
branches/cmake-bringup/dll/ntdll/CMakeLists.txt
branches/cmake-bringup/dll/win32/kernel32/CMakeLists.txt
branches/cmake-bringup/dll/win32/msvcrt/CMakeLists.txt
branches/cmake-bringup/dll/win32/rpcrt4/CMakeLists.txt
branches/cmake-bringup/dll/win32/shell32/CMakeLists.txt
branches/cmake-bringup/dll/win32/user32/CMakeLists.txt
branches/cmake-bringup/msc.cmake
Modified: branches/cmake-bringup/dll/ntdll/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/ntdll/CMakeLi…
==============================================================================
--- branches/cmake-bringup/dll/ntdll/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/ntdll/CMakeLists.txt [iso-8859-1] Tue Nov 2 09:22:58 2010
@@ -55,4 +55,4 @@
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)
Modified: branches/cmake-bringup/dll/win32/kernel32/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/kernel3…
==============================================================================
--- branches/cmake-bringup/dll/win32/kernel32/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/kernel32/CMakeLists.txt [iso-8859-1] Tue Nov 2
09:22:58 2010
@@ -121,4 +121,4 @@
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)
Modified: branches/cmake-bringup/dll/win32/msvcrt/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/msvcrt/…
==============================================================================
--- branches/cmake-bringup/dll/win32/msvcrt/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/msvcrt/CMakeLists.txt [iso-8859-1] Tue Nov 2
09:22:58 2010
@@ -1,3 +1,5 @@
+
+spec2def(msvcrt.dll msvcrt.spec)
add_definitions(
-DUSE_MSVCRT_PREFIX
@@ -11,7 +13,11 @@
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_module_type(msvcrt win32dll)
target_link_libraries(msvcrt
- ${CMAKE_CURRENT_SOURCE_DIR}/msvcrt.def
crt
wine
${PSEH_LIB})
@@ -29,3 +34,5 @@
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)
+
Modified: branches/cmake-bringup/dll/win32/rpcrt4/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/rpcrt4/…
==============================================================================
--- branches/cmake-bringup/dll/win32/rpcrt4/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/rpcrt4/CMakeLists.txt [iso-8859-1] Tue Nov 2
09:22:58 2010
@@ -45,3 +45,5 @@
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)
+
Modified: branches/cmake-bringup/dll/win32/shell32/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/shell32…
==============================================================================
--- branches/cmake-bringup/dll/win32/shell32/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/shell32/CMakeLists.txt [iso-8859-1] Tue Nov 2
09:22:58 2010
@@ -94,4 +94,6 @@
ntdll)
-add_cab_target(shell32 1)
+add_cab_target(shell32 1)
+add_importlib_target(${CMAKE_CURRENT_BINARY_DIR}/shell32.def)
+
Modified: branches/cmake-bringup/dll/win32/user32/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/user32/…
==============================================================================
--- branches/cmake-bringup/dll/win32/user32/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/user32/CMakeLists.txt [iso-8859-1] Tue Nov 2
09:22:58 2010
@@ -1,5 +1,7 @@
set_unicode()
+
+spec2def(user32.dll user32.pspec)
add_definitions(-D_DLL -D__USE_CRTIMP)
@@ -64,7 +66,7 @@
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 @@
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)
+
Modified: branches/cmake-bringup/msc.cmake
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/msc.cmake?rev=494…
==============================================================================
--- branches/cmake-bringup/msc.cmake [iso-8859-1] (original)
+++ branches/cmake-bringup/msc.cmake [iso-8859-1] Tue Nov 2 09:22:58 2010
@@ -13,6 +13,8 @@
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 @@
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_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}