--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -21,8 +21,6 @@ add_definitions(-DPTHREADS)
 
 if(BUILD_SHARED_LUA_OPENSSL)
     set(LUA_OPENSSL_LIBTYPE SHARED)
-    add_definitions(-DLUA_BUILD_AS_DLL -DLUA_LIB)
-    set(EXTRA_LIBS "ws2_32.lib" "crypt32.lib")
 else()
     set(LUA_OPENSSL_LIBTYPE STATIC)
 endif()
