summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt16
1 files changed, 11 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 26f56e4c..c1fa8cad 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,17 +1,23 @@
1cmake_minimum_required(VERSION 2.6.0) 1cmake_minimum_required(VERSION 2.6.0)
2project(TOX) 2project(TOX C)
3 3
4set(core_sources 4set(core_sources
5 core/DHT.c) 5 core/DHT.c)
6 6
7set(test_sources 7set(test_sources
8 testing/DHT_test.c) 8 testing/DHT_test.c)
9
10set(exe_name TOX-app)
9 11
10add_executable(TOX-app 12add_executable(${exe_name}
11 ${core_sources} 13 ${core_sources}
12 ${test_sources}) 14 ${test_sources})
13 15
14
15if(WIN32) 16if(WIN32)
16 target_link_libraries(TOX-app ws2_32) 17 target_link_libraries(${exe_name} ws2_32)
17endif(WIN32) \ No newline at end of file 18endif()
19
20if(CMAKE_COMPILER_IS_GNUCC)
21 message(STATUS "==== GCC detected - Adding compiler flags")
22 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror")
23endif() \ No newline at end of file