Skip to content

Commit

Permalink
Release version 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
chaurah committed Jun 7, 2017
1 parent 3b544dc commit c20c9e9
Show file tree
Hide file tree
Showing 127 changed files with 17,840 additions and 12,534 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -480,3 +480,4 @@ gen### Gcov template

#Output Folder for cmake
build/
cmake-build-debug/
2 changes: 1 addition & 1 deletion CMakeLists-rapidjson.txt.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ project(rapidjson-download NONE)
include(ExternalProject)
ExternalProject_Add(rapidjson
DOWNLOAD_COMMAND git clone https://github.com/miloyip/rapidjson.git .
DOWNLOAD_DIR "${CMAKE_BINARY_DIR}/third_party/rapidjson/src"
DOWNLOAD_DIR "${CMAKE_BINARY_DIR}/${DEPENDENCY_DIR}/rapidjson/src"
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
Expand Down
88 changes: 56 additions & 32 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
cmake_minimum_required(VERSION 3.2 FATAL_ERROR)
project(aws-iot-sdk-cpp CXX)
option(BUILD_SHARED_LIBRARY "Build the library as a shared object, will build it as a static library otherwise" NO)

######################################
# Section : Disable in-source builds #
######################################

if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
if(${PROJECT_SOURCE_DIR} STREQUAL ${PROJECT_BINARY_DIR})
message( FATAL_ERROR "In-source builds not allowed. Please make a new directory (called a build directory) and run CMake from there. You may need to remove CMakeCache.txt and CMakeFiles folder." )
endif()

Expand All @@ -30,50 +31,59 @@ if(UNIX AND NOT APPLE)
set(THREADS_PREFER_PTHREAD_FLAG ON)
set(CUSTOM_COMPILER_FLAGS "-fno-exceptions -Wall -Werror")
elseif(APPLE)
set(CUSTOM_COMPILER_FLAGS "-fno-exceptions")
set(CUSTOM_COMPILER_FLAGS "-fno-exceptions -Werror -Wall")
elseif(WIN32)
set(CUSTOM_COMPILER_FLAGS "/W4")
endif()

if(NOT DEPENDENCY_DIR)
set(DEPENDENCY_DIR "third_party")
endif()

#############################
# Add SDK Target #
#############################
# Create library file. The Client applications MUST link to below target if using this CMake file
set(SDK_TARGET_NAME aws-iot-sdk-cpp)
add_library(${SDK_TARGET_NAME} "")
if (BUILD_SHARED_LIBRARY)
add_library(${SDK_TARGET_NAME} SHARED "")
set_target_properties(${SDK_TARGET_NAME} PROPERTIES SUFFIX ".so")
else()
add_library(${SDK_TARGET_NAME} "")
endif()

# Download and include rapidjson, not optional
configure_file(CMakeLists-rapidjson.txt.in ${CMAKE_BINARY_DIR}/third_party/rapidjson/download/CMakeLists.txt)
configure_file(CMakeLists-rapidjson.txt.in ${CMAKE_BINARY_DIR}/${DEPENDENCY_DIR}/rapidjson/download/CMakeLists.txt)
execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" .
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/third_party/rapidjson/download)
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/${DEPENDENCY_DIR}/rapidjson/download)
execute_process(COMMAND ${CMAKE_COMMAND} --build .
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/third_party/rapidjson/download)
target_include_directories(${SDK_TARGET_NAME} PRIVATE ${CMAKE_BINARY_DIR}/third_party/rapidjson/src/include)
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/${DEPENDENCY_DIR}/rapidjson/download)
target_include_directories(${SDK_TARGET_NAME} PRIVATE ${CMAKE_BINARY_DIR}/${DEPENDENCY_DIR}/rapidjson/src/include)

# Get Common SDK Sources
file(GLOB_RECURSE SDK_SOURCES FOLLOW_SYMLINKS ${CMAKE_SOURCE_DIR}/src/*.cpp)
target_include_directories(${SDK_TARGET_NAME} PRIVATE ${CMAKE_SOURCE_DIR}/include)
file(GLOB_RECURSE SDK_SOURCES FOLLOW_SYMLINKS ${PROJECT_SOURCE_DIR}/src/*.cpp)
target_include_directories(${SDK_TARGET_NAME} PRIVATE ${PROJECT_SOURCE_DIR}/include)
target_sources(${SDK_TARGET_NAME} PRIVATE ${SDK_SOURCES})

# Configure Threading library
find_package(Threads REQUIRED)
set(THREAD_LIBRARY_LINK_STRING "Threads::Threads")
target_link_libraries(${SDK_TARGET_NAME} "Threads::Threads")
set(THREAD_LIBRARY_LINK_STRING "Threads::Threads" -ldl)
target_link_libraries(${SDK_TARGET_NAME} "Threads::Threads" -ldl)

if(BUILD_DOCS)
find_package(Doxygen REQUIRED)
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/docs)
set(DOC_BINARY_DIR ${CMAKE_BINARY_DIR}/docs)
set(DOC_SOURCE_DIR ${CMAKE_SOURCE_DIR}/.)
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/docs)
set(DOC_BINARY_DIR ${PROJECT_BINARY_DIR}/docs)
set(DOC_SOURCE_DIR ${PROJECT_SOURCE_DIR}/.)

set(doxygen_conf_in ${CMAKE_SOURCE_DIR}/doxygen/doxygen.conf.in)
set(doxygen_conf ${CMAKE_BINARY_DIR}/doxygen/doxygen.conf)
set(doxygen_conf_in ${PROJECT_SOURCE_DIR}/doxygen/doxygen.conf.in)
set(doxygen_conf ${PROJECT_BINARY_DIR}/doxygen/doxygen.conf)

configure_file(${doxygen_conf_in} ${doxygen_conf} @ONLY)

add_custom_target(generate-sdk-docs
COMMAND ${DOXYGEN_EXECUTABLE} ${doxygen_conf}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/docs
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/docs
COMMENT "Generating SDK docs"
VERBATIM)
endif()
Expand All @@ -83,23 +93,23 @@ endif()
################################################
# TODO : Figure out a better way of handling Visual Studio solutions
if(MSVC)
file(GLOB SDK_COMMON_HEADERS "${CMAKE_SOURCE_DIR}/include/*.hpp")
file(GLOB SDK_UTIL_COMMON_HEADERS "${CMAKE_SOURCE_DIR}/include/util/*.hpp")
file(GLOB SDK_UTIL_LOGGING_HEADERS "${CMAKE_SOURCE_DIR}/include/util/logging/*.hpp")
file(GLOB SDK_UTIL_MEMORY_STL_HEADERS "${CMAKE_SOURCE_DIR}/include/util/memory/stl/*.hpp")
file(GLOB SDK_UTIL_THREADING_HEADERS "${CMAKE_SOURCE_DIR}/include/util/threading/*.hpp")
file(GLOB SDK_MQTT_HEADERS "${CMAKE_SOURCE_DIR}/include/mqtt/*.hpp")
file(GLOB SDK_SHADOW_HEADERS "${CMAKE_SOURCE_DIR}/include/shadow/*.hpp")

file(GLOB SDK_COMMON_SOURCES "${CMAKE_SOURCE_DIR}/src/*.cpp")
file(GLOB SDK_UTIL_COMMON_SOURCES "${CMAKE_SOURCE_DIR}/src/util/*.cpp")
file(GLOB SDK_UTIL_LOGGING_SOURCES "${CMAKE_SOURCE_DIR}/src/util/logging/*.cpp")
file(GLOB SDK_UTIL_THREADING_SOURCES "${CMAKE_SOURCE_DIR}/src/util/threading/*.cpp")
file(GLOB SDK_MQTT_SOURCES "${CMAKE_SOURCE_DIR}/src/mqtt/*.cpp")
file(GLOB SDK_SHADOW_SOURCES "${CMAKE_SOURCE_DIR}/src/shadow/*.cpp")
file(GLOB SDK_COMMON_HEADERS "${PROJECT_SOURCE_DIR}/include/*.hpp")
file(GLOB SDK_UTIL_COMMON_HEADERS "${PROJECT_SOURCE_DIR}/include/util/*.hpp")
file(GLOB SDK_UTIL_LOGGING_HEADERS "${PROJECT_SOURCE_DIR}/include/util/logging/*.hpp")
file(GLOB SDK_UTIL_MEMORY_STL_HEADERS "${PROJECT_SOURCE_DIR}/include/util/memory/stl/*.hpp")
file(GLOB SDK_UTIL_THREADING_HEADERS "${PROJECT_SOURCE_DIR}/include/util/threading/*.hpp")
file(GLOB SDK_MQTT_HEADERS "${PROJECT_SOURCE_DIR}/include/mqtt/*.hpp")
file(GLOB SDK_SHADOW_HEADERS "${PROJECT_SOURCE_DIR}/include/shadow/*.hpp")

file(GLOB SDK_COMMON_SOURCES "${PROJECT_SOURCE_DIR}/src/*.cpp")
file(GLOB SDK_UTIL_COMMON_SOURCES "${PROJECT_SOURCE_DIR}/src/util/*.cpp")
file(GLOB SDK_UTIL_LOGGING_SOURCES "${PROJECT_SOURCE_DIR}/src/util/logging/*.cpp")
file(GLOB SDK_UTIL_THREADING_SOURCES "${PROJECT_SOURCE_DIR}/src/util/threading/*.cpp")
file(GLOB SDK_MQTT_SOURCES "${PROJECT_SOURCE_DIR}/src/mqtt/*.cpp")
file(GLOB SDK_SHADOW_SOURCES "${PROJECT_SOURCE_DIR}/src/shadow/*.cpp")

# Required to make Header files visible in Visual Studio
file(GLOB_RECURSE SDKHeaders FOLLOW_SYMLINKS ${CMAKE_SOURCE_DIR}/include/*.hpp)
file(GLOB_RECURSE SDKHeaders FOLLOW_SYMLINKS ${PROJECT_SOURCE_DIR}/include/*.hpp)
target_sources(${SDK_TARGET_NAME} PUBLIC ${SDKHeaders})

source_group("Header Files\\aws-iot" FILES ${SDK_COMMON_HEADERS})
Expand Down Expand Up @@ -133,3 +143,17 @@ add_subdirectory(tests/unit)
add_subdirectory(samples/PubSub)

add_subdirectory(samples/ShadowDelta)

add_subdirectory(samples/Discovery EXCLUDE_FROM_ALL)

add_subdirectory(samples/StoryRobotArm EXCLUDE_FROM_ALL)

add_subdirectory(samples/StorySwitch EXCLUDE_FROM_ALL)

##################################
# Section: Define Install Target #
##################################
if(NOT MSVC)
install(TARGETS aws-iot-sdk-cpp DESTINATION lib)
install(DIRECTORY include/ DESTINATION include)
endif()
30 changes: 26 additions & 4 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,30 @@
#Change Log
# Change Log
## [1.1.0](https://github.com/aws/aws-iot-device-sdk-cpp/releases/tag/v1.1.0) (May 8th, 2017)

Features:
- Support for Greengrass discovery
- GreengrassClient that inherits from Client
- Greengrass Response parser
- Updates to support shadow operations with Greengrass Cores
- additional samples for discovery
- Updated unit tests and integration tests
- Added support for wildcard subscriptions


Bugfixes/Improvements:
- Fixed issues [#4](https://github.com/aws/aws-iot-device-sdk-cpp/issues/4) and [#7](https://github.com/aws/aws-iot-device-sdk-cpp/issues/7)
- Updated makefiles with [#3](https://github.com/aws/aws-iot-device-sdk-cpp/pull/3) and [#8](https://github.com/aws/aws-iot-device-sdk-cpp/pull/8)
- Added install target
- Fixed bug where single character subscriptions causes client to crash
- Split up ports being used for WebSockets, MQTT and Greengrass discovery into separate fields in the config file
- Cleanup of formatting
- Helper class to convert response codes to strings to enable easier debugging
- OpenSSL wrapper updates
- Updated Platform.md

## [1.0.0](https://github.com/aws/aws-iot-device-sdk-cpp/releases/tag/v1.0.0) (October 27, 2016)

Features:

- Initial release
- MQTT Publish and Subscribe
- Basic Async Shadow support
Expand All @@ -14,4 +36,4 @@ Features:
- Tested platforms - Linux, Windows (VS 2015) and Mac OS

Bugfixes/Improvements:
- N/A
- N/A
Loading

0 comments on commit c20c9e9

Please sign in to comment.