Skip to content

Commit

Permalink
Initial contribution.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralight committed May 7, 2014
0 parents commit 0364bd1
Show file tree
Hide file tree
Showing 372 changed files with 39,627 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
*.o
*.exe
*.db
c/*.test
cpp/*.test
*.pyc

client/mosquitto_pub
client/mosquitto_sub
examples/mysql_log/mosquitto_mysql_log
examples/temperature_conversion/mqtt_temperature_conversion
man/mosquitto.8
man/mosquitto-tls.7
man/mosquitto.conf.5
man/libmosquitto.3
man/mosquitto_passwd.1
man/mosquitto_pub.1
man/mosquitto_sub.1
man/mqtt.7
src/db_dump/mosquitto_db_dump
src/mosquitto
src/mosquitto_passwd
test/broker/broker.pid
test/test_client
test/fake_user
test/msgsps_pub
test/msgsps_sub
test/msgsps_pub.dat
test/msgsps_sub.dat
test/broker/c/auth_plugin.so

lib/cpp/libmosquittopp.so*
lib/libmosquitto.so*
lib/libmosquitto.a

test/ssl/*.csr

build/
dist/
74 changes: 74 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# This is a cmake script.

set(CMAKE_LEGACY_CYGWIN_WIN32 0)

project(mosquitto)

cmake_minimum_required(VERSION 2.6)

set (VERSION 1.3.1)

if (WIN32)
execute_process(COMMAND cmd /c echo %DATE% %TIME% OUTPUT_VARIABLE TIMESTAMP
OUTPUT_STRIP_TRAILING_WHITESPACE)
else (WIN32)
execute_process(COMMAND date "+%F %T%z" OUTPUT_VARIABLE TIMESTAMP
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif (WIN32)

add_definitions (-DCMAKE -DVERSION=\"${VERSION}\" -DTIMESTAMP=\"${TIMESTAMP}\")

if (WIN32)
set (BINDIR .)
set (SBINDIR .)
set (SYSCONFDIR .)
set (LIBDIR .)
set (INCLUDEDIR include)
set (DATAROOTDIR share)
set (MANDIR man)
set (SHAREDEST .)
add_definitions("-D_CRT_SECURE_NO_WARNINGS")
else (WIN32)
set (BINDIR bin)
set (SBINDIR sbin)
if (${CMAKE_INSTALL_PREFIX} STREQUAL /usr)
set (SYSCONFDIR /etc/mosquitto)
else (${CMAKE_INSTALL_PREFIX} STREQUAL /usr)
set (SYSCONFDIR etc/mosquitto)
endif (${CMAKE_INSTALL_PREFIX} STREQUAL /usr)

set (LIBDIR lib${LIB_SUFFIX})
set (INCLUDEDIR include)
set (DATAROOTDIR share)
set (MANDIR ${DATAROOTDIR}/man)
set (SHAREDIR ${DATAROOTDIR}/mosquitto)
endif (WIN32)

option(WITH_TLS
"Include SSL/TLS support?" ON)
option(WITH_TLS_PSK
"Include TLS-PSK support (requires WITH_TLS)?" ON)
if (${WITH_TLS} STREQUAL ON)
find_package(OpenSSL REQUIRED)
add_definitions("-DWITH_TLS")
if (${WITH_TLS_PSK} STREQUAL ON)
add_definitions("-DWITH_TLS_PSK")
endif (${WITH_TLS_PSK} STREQUAL ON)
else (${WITH_TLS} STREQUAL ON)
set (OPENSSL_INCLUDE_DIR "")
endif (${WITH_TLS} STREQUAL ON)

# ========================================
# Include projects
# ========================================

add_subdirectory(lib)
add_subdirectory(client)
add_subdirectory(src)
add_subdirectory(man)

# ========================================
# Install config file
# ========================================

install(FILES mosquitto.conf aclfile.example pskfile.example pwfile.example DESTINATION ${SYSCONFDIR})
Loading

0 comments on commit 0364bd1

Please sign in to comment.