include_directories(${REACTOS_SOURCE_DIR}/lib/tdilib)
-spec2def(wshtcpip ${CMAKE_CURRENT_SOURCE_DIR}/wshtcpip.spec ${CMAKE_CURRENT_BINARY_DIR}/wshtcpip.def)
+spec2def(wshtcpip.dll wshtcpip.spec)
-add_library(wshtcpip SHARED wshtcpip.c wshtcpip.rc)
+list(APPEND SOURCE
+ wshtcpip.c
+ wshtcpip.rc
+ ${CMAKE_CURRENT_BINARY_DIR}/wshtcpip.def)
-set_target_properties(wshtcpip PROPERTIES LINK_FLAGS "-Wl,-entry,0")
+add_library(wshtcpip SHARED ${SOURCE})
-target_link_libraries(wshtcpip
- ${CMAKE_CURRENT_BINARY_DIR}/wshtcpip.def
- tdilib)
+set_entrypoint(wshtcpip 0)
-add_importlibs(wshtcpip kernel32 ws2_32 kernel32 ntdll)
-add_dependencies(wshtcpip wshtcpip_def psdk)
+target_link_libraries(wshtcpip tdilib)
+add_importlibs(wshtcpip ws2_32 kernel32 ntdll)
+add_dependencies(wshtcpip psdk)
+add_cd_file(TARGET wshtcpip DESTINATION reactos/system32 FOR all)