diff --git a/CMakeLists.txt b/CMakeLists.txt index f49e5f9622..32f26c3024 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,7 +25,12 @@ include_directories(src/linenoise/src) include_directories(src/mongoose) include_directories(src/qcommandline) -set(EXTRA_LIBS dl) +if (WIN32) + set(EXTRA_LIBS ws2_32) + add_definitions(-DQCOMMANDLINE_STATIC) +else() + set(EXTRA_LIBS dl) +endif() add_executable(${PROJECT_NAME} src/phantomjs.qrc ${PHANTOMJS_SOURCES} ${THIRDPARTY_SOURCES}) target_link_libraries(${PROJECT_NAME} ${EXTRA_LIBS} Qt5::Core Qt5::Network Qt5::WebKitWidgets Threads::Threads)