diff -r 53c2aecb9704 -r 08ccaf26cffd CMakeLists.txt --- a/CMakeLists.txt Thu Jul 23 00:16:47 2015 +0300 +++ b/CMakeLists.txt Thu Jul 23 01:52:04 2015 +0300 @@ -54,14 +54,19 @@ target_link_libraries (${TARGET_NAME} huffman) if (WIN32) - add_definitions ("/Za /D_CRT_SEURE_NO_WARNINGS") + add_definitions ("-D_CRT_SEURE_NO_WARNINGS") + target_link_libraries (${TARGET_NAME} wsock32 ws2_32) + + if (PDCURSES_WIN32A_PATH) + include_directories (${PDCURSES_WIN32A_PATH}/include) - if (NOT PDCURSES_WIN32A_PATH) + if (MINGW) + target_link_libraries (${TARGET_NAME} ${PDCURSES_WIN32A_PATH}/lib/pdcurses.a) + else() + target_link_libraries (${TARGET_NAME} ${PDCURSES_WIN32A_PATH}/lib/pdcurses.lib) + endif() + else() message (SEND_ERROR "Must give PDCURSES_WIN32A_PATH on Windows") - else() - include_directories (${PDCURSES_WIN32A_PATH}/include) - target_link_libraries (${TARGET_NAME} ${PDCURSES_WIN32A_PATH}/lib/pdcurses.a) - target_link_libraries (${TARGET_NAME} wsock32 ws2_32) endif() else() include_directories (${CURSES_INCUDE_DIRS}) # sic