CMakeLists.txt

changeset 76
6de6d9a64ebd
parent 46
19be47c9bab7
child 81
a18aaf460648
equal deleted inserted replaced
75:5f8a03274d75 76:6de6d9a64ebd
1 cmake_minimum_required (VERSION 2.4) 1 cmake_minimum_required (VERSION 2.4)
2 project (zfc9000) 2 project (zfc9000)
3
4 add_library (huffman STATIC
5 huffman/bitreader.cpp
6 huffman/bitwriter.cpp
7 huffman/huffcodec.cpp
8 huffman/huffman.cpp
9 )
3 10
4 set (SOURCE_FILES 11 set (SOURCE_FILES
5 sources/coloredline.cpp 12 sources/coloredline.cpp
6 sources/format.cpp 13 sources/format.cpp
7 sources/interface.cpp 14 sources/interface.cpp
11 sources/version.cpp 18 sources/version.cpp
12 sources/network/bytestream.cpp 19 sources/network/bytestream.cpp
13 sources/network/ipaddress.cpp 20 sources/network/ipaddress.cpp
14 sources/network/rconsession.cpp 21 sources/network/rconsession.cpp
15 sources/network/udpsocket.cpp 22 sources/network/udpsocket.cpp
16 sources/huffman/bitreader.cpp
17 sources/huffman/bitwriter.cpp
18 sources/huffman/huffcodec.cpp
19 sources/huffman/huffman.cpp
20 ) 23 )
21 24
22 set (CURSES_NEED_NCURSES, True) 25 set (CURSES_NEED_NCURSES, True)
23 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")
24 find_package (Curses) 27 find_package (Curses)
25 include_directories (${CURSES_INCUDE_DIRS}) 28 include_directories (${CURSES_INCUDE_DIRS})
26 include_directories (${CMAKE_CURRENT_BINARY_DIR}) 29 include_directories (${CMAKE_CURRENT_BINARY_DIR})
30 include_directories (huffman)
27 add_executable (${PROJECT_NAME} ${SOURCE_FILES}) 31 add_executable (${PROJECT_NAME} ${SOURCE_FILES})
28 target_link_libraries (${PROJECT_NAME} ${CURSES_LIBRARIES}) 32 target_link_libraries (${PROJECT_NAME} ${CURSES_LIBRARIES} huffman)
29 33
30 add_custom_target (make_hginfo_h 34 add_custom_target (make_hginfo_h
31 COMMAND python 35 COMMAND python
32 "${CMAKE_SOURCE_DIR}/updaterevision/updaterevision.py" 36 "${CMAKE_SOURCE_DIR}/updaterevision/updaterevision.py"
33 "${CMAKE_CURRENT_BINARY_DIR}/hginfo.h") 37 "${CMAKE_CURRENT_BINARY_DIR}/hginfo.h")

mercurial