[CMAKE]
[reactos.git] / dll / win32 / advapi32 / CMakeLists.txt
index a6d25ff..bcbebfa 100644 (file)
@@ -1,7 +1,6 @@
 
 
+set_unicode()
 
 
-
-add_definitions(-DUNICODE -D_UNICODE)
 add_definitions(-D_ADVAPI32_)
 
 remove_definitions(-D_WIN32_WINNT=0x502)
 add_definitions(-D_ADVAPI32_)
 
 remove_definitions(-D_WIN32_WINNT=0x502)
@@ -9,29 +8,59 @@ add_definitions(-D_WIN32_WINNT=0x600)
 
 include_directories(${REACTOS_BINARY_DIR}/include/reactos/idl)
 
 
 include_directories(${REACTOS_BINARY_DIR}/include/reactos/idl)
 
-file(GLOB_RECURSE SOURCE *.c)
-
-set_source_files_properties(${REACTOS_BINARY_DIR}/include/reactos/idl/svcctl_c.c
-    ${REACTOS_BINARY_DIR}/include/reactos/idl/lsa_c.c
-    ${REACTOS_BINARY_DIR}/include/reactos/idl/eventlogrpc_c.c
-    PROPERTIES GENERATED TRUE)
+list(APPEND SOURCE
+    crypt/crypt.c
+    crypt/crypt_arc4.c
+    crypt/crypt_des.c
+    crypt/crypt_lmhash.c
+    crypt/crypt_md4.c
+    crypt/crypt_md5.c
+    crypt/crypt_sha.c
+    misc/dllmain.c
+    misc/efs.c
+    misc/hwprofiles.c
+    misc/logon.c
+    misc/msi.c
+    misc/shutdown.c
+    misc/sysfunc.c
+    misc/trace.c
+    reg/reg.c
+    sec/ac.c
+    sec/audit.c
+    sec/cred.c
+    sec/lsa.c
+    sec/misc.c
+    sec/sec.c
+    sec/sid.c
+    sec/trustee.c
+    service/eventlog.c
+    service/rpc.c
+    service/scm.c
+    service/sctrl.c
+    token/privilege.c
+    token/token.c
+    advapi32_stubs.c
+    advapi32.rc
+    advapi32.def)
+    
+if(NOT MSVC)
+    set_source_files_properties(advapi32.def PROPERTIES EXTERNAL_OBJECT TRUE)
+endif()
 
 add_library(advapi32 SHARED
 
 add_library(advapi32 SHARED
-    ${SOURCE}
-    ${CMAKE_CURRENT_SOURCE_DIR}/advapi32.rc
     ${CMAKE_CURRENT_BINARY_DIR}/advapi32_advapi32.h.gch
     ${CMAKE_CURRENT_BINARY_DIR}/advapi32_advapi32.h.gch
-    ${REACTOS_BINARY_DIR}/include/reactos/idl/svcctl_c.c
-    ${REACTOS_BINARY_DIR}/include/reactos/idl/lsa_c.c
-    ${REACTOS_BINARY_DIR}/include/reactos/idl/eventlogrpc_c.c)
+    ${SOURCE})
 
 
-set_target_properties(advapi32 PROPERTIES LINK_FLAGS "-Wl,-entry,_DllMain@12")
+set_module_type(advapi32 win32dll)
 
 
-target_link_libraries(advapi32 ${CMAKE_CURRENT_SOURCE_DIR}/advapi32.def
+target_link_libraries(advapi32
+    svcctl_client
+    lsa_client
+    eventlogrpc_client
     wine
     wine
-    pseh
-    rpcrt4
-    -lkernel32
-    -lntdll)
+    ${PSEH_LIB})
+
+add_importlibs(advapi32 rpcrt4 kernel32 ntdll)
 
 add_pch(advapi32 ${CMAKE_CURRENT_SOURCE_DIR}/advapi32.h ${SOURCE})
 
 add_pch(advapi32 ${CMAKE_CURRENT_SOURCE_DIR}/advapi32.h ${SOURCE})
-add_dependencies(advapi32 svcctl_client lsa_client eventlogrpc_client version)
+add_cab_target(advapi32 1)