Tue, 26 May 2015 11:41:58 +0300
Allow compilation on Windows/MinGW
1
4dd5bde4e777
- a whole lot of supplementary source code!!
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
1 | cmake_minimum_required (VERSION 2.4) |
81
a18aaf460648
Allow compilation on Windows/MinGW
Teemu Piippo <crimsondusk64@gmail.com>
parents:
76
diff
changeset
|
2 | cmake_policy (SET CMP0003 NEW) |
35
413a7de58398
- project renamed to zfc9000 (credit to TerminusEst13 for the name!) :cactus:
Teemu Piippo <crimsondusk64@gmail.com>
parents:
14
diff
changeset
|
3 | project (zfc9000) |
1
4dd5bde4e777
- a whole lot of supplementary source code!!
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
4 | |
76
6de6d9a64ebd
- moved huffman from sources/ to top level because it's external
Teemu Piippo <crimsondusk64@gmail.com>
parents:
46
diff
changeset
|
5 | add_library (huffman STATIC |
6de6d9a64ebd
- moved huffman from sources/ to top level because it's external
Teemu Piippo <crimsondusk64@gmail.com>
parents:
46
diff
changeset
|
6 | huffman/bitreader.cpp |
6de6d9a64ebd
- moved huffman from sources/ to top level because it's external
Teemu Piippo <crimsondusk64@gmail.com>
parents:
46
diff
changeset
|
7 | huffman/bitwriter.cpp |
6de6d9a64ebd
- moved huffman from sources/ to top level because it's external
Teemu Piippo <crimsondusk64@gmail.com>
parents:
46
diff
changeset
|
8 | huffman/huffcodec.cpp |
6de6d9a64ebd
- moved huffman from sources/ to top level because it's external
Teemu Piippo <crimsondusk64@gmail.com>
parents:
46
diff
changeset
|
9 | huffman/huffman.cpp |
6de6d9a64ebd
- moved huffman from sources/ to top level because it's external
Teemu Piippo <crimsondusk64@gmail.com>
parents:
46
diff
changeset
|
10 | ) |
6de6d9a64ebd
- moved huffman from sources/ to top level because it's external
Teemu Piippo <crimsondusk64@gmail.com>
parents:
46
diff
changeset
|
11 | |
1
4dd5bde4e777
- a whole lot of supplementary source code!!
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
12 | set (SOURCE_FILES |
46
19be47c9bab7
- renamed RendererLine to ColoredLine and split it into its own files
Teemu Piippo <crimsondusk64@gmail.com>
parents:
37
diff
changeset
|
13 | sources/coloredline.cpp |
1
4dd5bde4e777
- a whole lot of supplementary source code!!
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
14 | sources/format.cpp |
14
33b8f428bacb
- begin work on interface - input line works for the most part :)
Teemu Piippo <crimsondusk64@gmail.com>
parents:
10
diff
changeset
|
15 | sources/interface.cpp |
1
4dd5bde4e777
- a whole lot of supplementary source code!!
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
16 | sources/main.cpp |
10
3874575d924d
- begin work on rcon sessions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
8
diff
changeset
|
17 | sources/md5.cpp |
1
4dd5bde4e777
- a whole lot of supplementary source code!!
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
18 | sources/mystring.cpp |
4dd5bde4e777
- a whole lot of supplementary source code!!
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
19 | sources/version.cpp |
5 | 20 | sources/network/bytestream.cpp |
21 | sources/network/ipaddress.cpp | |
10
3874575d924d
- begin work on rcon sessions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
8
diff
changeset
|
22 | sources/network/rconsession.cpp |
6 | 23 | sources/network/udpsocket.cpp |
1
4dd5bde4e777
- a whole lot of supplementary source code!!
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
24 | ) |
4dd5bde4e777
- a whole lot of supplementary source code!!
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
25 | |
4dd5bde4e777
- a whole lot of supplementary source code!!
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
26 | set (CURSES_NEED_NCURSES, True) |
4dd5bde4e777
- a whole lot of supplementary source code!!
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
27 | set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -W -Wall") |
81
a18aaf460648
Allow compilation on Windows/MinGW
Teemu Piippo <crimsondusk64@gmail.com>
parents:
76
diff
changeset
|
28 | |
a18aaf460648
Allow compilation on Windows/MinGW
Teemu Piippo <crimsondusk64@gmail.com>
parents:
76
diff
changeset
|
29 | if (NOT WIN32) |
a18aaf460648
Allow compilation on Windows/MinGW
Teemu Piippo <crimsondusk64@gmail.com>
parents:
76
diff
changeset
|
30 | find_package (Curses) |
a18aaf460648
Allow compilation on Windows/MinGW
Teemu Piippo <crimsondusk64@gmail.com>
parents:
76
diff
changeset
|
31 | endif() |
a18aaf460648
Allow compilation on Windows/MinGW
Teemu Piippo <crimsondusk64@gmail.com>
parents:
76
diff
changeset
|
32 | |
a18aaf460648
Allow compilation on Windows/MinGW
Teemu Piippo <crimsondusk64@gmail.com>
parents:
76
diff
changeset
|
33 | if (MINGW) |
a18aaf460648
Allow compilation on Windows/MinGW
Teemu Piippo <crimsondusk64@gmail.com>
parents:
76
diff
changeset
|
34 | set (CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -static") |
a18aaf460648
Allow compilation on Windows/MinGW
Teemu Piippo <crimsondusk64@gmail.com>
parents:
76
diff
changeset
|
35 | endif() |
a18aaf460648
Allow compilation on Windows/MinGW
Teemu Piippo <crimsondusk64@gmail.com>
parents:
76
diff
changeset
|
36 | |
1
4dd5bde4e777
- a whole lot of supplementary source code!!
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
37 | include_directories (${CURSES_INCUDE_DIRS}) |
4dd5bde4e777
- a whole lot of supplementary source code!!
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
38 | include_directories (${CMAKE_CURRENT_BINARY_DIR}) |
76
6de6d9a64ebd
- moved huffman from sources/ to top level because it's external
Teemu Piippo <crimsondusk64@gmail.com>
parents:
46
diff
changeset
|
39 | include_directories (huffman) |
1
4dd5bde4e777
- a whole lot of supplementary source code!!
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
40 | add_executable (${PROJECT_NAME} ${SOURCE_FILES}) |
81
a18aaf460648
Allow compilation on Windows/MinGW
Teemu Piippo <crimsondusk64@gmail.com>
parents:
76
diff
changeset
|
41 | target_link_libraries (${PROJECT_NAME} huffman) |
a18aaf460648
Allow compilation on Windows/MinGW
Teemu Piippo <crimsondusk64@gmail.com>
parents:
76
diff
changeset
|
42 | |
a18aaf460648
Allow compilation on Windows/MinGW
Teemu Piippo <crimsondusk64@gmail.com>
parents:
76
diff
changeset
|
43 | if (NOT WIN32) |
a18aaf460648
Allow compilation on Windows/MinGW
Teemu Piippo <crimsondusk64@gmail.com>
parents:
76
diff
changeset
|
44 | target_link_libraries (${PROJECT_NAME} ${CURSES_LIBRARIES}) |
a18aaf460648
Allow compilation on Windows/MinGW
Teemu Piippo <crimsondusk64@gmail.com>
parents:
76
diff
changeset
|
45 | else() |
a18aaf460648
Allow compilation on Windows/MinGW
Teemu Piippo <crimsondusk64@gmail.com>
parents:
76
diff
changeset
|
46 | target_link_libraries (${PROJECT_NAME} ${CMAKE_CURRENT_BINARY_DIR}/pdcurses.a wsock32 ws2_32) |
a18aaf460648
Allow compilation on Windows/MinGW
Teemu Piippo <crimsondusk64@gmail.com>
parents:
76
diff
changeset
|
47 | endif() |
1
4dd5bde4e777
- a whole lot of supplementary source code!!
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
48 | |
4dd5bde4e777
- a whole lot of supplementary source code!!
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
49 | add_custom_target (make_hginfo_h |
4dd5bde4e777
- a whole lot of supplementary source code!!
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
50 | COMMAND python |
4dd5bde4e777
- a whole lot of supplementary source code!!
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
51 | "${CMAKE_SOURCE_DIR}/updaterevision/updaterevision.py" |
4dd5bde4e777
- a whole lot of supplementary source code!!
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
52 | "${CMAKE_CURRENT_BINARY_DIR}/hginfo.h") |
4dd5bde4e777
- a whole lot of supplementary source code!!
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
53 | add_dependencies (${PROJECT_NAME} make_hginfo_h) |