CMakeLists.txt

changeset 88
08ccaf26cffd
parent 87
53c2aecb9704
child 89
777b2a10b835
equal deleted inserted replaced
87:53c2aecb9704 88:08ccaf26cffd
52 include_directories (huffman) 52 include_directories (huffman)
53 add_executable (${TARGET_NAME} ${SOURCE_FILES} ${HEADER_FILES}) 53 add_executable (${TARGET_NAME} ${SOURCE_FILES} ${HEADER_FILES})
54 target_link_libraries (${TARGET_NAME} huffman) 54 target_link_libraries (${TARGET_NAME} huffman)
55 55
56 if (WIN32) 56 if (WIN32)
57 add_definitions ("/Za /D_CRT_SEURE_NO_WARNINGS") 57 add_definitions ("-D_CRT_SEURE_NO_WARNINGS")
58 target_link_libraries (${TARGET_NAME} wsock32 ws2_32)
58 59
59 if (NOT PDCURSES_WIN32A_PATH) 60 if (PDCURSES_WIN32A_PATH)
61 include_directories (${PDCURSES_WIN32A_PATH}/include)
62
63 if (MINGW)
64 target_link_libraries (${TARGET_NAME} ${PDCURSES_WIN32A_PATH}/lib/pdcurses.a)
65 else()
66 target_link_libraries (${TARGET_NAME} ${PDCURSES_WIN32A_PATH}/lib/pdcurses.lib)
67 endif()
68 else()
60 message (SEND_ERROR "Must give PDCURSES_WIN32A_PATH on Windows") 69 message (SEND_ERROR "Must give PDCURSES_WIN32A_PATH on Windows")
61 else()
62 include_directories (${PDCURSES_WIN32A_PATH}/include)
63 target_link_libraries (${TARGET_NAME} ${PDCURSES_WIN32A_PATH}/lib/pdcurses.a)
64 target_link_libraries (${TARGET_NAME} wsock32 ws2_32)
65 endif() 70 endif()
66 else() 71 else()
67 include_directories (${CURSES_INCUDE_DIRS}) # sic 72 include_directories (${CURSES_INCUDE_DIRS}) # sic
68 target_link_libraries (${TARGET_NAME} ${CURSES_LIBRARIES}) 73 target_link_libraries (${TARGET_NAME} ${CURSES_LIBRARIES})
69 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -W -Wall -std=c++0x") 74 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -W -Wall -std=c++0x")

mercurial