- Fix more dlls.
[reactos.git] / dll / win32 / mswsock / CMakeLists.txt
index 8e39116..cfce84a 100644 (file)
@@ -1,23 +1,23 @@
 
+set_unicode()
 
-
-include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
-
-add_definitions(-DUNICODE -D_UNICODE)
 add_definitions(-DLE)
+include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
 
-spec2def(mswsock ${CMAKE_CURRENT_SOURCE_DIR}/mswsock.spec ${CMAKE_CURRENT_BINARY_DIR}/mswsock.def)
+spec2def(mswsock.dll mswsock.spec)
 
 add_library(mswsock SHARED
     extensions.c
     stubs.c
-    mswsock.rc)
+    mswsock.rc
+    mswsock.def)
+
+if(NOT MSVC)
+    set_source_files_properties(mswsock.def PROPERTIES EXTERNAL_OBJECT TRUE)
+endif()
 
-set_target_properties(mswsock PROPERTIES LINK_FLAGS "-Wl,-entry,_DllMain@12")
+set_module_type(mswsock win32dll)
 
-target_link_libraries(mswsock
-    ${CMAKE_CURRENT_BINARY_DIR}/mswsock.def
-    -lws2_32
-    -lkernel32)
+add_importlibs(mswsock ws2_32 msvcrt kernel32)
 
-add_dependencies(mswsock mswsock_def psdk)
+add_cab_target(mswsock 1)