diff options
author | irungentoo <irungentoo@gmail.com> | 2013-07-12 18:10:43 -0700 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2013-07-12 18:10:43 -0700 |
commit | 4899be84d198d8300a8623eea0c5bc1fcaac1c4a (patch) | |
tree | 4c6db010def5c2f815628bb82043f8a7f204c39d /CMakeLists.txt | |
parent | e21e414248bb66e9f57cb1318708792e3fb33255 (diff) | |
parent | 573c88df440125785adf1435d41932daea7aa727 (diff) |
Merge pull request #31 from nurupo/master
Fixed cmake and Travis
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 29 |
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 @@ | |||
1 | cmake_minimum_required(VERSION 2.6.0) | 1 | cmake_minimum_required(VERSION 2.6.0) |
2 | project(TOX C) | 2 | project(TOX C) |
3 | 3 | ||
4 | set(exe_name toxMessengerTest) | ||
5 | |||
4 | set(core_sources | 6 | set(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 | ||
11 | set(test_sources | 13 | set(test_sources |
12 | testing/Messenger_test.c) | 14 | testing/Messenger_test.c) |
13 | |||
14 | set(exe_name TOX-app) | ||
15 | |||
16 | 15 | ||
17 | add_executable(${exe_name} | 16 | add_executable(${exe_name} |
18 | ${core_sources} | 17 | ${core_sources} |
19 | ${test_sources}) | 18 | ${test_sources}) |
20 | 19 | ||
21 | if(WIN32) | 20 | if(WIN32) |
22 | target_link_libraries(${exe_name} ws2_32 libsodium) | 21 | include_directories(${TOX_SOURCE_DIR}/sodium/include/) |
23 | else(WIN32) | 22 | target_link_libraries(${exe_name} ws2_32 |
24 | target_link_libraries(libsodium) | 23 | ${CMAKE_SOURCE_DIR}/sodium/lib/libsodium.a) |
25 | endif(WIN32) | 24 | else() |
25 | target_link_libraries(${exe_name} sodium) | ||
26 | endif() | ||
26 | 27 | ||
27 | if(CMAKE_COMPILER_IS_GNUCC) | 28 | if(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") |
30 | endif() \ No newline at end of file | 31 | endif() |