-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from danriegsecker/master
Issue #58: FileMQ uses deprecated CZMQ API's
- Loading branch information
Showing
87 changed files
with
7,972 additions
and
9,432 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,9 @@ | ||
# FileMQ | ||
|
||
# Travis CI script | ||
language: c | ||
|
||
# Build required ZeroMQ projects first | ||
before_script: | ||
|
||
# libsodium | ||
- git clone git://github.com/jedisct1/libsodium.git | ||
- cd libsodium | ||
- ./autogen.sh | ||
- ./configure && make check | ||
- sudo make install | ||
- sudo ldconfig | ||
- cd .. | ||
|
||
# libzmq | ||
- git clone git://github.com/zeromq/libzmq.git | ||
- cd libzmq | ||
- ./autogen.sh | ||
- ./configure && make check | ||
- sudo make install | ||
- sudo ldconfig | ||
- cd .. | ||
|
||
# CZMQ | ||
- git clone git://github.com/zeromq/czmq.git | ||
- cd czmq | ||
- ./autogen.sh | ||
- ./configure && make check | ||
- sudo make install | ||
- sudo ldconfig | ||
- cd .. | ||
env: | ||
- BUILD_TYPE=default | ||
- BUILD_TYPE=qt-android | ||
|
||
# Build and check libfmq | ||
script: ./autogen.sh && ./configure && make && make check | ||
# Build and check this project according to the BUILD_TYPE | ||
script: ./ci_build.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,157 @@ | ||
################################################################################ | ||
# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # | ||
# Please refer to the README for information about making permanent changes. # | ||
################################################################################ | ||
|
||
######################################################################## | ||
# Project setup | ||
######################################################################## | ||
cmake_minimum_required(VERSION 2.8) | ||
project(filemq) | ||
enable_language(C) | ||
enable_testing() | ||
|
||
set(SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) | ||
set(BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) | ||
|
||
######################################################################## | ||
# determine version | ||
######################################################################## | ||
foreach(which MAJOR MINOR PATCH) | ||
file(STRINGS "${SOURCE_DIR}/include/filemq_library.h" FILEMQ_VERSION_STRING REGEX "#define FILEMQ_VERSION_${which}") | ||
string(REGEX MATCH "#define FILEMQ_VERSION_${which} ([0-9_]+)" FILEMQ_REGEX_MATCH "${FILEMQ_VERSION_STRING}") | ||
if (NOT FILEMQ_REGEX_MATCH) | ||
message(FATAL_ERROR "failed to parse FILEMQ_VERSION_${which} from filemq.h") | ||
endif() | ||
set(FILEMQ_${which}_VERSION ${CMAKE_MATCH_1}) | ||
endforeach(which) | ||
|
||
set(FILEMQ_VERSION ${FILEMQ_MAJOR_VERSION}.${FILEMQ_MINOR_VERSION}.${FILEMQ_PATCH_VERSION}) | ||
|
||
######################################################################## | ||
# platform.h | ||
######################################################################## | ||
include(CheckIncludeFile) | ||
CHECK_INCLUDE_FILE("linux/wireless.h" HAVE_LINUX_WIRELESS_H) | ||
CHECK_INCLUDE_FILE("net/if_media.h" HAVE_NET_IF_MEDIA_H) | ||
|
||
include(CheckFunctionExists) | ||
CHECK_FUNCTION_EXISTS("getifaddrs" HAVE_GETIFADDRS) | ||
CHECK_FUNCTION_EXISTS("freeifaddrs" HAVE_FREEIFADDRS) | ||
|
||
include(CheckIncludeFiles) | ||
check_include_files("sys/socket.h;net/if.h" HAVE_NET_IF_H) | ||
if (NOT HAVE_NET_IF_H) | ||
CHECK_INCLUDE_FILE("net/if.h" HAVE_NET_IF_H) | ||
endif() | ||
|
||
file(WRITE ${BINARY_DIR}/platform.h.in " | ||
#cmakedefine HAVE_LINUX_WIRELESS_H | ||
#cmakedefine HAVE_NET_IF_H | ||
#cmakedefine HAVE_NET_IF_MEDIA_H | ||
#cmakedefine HAVE_GETIFADDRS | ||
#cmakedefine HAVE_FREEIFADDRS | ||
") | ||
|
||
configure_file(${BINARY_DIR}/platform.h.in ${BINARY_DIR}/platform.h) | ||
|
||
#The MSVC C compiler is too out of date, | ||
#so the sources have to be compiled as c++ | ||
if (MSVC) | ||
enable_language(CXX) | ||
file(GLOB sources ${SOURCE_DIR}/src/*.c) | ||
set_source_files_properties(${sources} PROPERTIES LANGUAGE CXX) | ||
set(MORE_LIBRARIES ws2_32 Rpcrt4 Iphlpapi) | ||
endif() | ||
|
||
# required libraries for mingw | ||
if (MINGW) | ||
set(MORE_LIBRARIES -lws2_32 -lrpcrt4 -liphlpapi) | ||
endif() | ||
|
||
|
||
list(APPEND CMAKE_MODULE_PATH ${SOURCE_DIR}) | ||
|
||
######################################################################## | ||
# ZMQ dependency | ||
######################################################################## | ||
find_package(ZeroMQ REQUIRED) | ||
include_directories(${ZEROMQ_INCLUDE_DIRS}) | ||
list(APPEND MORE_LIBRARIES ${ZEROMQ_LIBRARIES}) | ||
|
||
######################################################################## | ||
# CZMQ dependency | ||
######################################################################## | ||
find_package(CZMQ REQUIRED) | ||
include_directories(${CZMQ_INCLUDE_DIRS}) | ||
list(APPEND MORE_LIBRARIES ${CZMQ_LIBRARIES}) | ||
|
||
######################################################################## | ||
# includes | ||
######################################################################## | ||
set (filemq_headers | ||
include/filemq_library.h | ||
include/filemq.h | ||
include/fmq_msg.h | ||
include/fmq_server.h | ||
include/fmq_client.h | ||
) | ||
source_group ("Header Files" FILES ${filemq_headers}) | ||
install(FILES ${filemq_headers} DESTINATION include) | ||
|
||
######################################################################## | ||
# library | ||
######################################################################## | ||
include_directories(${BINARY_DIR}) | ||
include_directories(${SOURCE_DIR}/include) | ||
set (filemq_sources | ||
src/fmq_msg.c | ||
src/fmq_server.c | ||
src/fmq_client.c | ||
) | ||
source_group ("Source Files" FILES ${filemq_sources}) | ||
add_library(filemq SHARED ${filemq_sources}) | ||
set_target_properties(filemq PROPERTIES DEFINE_SYMBOL "LIBFILEMQ_EXPORTS") | ||
target_link_libraries(filemq ${ZEROMQ_LIBRARIES} ${MORE_LIBRARIES}) | ||
|
||
install(TARGETS filemq | ||
LIBRARY DESTINATION lib${LIB_SUFFIX} # .so file | ||
ARCHIVE DESTINATION lib${LIB_SUFFIX} # .lib file | ||
RUNTIME DESTINATION bin # .dll file | ||
) | ||
|
||
######################################################################## | ||
# pkgconfig | ||
######################################################################## | ||
set(VERSION "${FILEMQ_VERSION}") | ||
set(prefix "${CMAKE_INSTALL_PREFIX}") | ||
set(exec_prefix "\${prefix}") | ||
set(libdir "\${prefix}/lib${LIB_SUFFIX}") | ||
set(includedir "\${prefix}/include") | ||
configure_file( | ||
${SOURCE_DIR}/src/libfilemq.pc.in | ||
${BINARY_DIR}/libfilemq.pc | ||
@ONLY) | ||
|
||
install( | ||
FILES ${BINARY_DIR}/libfilemq.pc | ||
DESTINATION lib${LIB_SUFFIX}/pkgconfig | ||
) | ||
|
||
######################################################################## | ||
# tests | ||
######################################################################## | ||
add_executable(filemq_selftest ${SOURCE_DIR}/src/filemq_selftest.c) | ||
target_link_libraries(filemq_selftest filemq ${ZEROMQ_LIBRARIES}) | ||
add_test(filemq_selftest filemq_selftest) | ||
|
||
######################################################################## | ||
# summary | ||
######################################################################## | ||
message(STATUS "version: ${FILEMQ_VERSION}") | ||
message(STATUS "install: ${CMAKE_INSTALL_PREFIX}") | ||
|
||
################################################################################ | ||
# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # | ||
# Please refer to the README for information about making permanent changes. # | ||
################################################################################ |
Oops, something went wrong.