Author: spetreolle
Date: Mon Sep 27 09:14:54 2010
New Revision: 48906
URL:
http://svn.reactos.org/svn/reactos?rev=48906&view=rev
Log:
[CMAKE]
Add a set_rc_compiler macro,
its a workaround for lack of mingw RC support in cmake.
Enable winemine build.
Improve user32 CMakeLists.txt.
Thanks to AmineKhaldi for initial support of resources in user32.
Modified:
branches/cmake-bringup/base/applications/games/CMakeLists.txt
branches/cmake-bringup/base/applications/games/winemine/CMakeLists.txt
branches/cmake-bringup/dll/win32/user32/CMakeLists.txt
branches/cmake-bringup/gcc.cmake
branches/cmake-bringup/msc.cmake
Modified: branches/cmake-bringup/base/applications/games/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/base/applications…
==============================================================================
--- branches/cmake-bringup/base/applications/games/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/base/applications/games/CMakeLists.txt [iso-8859-1] Mon Sep 27
09:14:54 2010
@@ -1,4 +1,4 @@
add_subdirectory(solitaire)
#add_subdirectory(spider)
-#add_subdirectory(winemine)
+add_subdirectory(winemine)
Modified: branches/cmake-bringup/base/applications/games/winemine/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/base/applications…
==============================================================================
--- branches/cmake-bringup/base/applications/games/winemine/CMakeLists.txt [iso-8859-1]
(original)
+++ branches/cmake-bringup/base/applications/games/winemine/CMakeLists.txt [iso-8859-1]
Mon Sep 27 09:14:54 2010
@@ -1,11 +1,14 @@
+
add_executable(winemine
main.c
dialog.c
rsrc.rc)
+include_directories(${CMAKE_CURRENT_SOURCE_DIR})
set_unicode(winemine yes)
set_module_type(winemine win32gui)
+set_rc_compiler()
add_importlibs(winemine user32 gdi32 advapi32 shell32 msvcrt)
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] Mon Sep 27
09:14:54 2010
@@ -8,20 +8,61 @@
include_directories(${REACTOS_SOURCE_DIR}/include/reactos/subsys)
include_directories(include)
-get_directory_property(defines COMPILE_DEFINITIONS)
-get_directory_property(includes INCLUDE_DIRECTORIES)
+set_rc_compiler()
-foreach(arg ${defines})
- set(result_defs "${result_defs} -D${arg}")
-endforeach(arg ${defines})
-
-foreach(arg ${includes})
- set(result_incs "-I${arg} ${result_incs}")
-endforeach(arg ${includes})
-
-SET(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> ${result_defs} ${result_incs}
-i <SOURCE> -O coff -o <OBJECT>")
-
-file(GLOB_RECURSE SOURCE *.c)
+list(APPEND SOURCE
+ user32_stubs.c
+ controls/button.c
+ controls/combo.c
+ controls/edit.c
+ controls/icontitle.c
+ controls/listbox.c
+ controls/regcontrol.c
+ controls/scrollbar.c
+ controls/static.c
+ misc/dde.c
+ misc/ddeclient.c
+ misc/ddeserver.c
+ misc/desktop.c
+ misc/display.c
+ misc/dllmain.c
+ misc/exit.c
+ misc/exticon.c
+ misc/imm.c
+ misc/misc.c
+ misc/object.c
+ misc/resources.c
+ misc/rtlstr.c
+ misc/stubs.c
+ misc/timer.c
+ misc/usrapihk.c
+ misc/winhelp.c
+ misc/winsta.c
+ misc/wsprintf.c
+ windows/accel.c
+ windows/caret.c
+ windows/class.c
+ windows/clipboard.c
+ windows/cursoricon.c
+ windows/dc.c
+ windows/defwnd.c
+ windows/dialog.c
+ windows/draw.c
+ windows/font.c
+ windows/hook.c
+ windows/input.c
+ windows/mdi.c
+ windows/menu.c
+ windows/messagebox.c
+ windows/message.c
+ windows/nonclient.c
+ windows/paint.c
+ windows/prop.c
+ windows/rect.c
+ windows/spy.c
+ windows/text.c
+ windows/window.c
+ windows/winpos.c)
add_library(user32 SHARED
${SOURCE}
Modified: branches/cmake-bringup/gcc.cmake
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/gcc.cmake?rev=489…
==============================================================================
--- branches/cmake-bringup/gcc.cmake [iso-8859-1] (original)
+++ branches/cmake-bringup/gcc.cmake [iso-8859-1] Mon Sep 27 09:14:54 2010
@@ -93,4 +93,18 @@
target_link_libraries(${MODULE} mingw_common)
endmacro()
-
+# Workaround lack of mingw RC support in cmake
+macro(set_rc_compiler)
+ get_directory_property(defines COMPILE_DEFINITIONS)
+ get_directory_property(includes INCLUDE_DIRECTORIES)
+
+ foreach(arg ${defines})
+ set(result_defs "${result_defs} -D${arg}")
+ endforeach(arg ${defines})
+
+ foreach(arg ${includes})
+ set(result_incs "-I${arg} ${result_incs}")
+ endforeach(arg ${includes})
+
+ SET(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> ${result_defs}
${result_incs} -i <SOURCE> -O coff -o <OBJECT>")
+endmacro()
Modified: branches/cmake-bringup/msc.cmake
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/msc.cmake?rev=489…
==============================================================================
--- branches/cmake-bringup/msc.cmake [iso-8859-1] (original)
+++ branches/cmake-bringup/msc.cmake [iso-8859-1] Mon Sep 27 09:14:54 2010
@@ -62,3 +62,6 @@
set(CMAKE_C_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Ob0 /Od")
SET(CMAKE_CXX_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Ob0 /Od")
+macro(set_rc_compiler)
+# dummy, this workaround is only needed in mingw due to lack of RC support in cmake
+endmacro()