mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Fixed cmake and Travis
This commit is contained in:
parent
e21e414248
commit
573c88df44
13
.travis.yml
13
.travis.yml
|
@ -5,21 +5,22 @@ compiler:
|
||||||
before_script:
|
before_script:
|
||||||
- git clone git://github.com/jedisct1/libsodium.git
|
- git clone git://github.com/jedisct1/libsodium.git
|
||||||
- cd libsodium
|
- cd libsodium
|
||||||
|
- git checkout tags/0.4.2
|
||||||
- ./autogen.sh
|
- ./autogen.sh
|
||||||
- ./configure && make -j 3 check
|
- ./configure && make -j3 check
|
||||||
|
- sudo make install
|
||||||
|
- sudo ldconfig
|
||||||
- cd ..
|
- cd ..
|
||||||
|
|
||||||
script:
|
script:
|
||||||
#- cmake CMakeLists.txt
|
- cmake CMakeLists.txt
|
||||||
#- make -j3
|
- make -j3
|
||||||
- gcc -o test -Wall -Werror -Ilibsodium/src/libsodium/include/ core/*.c libsodium/src/libsodium/.libs/libsodium.a testing/Messenger_test.c
|
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email: false
|
email: false
|
||||||
|
|
||||||
irc:
|
irc:
|
||||||
channels:
|
channels:
|
||||||
- "chat.freenode.net#InsertProjectNameHere"
|
- "chat.freenode.net#InsertProjectNameHere"
|
||||||
on_success: always
|
on_success: always
|
||||||
on_failure: always
|
on_failure: always
|
||||||
|
|
||||||
|
|
|
@ -1,30 +1,31 @@
|
||||||
cmake_minimum_required(VERSION 2.6.0)
|
cmake_minimum_required(VERSION 2.6.0)
|
||||||
project(TOX C)
|
project(TOX C)
|
||||||
|
|
||||||
|
set(exe_name toxMessengerTest)
|
||||||
|
|
||||||
set(core_sources
|
set(core_sources
|
||||||
core/DHT.c
|
core/DHT.c
|
||||||
core/network.c
|
core/network.c
|
||||||
core/Lossless_UDP.c
|
core/Lossless_UDP.c
|
||||||
core/net_crypto.c
|
core/net_crypto.c
|
||||||
core/Messenger.c)
|
core/Messenger.c)
|
||||||
|
|
||||||
set(test_sources
|
set(test_sources
|
||||||
testing/Messenger_test.c)
|
testing/Messenger_test.c)
|
||||||
|
|
||||||
set(exe_name TOX-app)
|
|
||||||
|
|
||||||
|
|
||||||
add_executable(${exe_name}
|
add_executable(${exe_name}
|
||||||
${core_sources}
|
${core_sources}
|
||||||
${test_sources})
|
${test_sources})
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
target_link_libraries(${exe_name} ws2_32 libsodium)
|
include_directories(${TOX_SOURCE_DIR}/sodium/include/)
|
||||||
else(WIN32)
|
target_link_libraries(${exe_name} ws2_32
|
||||||
target_link_libraries(libsodium)
|
${CMAKE_SOURCE_DIR}/sodium/lib/libsodium.a)
|
||||||
endif(WIN32)
|
else()
|
||||||
|
target_link_libraries(${exe_name} sodium)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(CMAKE_COMPILER_IS_GNUCC)
|
if(CMAKE_COMPILER_IS_GNUCC)
|
||||||
message(STATUS "==== GCC detected - Adding compiler flags")
|
message(STATUS "==== GCC detected - Adding compiler flags ====")
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror")
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user