Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Commit

Permalink
Fix building on Windows using MinGW (#15405)
Browse files Browse the repository at this point in the history
  • Loading branch information
ariya committed Dec 31, 2019
1 parent 8542540 commit 0e3c012
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0e3c012

Please sign in to comment.