CMakeLists.txt

changeset 76
6de6d9a64ebd
parent 46
19be47c9bab7
child 81
a18aaf460648
--- a/CMakeLists.txt	Fri May 15 20:10:44 2015 +0300
+++ b/CMakeLists.txt	Fri May 15 20:13:36 2015 +0300
@@ -1,6 +1,13 @@
 cmake_minimum_required (VERSION 2.4)
 project (zfc9000)
 
+add_library (huffman STATIC
+	huffman/bitreader.cpp
+	huffman/bitwriter.cpp
+	huffman/huffcodec.cpp
+	huffman/huffman.cpp
+)
+
 set (SOURCE_FILES
 	sources/coloredline.cpp
 	sources/format.cpp
@@ -13,10 +20,6 @@
 	sources/network/ipaddress.cpp
 	sources/network/rconsession.cpp
 	sources/network/udpsocket.cpp
-	sources/huffman/bitreader.cpp
-	sources/huffman/bitwriter.cpp
-	sources/huffman/huffcodec.cpp
-	sources/huffman/huffman.cpp
 )
 
 set (CURSES_NEED_NCURSES, True)
@@ -24,8 +27,9 @@
 find_package (Curses)
 include_directories (${CURSES_INCUDE_DIRS})
 include_directories (${CMAKE_CURRENT_BINARY_DIR})
+include_directories (huffman)
 add_executable (${PROJECT_NAME} ${SOURCE_FILES})
-target_link_libraries (${PROJECT_NAME} ${CURSES_LIBRARIES})
+target_link_libraries (${PROJECT_NAME} ${CURSES_LIBRARIES} huffman)
 
 add_custom_target (make_hginfo_h
 	COMMAND python

mercurial