diff options
author | Maxim Biro <nurupo.contributions@gmail.com> | 2013-07-12 18:31:57 -0400 |
---|---|---|
committer | Maxim Biro <nurupo.contributions@gmail.com> | 2013-07-12 21:06:22 -0400 |
commit | 573c88df440125785adf1435d41932daea7aa727 (patch) | |
tree | 4c6db010def5c2f815628bb82043f8a7f204c39d | |
parent | e21e414248bb66e9f57cb1318708792e3fb33255 (diff) |
Fixed cmake and Travis
-rw-r--r-- | .travis.yml | 13 | ||||
-rw-r--r-- | CMakeLists.txt | 29 |
2 files changed, 22 insertions, 20 deletions
diff --git a/.travis.yml b/.travis.yml index a0d3833a..a304a0a4 100644 --- a/.travis.yml +++ b/.travis.yml | |||
@@ -5,21 +5,22 @@ compiler: | |||
5 | before_script: | 5 | before_script: |
6 | - git clone git://github.com/jedisct1/libsodium.git | 6 | - git clone git://github.com/jedisct1/libsodium.git |
7 | - cd libsodium | 7 | - cd libsodium |
8 | - git checkout tags/0.4.2 | ||
8 | - ./autogen.sh | 9 | - ./autogen.sh |
9 | - ./configure && make -j 3 check | 10 | - ./configure && make -j3 check |
11 | - sudo make install | ||
12 | - sudo ldconfig | ||
10 | - cd .. | 13 | - cd .. |
11 | 14 | ||
12 | script: | 15 | script: |
13 | #- cmake CMakeLists.txt | 16 | - cmake CMakeLists.txt |
14 | #- make -j3 | 17 | - make -j3 |
15 | - gcc -o test -Wall -Werror -Ilibsodium/src/libsodium/include/ core/*.c libsodium/src/libsodium/.libs/libsodium.a testing/Messenger_test.c | ||
16 | 18 | ||
17 | notifications: | 19 | notifications: |
18 | email: false | 20 | email: false |
19 | 21 | ||
20 | irc: | 22 | irc: |
21 | channels: | 23 | channels: |
22 | - "chat.freenode.net#InsertProjectNameHere" | 24 | - "chat.freenode.net#InsertProjectNameHere" |
23 | on_success: always | 25 | on_success: always |
24 | on_failure: always | 26 | on_failure: always |
25 | |||
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() |