- Fix more dlls.
[reactos.git] / dll / win32 / mswsock / CMakeLists.txt
index a14b739..cfce84a 100644 (file)
@@ -4,16 +4,20 @@ set_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_module_type(mswsock win32dll)
 
-target_link_libraries(mswsock ${CMAKE_CURRENT_BINARY_DIR}/mswsock.def)
+add_importlibs(mswsock ws2_32 msvcrt kernel32)
 
-add_importlibs(mswsock ws2_32 kernel32)
-add_dependencies(mswsock mswsock_def)
+add_cab_target(mswsock 1)