Skip to content
Snippets Groups Projects
Commit bb52c1b3 authored by Sergei Rashitov's avatar Sergei Rashitov
Browse files

Merge submodule into libdap-client

parents 92e3aba1 12da10e0
No related branches found
No related tags found
1 merge request!24Support 3689
Showing
with 776 additions and 1 deletion
Subproject commit c0ddc196c0b7e2977fb17cf563d4567f62d5f183
# Prerequisites
*.d
# Object files
*.o
*.ko
*.obj
*.elf
# Linker output
*.ilk
*.map
*.exp
# Precompiled Headers
*.gch
*.pch
# Libraries
*.lib
*.a
*.la
*.lo
# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib
# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex
# Debug files
*.dSYM/
*.su
*.idb
*.pdb
# Kernel Module Compile Results
*.mod*
*.cmd
.tmp_versions/
modules.order
Module.symvers
Mkfile.old
dkms.conf
/build/
/.cproject
/.project
[submodule "libdap"]
path = libdap
url = https://gitlab.demlabs.net/cellframe/libdap
branch = master
[submodule "libdap-crypto"]
path = libdap-crypto
url = https://gitlab.demlabs.net/cellframe/libdap-crypto
branch = master
[submodule "libdap-server-core"]
path = libdap-server-core
url = https://gitlab.demlabs.net/cellframe/libdap-server-core
branch = master
[submodule "libdap-server"]
path = libdap-server
url = https://gitlab.demlabs.net/cellframe/libdap-server
branch = master
[submodule "libdap-stream"]
path = libdap-stream
url = https://gitlab.demlabs.net/cellframe/libdap-stream
branch = master
[submodule "libdap-stream-ch"]
path = libdap-stream-ch
url = https://gitlab.demlabs.net/cellframe/libdap-stream-ch
branch = master
[submodule "test/libdap-test"]
path = test/libdap-test
url = https://gitlab.demlabs.net/cellframe/libdap-test
branch = master
[submodule "libdap-stream-ch-chain"]
path = libdap-stream-ch-chain
url = https://gitlab.demlabs.net/cellframe/libdap-stream-ch-chain
branch = master
[submodule "libdap-server-udp"]
path = libdap-server-udp
url = https://gitlab.demlabs.net/cellframe/libdap-server-udp
branch = master
sudo: required
language: c
compiler: gcc
dist: xenial
notifications:
email: false
before_install:
- git submodule init
- git submodule update
script:
- mkdir build
- cd build
- cmake -DBUILD_DAP_CLIENT_TESTS=ON ../
- make
- ctest --verbose
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libjson-c-dev
- libev-dev
- libmagic-dev
cmake_minimum_required(VERSION 3.0)
project(dap_client)
add_definitions ("-D_GNU_SOURCE")
if(NOT SUBMODULES_NO_BUILD)
if ( NOT ( TARGET dap_core ) )
add_subdirectory(libdap)
endif()
if ( NOT ( TARGET dap_crypto ) )
add_subdirectory(libdap-crypto)
endif()
if ( NOT ( TARGET dap_server_core ) )
add_subdirectory(libdap-server-core)
endif()
if ( NOT ( TARGET dap_server ) )
add_subdirectory(libdap-server)
endif()
if ( NOT ( TARGET dap_udp_server ) )
add_subdirectory(libdap-server-udp)
endif()
if ( NOT ( TARGET libdap-stream ) )
add_subdirectory(libdap-stream)
endif()
if ( NOT ( TARGET dap_stream_ch ) )
add_subdirectory(libdap-stream-ch)
endif()
endif()
file(GLOB DAP_CLIENT_SOURCES src/*.c)
file(GLOB DAP_CLIENT_HEADERS include/*.h)
if(WIN32)
include_directories(../3rdparty/wepoll/)
include_directories(../3rdparty/uthash/src/)
#include_directories(../3rdparty/curl/include/)
#add_subdirectory(libev)
endif()
add_library(${PROJECT_NAME} STATIC ${DAP_CLIENT_HEADERS} ${DAP_CLIENT_SOURCES})
target_link_libraries(${PROJECT_NAME} dap_core dap_crypto dap_server_core dap_udp_server dap_http_server dap_enc_server dap_stream dap_session dap_stream_ch json-c)
if(UNIX AND NOT ANDROID)
target_link_libraries(${PROJECT_NAME} ev)
endif()
target_include_directories(${PROJECT_NAME} PUBLIC include)
target_include_directories(${PROJECT_NAME} PRIVATE src)
if (${BUILD_DAP_CLIENT_TESTS} MATCHES ON)
enable_testing()
add_subdirectory(test)
endif()
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
# libdap-client
[![Build Status](https://travis-ci.com/kelvinblockchain/libdap-client.svg?branch=master)](https://travis-ci.com/kelvinblockchain/libdap-client)
DAP client
/*
* Authors:
* Dmitriy A. Gearasimov <gerasimov.dmitriy@demlabs.net>
* DeM Labs Inc. https://demlabs.net
* Kelvin Project https://github.com/kelvinblockchain
* Copyright (c) 2017-2019
* All rights reserved.
This file is part of DAP (Deus Applications Prototypes) the open source project
DAP (Deus Applicaions Prototypes) is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
DAP is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with any DAP based project. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <stdint.h>
#include "dap_enc_key.h"
#include "dap_events.h"
#include "dap_stream.h"
#include "dap_stream_ch.h"
/**
* @brief The dap_client_stage enum. Top level of client's state machine
**/
typedef enum dap_client_stage {
STAGE_BEGIN=0,
STAGE_ENC_INIT=1,
STAGE_STREAM_CTL=2,
STAGE_STREAM_SESSION=3,
STAGE_STREAM_CONNECTED=4,
STAGE_STREAM_STREAMING=5,
STAGE_STREAM_ABORT=10
} dap_client_stage_t;
typedef enum dap_client_stage_status {
STAGE_STATUS_NONE=0,
// Enc init stage
STAGE_STATUS_IN_PROGRESS,
STAGE_STATUS_ABORTING,
STAGE_STATUS_ERROR,
STAGE_STATUS_DONE,
} dap_client_stage_status_t;
typedef enum dap_client_error {
ERROR_NO_ERROR = 0,
ERROR_ENC_NO_KEY,
ERROR_ENC_WRONG_KEY,
ERROR_STREAM_CTL_ERROR,
ERROR_STREAM_CTL_ERROR_AUTH,
ERROR_STREAM_CTL_ERROR_RESPONSE_FORMAT,
ERROR_STREAM_RESPONSE_WRONG,
ERROR_STREAM_RESPONSE_TIMEOUT,
ERROR_STREAM_FREEZED,
ERROR_NETWORK_CONNECTION_REFUSE,
ERROR_NETWORK_CONNECTION_TIMEOUT
} dap_client_error_t;
#define DAP_CLIENT_PROTOCOL_VERSION 22
/**
* @brief The dap_client struct
*/
typedef struct dap_client{
pthread_mutex_t mutex;
void * _internal;
void * _inheritor;
} dap_client_t;
typedef void (*dap_client_callback_t) (dap_client_t *, void*);
typedef void (*dap_client_callback_int_t) (dap_client_t *, int);
typedef void (*dap_client_callback_data_size_t) (dap_client_t *, void *, size_t);
#define DAP_UPLINK_PATH_ENC_INIT "enc_init" //"1901248124123459"
#define DAP_UPLINK_PATH_DB "01094787531354"
#define DAP_UPLINK_PATH_STREAM_CTL "stream_ctl" //"091348758013553"
#define DAP_UPLINK_PATH_STREAM "stream" //"874751843144"
#define DAP_UPLINK_PATH_LICENSE "license"
//#define DAP_UPLINK_PATH_NODE_LIST "nodelist"
#define DAP_UPLINK_PATH_SERVER_LIST "slist"
#ifdef __cplusplus
extern "C" {
#endif
int dap_client_init();
void dap_client_deinit();
dap_client_t * dap_client_new(dap_events_t * a_events, dap_client_callback_t a_stage_status_callback
, dap_client_callback_t a_stage_status_error_callback );
void dap_client_set_uplink(dap_client_t * a_client,const char* a_addr, uint16_t a_port);
const char* dap_client_get_uplink_addr(dap_client_t * a_client);
uint16_t dap_client_get_uplink_port(dap_client_t * a_client);
void dap_client_delete(dap_client_t * a_client);
dap_enc_key_t * dap_client_get_key_stream(dap_client_t * a_client);
void dap_client_go_stage(dap_client_t * a_client, dap_client_stage_t a_stage_end, dap_client_callback_t a_stage_end_callback);
void dap_client_reset(dap_client_t * a_client);
void dap_client_request_enc(dap_client_t * a_client, const char * a_path,const char * a_suburl,const char* a_query, void * a_request, size_t a_request_size,
dap_client_callback_data_size_t a_response_proc, dap_client_callback_int_t a_response_error);
void dap_client_request(dap_client_t * a_client, const char * a_full_path, void * a_request, size_t a_request_size,
dap_client_callback_data_size_t a_response_proc, dap_client_callback_int_t a_response_error);
//int dap_client_disconnect(dap_client_t * a_client);
const char * dap_client_get_stage_str(dap_client_t * a_client);
const char * dap_client_stage_str(dap_client_stage_t a_stage);
const char * dap_client_get_stage_status_str(dap_client_t * a_client);
const char * dap_client_stage_status_str(dap_client_stage_status_t a_stage_status);
const char * dap_client_error_str(dap_client_error_t a_client_error);
const char * dap_client_get_error_str(dap_client_t * a_client);
const char * dap_client_get_auth_cookie(dap_client_t * a_client);
dap_stream_t * dap_client_get_stream(dap_client_t * a_client);
dap_stream_ch_t * dap_client_get_stream_ch(dap_client_t * a_client, uint8_t a_ch_id);
const char * dap_client_get_stream_id(dap_client_t * a_client);
void dap_client_set_active_channels (dap_client_t * a_client, const char * a_active_channels);
dap_client_stage_t dap_client_get_stage(dap_client_t * a_client);
dap_client_stage_status_t dap_client_get_stage_status(dap_client_t * a_client);
#define DAP_CLIENT(a) (a ? (dap_client_t *) (a)->_inheritor : NULL)
#ifdef __cplusplus
}
#endif
/*
* Authors:
* Alexander Lysikov <alexander.lysikov@demlabs.net>
* DeM Labs Inc. https://demlabs.net
This file is part of DAP (Deus Applications Prototypes) the open source project
DAP (Deus Applicaions Prototypes) is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
DAP is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with any DAP based project. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef void (*dap_client_http_callback_error_t)(int, void *); // Callback for specific http client operations
typedef void (*dap_client_http_callback_data_t)(void *, size_t, void *); // Callback for specific http client operations
void* dap_client_http_request_custom(const char *a_uplink_addr, uint16_t a_uplink_port, const char *a_method,
const char *a_request_content_type, const char * a_path, void *a_request, size_t a_request_size, char *a_cookie,
dap_client_http_callback_data_t a_response_callback, dap_client_http_callback_error_t a_error_callback,
void *a_obj, char **a_custom, size_t a_custom_count);
void* dap_client_http_request(const char *a_uplink_addr, uint16_t a_uplink_port, const char * a_method,
const char* a_request_content_type, const char * a_path, void *a_request, size_t a_request_size,
char * a_cookie, dap_client_http_callback_data_t a_response_callback,
dap_client_http_callback_error_t a_error_callback, void *a_obj, void * a_custom);
#ifdef __cplusplus
}
#endif
/*
* Authors:
* Dmitriy A. Gearasimov <gerasimov.dmitriy@demlabs.net>
* DeM Labs Inc. https://demlabs.net
* Kelvin Project https://github.com/kelvinblockchain
* Copyright (c) 2017-2019
* All rights reserved.
This file is part of DAP (Deus Applications Prototypes) the open source project
DAP (Deus Applicaions Prototypes) is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
DAP is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with any DAP based project. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "dap_client.h"
#include "dap_events.h"
int dap_client_pool_init(dap_events_t * a_events);
void dap_client_pool_deinit();
dap_client_t * dap_client_pool_new (const char * a_client_id);
/*
* Authors:
* Dmitriy A. Gearasimov <gerasimov.dmitriy@demlabs.net>
* DeM Labs Inc. https://demlabs.net
* Kelvin Project https://github.com/kelvinblockchain
* Copyright (c) 2017-2019
* All rights reserved.
This file is part of DAP (Deus Applications Prototypes) the open source project
DAP (Deus Applicaions Prototypes) is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
DAP is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with any DAP based project. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <stdbool.h>
#include <stdint.h>
#include "dap_client.h"
#include "dap_stream.h"
#include "dap_events_socket.h"
typedef struct dap_enc_key dap_enc_key_t;
typedef struct dap_http_client dap_http_client_t;
typedef struct dap_client_internal
{
dap_client_t * client;
dap_http_client_t * http_client;
dap_events_socket_t * stream_es;
int stream_socket;
dap_stream_session_t * stream_session;
dap_stream_t* stream;
dap_events_t * events;
dap_enc_key_t * session_key_open; // Open assymetric keys exchange
dap_enc_key_t * session_key; // Symmetric private key for session encryption
dap_enc_key_t * stream_key; // Stream private key for stream encryption
char stream_id[25];
char * session_key_id;
//void *curl;// curl connection descriptor
//long curl_sockfd;// curl socket descriptor
char * last_parsed_node;
char * uplink_addr;
char * active_channels;
uint16_t uplink_port;
uint32_t uplink_protocol_version;
dap_client_stage_t stage_target;
dap_client_callback_t stage_target_done_callback;
dap_client_stage_t stage;
dap_client_stage_status_t stage_status;
dap_client_error_t last_error;
dap_client_callback_t stage_status_callback;
dap_client_callback_t stage_status_done_callback;
dap_client_callback_t stage_status_error_callback;
int connect_attempt;
bool is_encrypted;
bool is_reconnect;
bool is_close_session;// the last request in session, in the header will be added "SessionCloseAfterRequest: true"
dap_client_callback_data_size_t request_response_callback;
dap_client_callback_int_t request_error_callback;
} dap_client_pvt_t;
#define DAP_CLIENT_PVT(a) (a ? (dap_client_pvt_t*) a->_internal : NULL)
int dap_client_pvt_init();
void dap_client_pvt_deinit();
void dap_client_pvt_stage_transaction_begin(dap_client_pvt_t * dap_client_pvt_t, dap_client_stage_t a_stage_next,
dap_client_callback_t a_done_callback);
void dap_client_pvt_request(dap_client_pvt_t * a_client_internal, const char * a_path, void * a_request,
size_t a_request_size, dap_client_callback_data_size_t a_response_proc, dap_client_callback_int_t a_response_error);
void dap_client_pvt_request_enc(dap_client_pvt_t * a_client_internal, const char * a_path, const char * a_sub_url,
const char * a_query, void * a_request, size_t a_request_size,
dap_client_callback_data_size_t a_response_proc,
dap_client_callback_int_t a_error_proc);
void dap_client_pvt_new(dap_client_pvt_t * a_client_internal);
void dap_client_pvt_delete(dap_client_pvt_t * a_client_pvts);
//int dap_client_pvt_ref(dap_client_pvt_t * a_client_internal);
//int dap_client_pvt_unref(dap_client_pvt_t * a_client_internal);
// from dap_client_pvt_hh.c
int dap_client_pvt_hh_lock(void);
int dap_client_pvt_hh_unlock(void);
void* dap_client_pvt_hh_get(dap_client_pvt_t* a_client_pvt);
int dap_client_pvt_hh_add(dap_client_pvt_t* a_client_pvt);
int dap_client_pvt_hh_del(dap_client_pvt_t *a_client_pvt);
libdap @ a479b3c1
Subproject commit a479b3c1e56ece208e00c7a75a0cf656e6310dbb
libdap-crypto @ d30f7681
Subproject commit d30f7681997fd3f1126d667ae36674521c79a329
libdap-server @ e0a801fa
Subproject commit e0a801fa196542d57ef7482b4aba0ac82e7eecd3
libdap-server-core @ dd803b2e
Subproject commit dd803b2e03007c74c792b35a319fd7f9b6e73078
libdap-server-udp @ 7500d54e
Subproject commit 7500d54e139a92586b1488edffcb12f4f1c824ec
libdap-stream @ 4528b312
Subproject commit 4528b31243af178fb981c5caeec5e281fb6e9b82
libdap-stream-ch @ ad0f3e36
Subproject commit ad0f3e360023e023cd5cfa312db2dd3c441f8b66
#
# LuaDist Travis-CI Hook
#
# We assume C build environments
language: C
# Try using multiple Lua Implementations
env:
- TOOL="gcc" # Use native compiler (GCC usually)
- TOOL="clang" # Use clang
- TOOL="i686-w64-mingw32" # 32bit MinGW
- TOOL="x86_64-w64-mingw32" # 64bit MinGW
- TOOL="arm-linux-gnueabihf" # ARM hard-float (hf), linux
# Crosscompile builds may fail
matrix:
allow_failures:
- env: TOOL="i686-w64-mingw32"
- env: TOOL="x86_64-w64-mingw32"
- env: TOOL="arm-linux-gnueabihf"
# Install dependencies
install:
- git clone git://github.com/LuaDist/Tools.git ~/_tools
- ~/_tools/travis/travis install
# Bootstap
before_script:
- ~/_tools/travis/travis bootstrap
# Build the module
script:
- ~/_tools/travis/travis build
# Execute additional tests or commands
after_script:
- ~/_tools/travis/travis test
# Only watch the master branch
branches:
only:
- master
# Notify the LuaDist Dev group if needed
notifications:
recipients:
- luadist-dev@googlegroups.com
email:
on_success: change
on_failure: always
# Copyright (C) 2007-2013 LuaDist.
# Created by Peter Drahoš, Peter Kapec
# Redistribution and use of this file is allowed according to the terms of the MIT license.
# For details see the COPYRIGHT file distributed with LuaDist.
# Please note that the package source code is licensed under its own license.
project ( ev C )
cmake_minimum_required ( VERSION 3.1 )
include ( cmake/dist.cmake )
include ( configure )
configure_file ( ${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h )
include_directories( ${CMAKE_CURRENT_BINARY_DIR} )
set ( EV_SRC
ev.c
event.c
)
if (WIN32)
list ( APPEND EV_LIBS Ws2_32 )
endif ()
set(_CCOPT "-std=c99")
add_library ( ${PROJECT_NAME} STATIC ${EV_SRC} )
target_link_libraries ( ${PROJECT_NAME} ${EV_LIBS} )
target_include_directories( ${PROJECT_NAME} INTERFACE .)
install_library ( ${PROJECT_NAME} )
install_header ( ev.h ev++.h event.h )
install_data ( LICENSE README )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment