22 sources/network/udpsocket.cpp |
22 sources/network/udpsocket.cpp |
23 ) |
23 ) |
24 |
24 |
25 set (CURSES_NEED_NCURSES, True) |
25 set (CURSES_NEED_NCURSES, True) |
26 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -W -Wall") |
26 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -W -Wall") |
27 find_package (Curses) |
27 |
|
28 if (NOT WIN32) |
|
29 find_package (Curses) |
|
30 endif() |
|
31 |
|
32 if (MINGW) |
|
33 set (CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -static") |
|
34 endif() |
|
35 |
28 include_directories (${CURSES_INCUDE_DIRS}) |
36 include_directories (${CURSES_INCUDE_DIRS}) |
29 include_directories (${CMAKE_CURRENT_BINARY_DIR}) |
37 include_directories (${CMAKE_CURRENT_BINARY_DIR}) |
30 include_directories (huffman) |
38 include_directories (huffman) |
31 add_executable (${PROJECT_NAME} ${SOURCE_FILES}) |
39 add_executable (${PROJECT_NAME} ${SOURCE_FILES}) |
32 target_link_libraries (${PROJECT_NAME} ${CURSES_LIBRARIES} huffman) |
40 target_link_libraries (${PROJECT_NAME} huffman) |
|
41 |
|
42 if (NOT WIN32) |
|
43 target_link_libraries (${PROJECT_NAME} ${CURSES_LIBRARIES}) |
|
44 else() |
|
45 target_link_libraries (${PROJECT_NAME} ${CMAKE_CURRENT_BINARY_DIR}/pdcurses.a wsock32 ws2_32) |
|
46 endif() |
33 |
47 |
34 add_custom_target (make_hginfo_h |
48 add_custom_target (make_hginfo_h |
35 COMMAND python |
49 COMMAND python |
36 "${CMAKE_SOURCE_DIR}/updaterevision/updaterevision.py" |
50 "${CMAKE_SOURCE_DIR}/updaterevision/updaterevision.py" |
37 "${CMAKE_CURRENT_BINARY_DIR}/hginfo.h") |
51 "${CMAKE_CURRENT_BINARY_DIR}/hginfo.h") |