summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Biro <nurupo.contributions@gmail.com>2013-07-12 18:31:57 -0400
committerMaxim Biro <nurupo.contributions@gmail.com>2013-07-12 21:06:22 -0400
commit573c88df440125785adf1435d41932daea7aa727 (patch)
tree4c6db010def5c2f815628bb82043f8a7f204c39d
parente21e414248bb66e9f57cb1318708792e3fb33255 (diff)
Fixed cmake and Travis
-rw-r--r--.travis.yml13
-rw-r--r--CMakeLists.txt29
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:
5before_script: 5before_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
12script: 15script:
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
17notifications: 19notifications:
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 @@
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()