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