[CMAKE]
[reactos.git] / dll / win32 / authz / CMakeLists.txt
index 4c2a62e..c9582fc 100644 (file)
@@ -1,24 +1,23 @@
 
+set_unicode()
 
+spec2def(authz.dll authz.spec)
 
-add_definitions(-DUNICODE -D_UNICODE)
-
-file(GLOB_RECURSE SOURCE *.c)
-
-spec2def(authz ${CMAKE_CURRENT_SOURCE_DIR}/authz.spec ${CMAKE_CURRENT_BINARY_DIR}/authz.def)
+list(APPEND SOURCE
+    authz.c
+    clictx.c
+    resman.c
+    authz.rc
+    ${CMAKE_CURRENT_BINARY_DIR}/authz_stubs.c
+    ${CMAKE_CURRENT_BINARY_DIR}/authz.def)
 
 add_library(authz SHARED
-    ${SOURCE}
-    ${CMAKE_CURRENT_SOURCE_DIR}/authz.rc
-    ${CMAKE_CURRENT_BINARY_DIR}/authz_precomp.h.gch)
+    ${CMAKE_CURRENT_BINARY_DIR}/authz_precomp.h.gch
+    ${SOURCE})
 
-set_target_properties(authz PROPERTIES LINK_FLAGS "-Wl,-entry,_DllMain@12")
-
-target_link_libraries(authz
-    ${CMAKE_CURRENT_BINARY_DIR}/authz.def
-    -ladvapi32
-    -lkernel32
-    -lntdll)
+set_module_type(authz win32dll)
 
 add_pch(authz ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE})
-add_dependencies(authz authz_def psdk)
+add_importlibs(authz advapi32 msvcrt kernel32 ntdll)
+
+add_cd_file(TARGET authz DESTINATION reactos/system32)