summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2013-07-12 18:10:43 -0700
committerirungentoo <irungentoo@gmail.com>2013-07-12 18:10:43 -0700
commit4899be84d198d8300a8623eea0c5bc1fcaac1c4a (patch)
tree4c6db010def5c2f815628bb82043f8a7f204c39d /CMakeLists.txt
parente21e414248bb66e9f57cb1318708792e3fb33255 (diff)
parent573c88df440125785adf1435d41932daea7aa727 (diff)
Merge pull request #31 from nurupo/master
Fixed cmake and Travis
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt29
1 files changed, 15 insertions, 14 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 06bde84a..841b756a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,30 +1,31 @@
1cmake_minimum_required(VERSION 2.6.0) 1cmake_minimum_required(VERSION 2.6.0)
2project(TOX C) 2project(TOX C)
3 3
4set(exe_name toxMessengerTest)
5
4set(core_sources 6set(core_sources
5 core/DHT.c 7 core/DHT.c
6 core/network.c 8 core/network.c
7 core/Lossless_UDP.c 9 core/Lossless_UDP.c
8 core/net_crypto.c 10 core/net_crypto.c
9 core/Messenger.c) 11 core/Messenger.c)
10 12
11set(test_sources 13set(test_sources
12 testing/Messenger_test.c) 14 testing/Messenger_test.c)
13
14set(exe_name TOX-app)
15
16 15
17add_executable(${exe_name} 16add_executable(${exe_name}
18 ${core_sources} 17 ${core_sources}
19 ${test_sources}) 18 ${test_sources})
20 19
21if(WIN32) 20if(WIN32)
22 target_link_libraries(${exe_name} ws2_32 libsodium) 21 include_directories(${TOX_SOURCE_DIR}/sodium/include/)
23else(WIN32) 22 target_link_libraries(${exe_name} ws2_32
24 target_link_libraries(libsodium) 23 ${CMAKE_SOURCE_DIR}/sodium/lib/libsodium.a)
25endif(WIN32) 24else()
25 target_link_libraries(${exe_name} sodium)
26endif()
26 27
27if(CMAKE_COMPILER_IS_GNUCC) 28if(CMAKE_COMPILER_IS_GNUCC)
28 message(STATUS "==== GCC detected - Adding compiler flags") 29 message(STATUS "==== GCC detected - Adding compiler flags ====")
29 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror") 30 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror")
30endif() \ No newline at end of file 31endif()