Skip to content
This repository has been archived by the owner on Apr 8, 2020. It is now read-only.

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
Fixed travis.
  • Loading branch information
giancarlopro committed Mar 7, 2018
2 parents af0ebf8 + b34905a commit b74badf
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 27 deletions.
13 changes: 4 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
dist: trusty
sudo: require
language: cpp
language: c
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-6
- g++-6
- cmake
- libjansson-dev
- libssl-dev
- libcurl4-openssl-dev
- openssl
script:
- sudo ln -s /usr/bin/gcc-6 /usr/local/bin/gcc
- sudo ln -s /usr/bin/g++-6 /usr/local/bin/g++
- export CC=/usr/bin/gcc-6
- export CXX=/usr/bin/g++-6
- git clone https://github.com/curl/curl.git && cd curl && ./buildconf && ./configure && make && sudo make install && cd ..
- git clone https://github.com/akheron/jansson.git && cd jansson && autoreconf -i && ./configure && make && sudo make install && cd ..
- bash ./scripts/deploy-script.sh
deploy:
provider: releases
Expand Down
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ project(FramebotFramework)

find_package(OpenSSL REQUIRED)

set(curl /usr/local/lib/libcurl.so)

add_subdirectory(src)
add_subdirectory(test)
add_subdirectory(examples)
Expand Down
2 changes: 1 addition & 1 deletion examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ project(ExampleBots)
include_directories (${PROJECT_SOURCE_DIR}/../include)

add_executable(echo echo.c)
target_link_libraries(echo jansson libcurl.so framebot)
target_link_libraries(echo jansson ${curl} framebot)
3 changes: 1 addition & 2 deletions scripts/deploy-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ cd src

zip framebot-bin.zip libframebot.a libframebot_.so

cd ../../
ls -LR
cd ../../
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ include_directories (${PROJECT_SOURCE_DIR}/../include)

if(CMAKE_SYSTEM_NAME STREQUAL Linux)
add_library(framebot_ SHARED framebot.c memory.c objects.c json.c network.c format.c util.c)
target_link_libraries(framebot_ jansson libcurl.so)
target_link_libraries(framebot_ jansson ${curl})

add_library(framebot STATIC framebot.c memory.c objects.c json.c network.c format.c util.c)
target_link_libraries(framebot jansson libcurl.so)
target_link_libraries(framebot jansson ${curl})

install(TARGETS framebot_ LIBRARY DESTINATION lib)
install(TARGETS framebot ARCHIVE DESTINATION lib)
Expand Down
26 changes: 13 additions & 13 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ add_executable(sendmessage test_sendmessage.c)
add_executable(all_api test_api.c)

if (CMAKE_SYSTEM_NAME STREQUAL Linux)
target_link_libraries(test_lib jansson libcurl.so framebot)
target_link_libraries(libtest jansson libcurl.so framebot)
target_link_libraries(update jansson libcurl.so framebot)
target_link_libraries(file jansson libcurl.so framebot)
target_link_libraries(userprofilephotos jansson libcurl.so framebot)
target_link_libraries(sendphotos jansson libcurl.so framebot)
target_link_libraries(sendaudio jansson libcurl.so framebot)
target_link_libraries(senddocument jansson libcurl.so framebot)
target_link_libraries(sendvideo jansson libcurl.so framebot)
target_link_libraries(sendvoice jansson libcurl.so framebot)
target_link_libraries(sendvideonote jansson libcurl.so framebot)
target_link_libraries(sendmessage jansson libcurl.so framebot)
target_link_libraries(all_api jansson libcurl.so framebot)
target_link_libraries(test_lib jansson ${curl} framebot)
target_link_libraries(libtest jansson ${curl} framebot)
target_link_libraries(update jansson ${curl} framebot)
target_link_libraries(file jansson ${curl} framebot)
target_link_libraries(userprofilephotos jansson ${curl} framebot)
target_link_libraries(sendphotos jansson ${curl} framebot)
target_link_libraries(sendaudio jansson ${curl} framebot)
target_link_libraries(senddocument jansson ${curl} framebot)
target_link_libraries(sendvideo jansson ${curl} framebot)
target_link_libraries(sendvoice jansson ${curl} framebot)
target_link_libraries(sendvideonote jansson ${curl} framebot)
target_link_libraries(sendmessage jansson ${curl} framebot)
target_link_libraries(all_api jansson ${curl} framebot)
endif (CMAKE_SYSTEM_NAME STREQUAL Linux)

if (WIN32)
Expand Down

0 comments on commit b74badf

Please sign in to comment.