-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>")
+set_unicode()
-add_definitions(-DUNICODE -D_UNICODE)
add_definitions(-DSUPPORT_UXTHEME)
-file(GLOB_RECURSE SOURCE *.c)
+list(APPEND SOURCE
+ aclui.c
+ checklist.c
+ guid.c
+ misc.c
+ sidcache.c
+ aclui.rc)
spec2def(aclui ${CMAKE_CURRENT_SOURCE_DIR}/aclui.spec ${CMAKE_CURRENT_BINARY_DIR}/aclui.def)
add_library(aclui SHARED
- ${SOURCE}
- ${CMAKE_CURRENT_SOURCE_DIR}/aclui.rc
- ${CMAKE_CURRENT_BINARY_DIR}/aclui_precomp.h.gch)
-
-set_target_properties(aclui PROPERTIES LINK_FLAGS "-Wl,-entry,_DllMain@12")
-
-target_link_libraries(aclui
- ${CMAKE_CURRENT_BINARY_DIR}/aclui.def
- -luser32
- -lgdi32
- -lcomctl32
- -lole32
- -loleaut32
- -ladvapi32
- -luxtheme
- -lkernel32
- -lntdll)
+ ${CMAKE_CURRENT_BINARY_DIR}/aclui_precomp.h.gch
+ ${SOURCE})
+
+set_module_type(aclui win32dll)
+
+target_link_libraries(aclui ${CMAKE_CURRENT_BINARY_DIR}/aclui.def)
+add_importlibs(aclui user32 gdi32 comctl32 ole32 oleaut32 advapi32 uxtheme kernel32 ntdll)
add_pch(aclui ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE})
-add_dependencies(aclui aclui_def psdk)
+add_dependencies(aclui aclui_def)
+add_cab_target(aclui 1)