[CMAKE]
[reactos.git] / dll / win32 / user32 / CMakeLists.txt
index 15d7319..e596388 100644 (file)
@@ -1,5 +1,5 @@
 
-SET(CMAKE_C_CREATE_SHARED_LIBRARY "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
+
 
 add_definitions(-DUNICODE -D_UNICODE)
 add_definitions(-D_DLL -D__USE_CRTIMP)
@@ -8,20 +8,61 @@ include_directories(BEFORE ${REACTOS_SOURCE_DIR}/include/reactos/wine)
 include_directories(${REACTOS_SOURCE_DIR}/include/reactos/subsys)
 include_directories(include)
 
-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>")
+set_rc_compiler()
 
-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}
@@ -32,14 +73,14 @@ set_target_properties(user32 PROPERTIES LINK_FLAGS "-Wl,-entry,_DllMain@12")
 
 target_link_libraries(user32
     ${CMAKE_CURRENT_SOURCE_DIR}/user32.def
-    ${REACTOS_SOURCE_DIR}/lib/3rdparty/libwine/libwine.a
-    ${REACTOS_SOURCE_DIR}/dll/win32/gdi32/libgdi32.a
-    ${REACTOS_SOURCE_DIR}/dll/win32/advapi32/libadvapi32.a
-    imm32
+    wine
+    -lgdi32
+    -ladvapi32
+    -limm32
     win32ksys
     pseh
-    ${REACTOS_SOURCE_DIR}/dll/win32/kernel32/libkernel32.a
-    ${REACTOS_SOURCE_DIR}/dll/ntdll/libntdll.a)
+    -lkernel32
+    -lntdll)
                       
 add_pch(user32 ${CMAKE_CURRENT_SOURCE_DIR}/include/user32.h ${SOURCE})
 add_dependencies(user32 psdk)