[CMAKE]
[reactos.git] / dll / win32 / user32 / CMakeLists.txt
1
2
3
4 add_definitions(-DUNICODE -D_UNICODE)
5 add_definitions(-D_DLL -D__USE_CRTIMP)
6
7 include_directories(BEFORE ${REACTOS_SOURCE_DIR}/include/reactos/wine)
8 include_directories(${REACTOS_SOURCE_DIR}/include/reactos/subsys)
9 include_directories(include)
10
11 get_directory_property(defines COMPILE_DEFINITIONS)
12 get_directory_property(includes INCLUDE_DIRECTORIES)
13
14 foreach(arg ${defines})
15 set(result_defs "${result_defs} -D${arg}")
16 endforeach(arg ${defines})
17
18 foreach(arg ${includes})
19 set(result_incs "-I${arg} ${result_incs}")
20 endforeach(arg ${includes})
21
22 SET(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> ${result_defs} ${result_incs} -i <SOURCE> -O coff -o <OBJECT>")
23
24 file(GLOB_RECURSE SOURCE *.c)
25
26 add_library(user32 SHARED
27 ${SOURCE}
28 ${CMAKE_CURRENT_SOURCE_DIR}/user32.rc
29 ${CMAKE_CURRENT_BINARY_DIR}/user32_user32.h.gch)
30
31 set_target_properties(user32 PROPERTIES LINK_FLAGS "-Wl,-entry,_DllMain@12")
32
33 target_link_libraries(user32
34 ${CMAKE_CURRENT_SOURCE_DIR}/user32.def
35 wine
36 -lgdi32
37 -ladvapi32
38 -limm32
39 win32ksys
40 pseh
41 -lkernel32
42 -lntdll)
43
44 add_pch(user32 ${CMAKE_CURRENT_SOURCE_DIR}/include/user32.h ${SOURCE})
45 add_dependencies(user32 psdk)