55 |
55 |
56 if (WIN32) |
56 if (WIN32) |
57 add_definitions ("-D_CRT_SEURE_NO_WARNINGS") |
57 add_definitions ("-D_CRT_SEURE_NO_WARNINGS") |
58 target_link_libraries (${TARGET_NAME} wsock32 ws2_32) |
58 target_link_libraries (${TARGET_NAME} wsock32 ws2_32) |
59 |
59 |
60 if (PDCURSES_WIN32A_PATH) |
60 if (PDCURSES_PATH OR PDCURSES_WIN32A_PATH) |
61 include_directories (${PDCURSES_WIN32A_PATH}/include) |
61 if (NOT PDCURSES_PATH) |
|
62 set (PDCURSES_PATH "${PDCURSES_WIN32A_PATH}") |
|
63 add_definitions (-DHAVE_PDCURSES_WIN32A) |
|
64 endif() |
|
65 |
|
66 include_directories (${PDCURSES_PATH}/include) |
62 |
67 |
63 if (MINGW) |
68 if (MINGW) |
64 target_link_libraries (${TARGET_NAME} ${PDCURSES_WIN32A_PATH}/lib/pdcurses.a) |
69 target_link_libraries (${TARGET_NAME} ${PDCURSES_PATH}/lib/pdcurses.a) |
65 else() |
70 else() |
66 target_link_libraries (${TARGET_NAME} ${PDCURSES_WIN32A_PATH}/lib/pdcurses.lib) |
71 target_link_libraries (${TARGET_NAME} ${PDCURSES_PATH}/lib/pdcurses.lib) |
67 endif() |
72 endif() |
68 else() |
73 else() |
69 message (SEND_ERROR "Must give PDCURSES_WIN32A_PATH on Windows") |
74 message (SEND_ERROR "Must provide PDCURSES_PATH or PDCURSES_WIN32A_PATH on Windows") |
|
75 |
|
76 if (MINGW) |
|
77 message (SEND_ERROR "This path must contain pdcurses.a in lib/, and curses.h in include/.") |
|
78 else() |
|
79 message (SEND_ERROR "This path must contain pdcurses.lib in lib/, and curses.h in include/.") |
|
80 endif() |
70 endif() |
81 endif() |
71 else() |
82 else() |
72 include_directories (${CURSES_INCUDE_DIRS}) # sic |
83 include_directories (${CURSES_INCUDE_DIRS}) # sic |
73 target_link_libraries (${TARGET_NAME} ${CURSES_LIBRARIES}) |
84 target_link_libraries (${TARGET_NAME} ${CURSES_LIBRARIES}) |
74 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -W -Wall -std=c++0x") |
85 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -W -Wall -std=c++0x") |