-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fleet provisioning Co-authored-by: Justin Boswell <[email protected]>
- Loading branch information
1 parent
d492c96
commit 65b8344
Showing
30 changed files
with
2,519 additions
and
2 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
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,118 @@ | ||
cmake_minimum_required(VERSION 3.1) | ||
project(IotIdentity-cpp CXX) | ||
|
||
set(RUNTIME_DIRECTORY bin) | ||
|
||
if (UNIX AND NOT APPLE) | ||
include(GNUInstallDirs) | ||
elseif(NOT DEFINED CMAKE_INSTALL_LIBDIR) | ||
set(CMAKE_INSTALL_LIBDIR "lib") | ||
|
||
if (${CMAKE_INSTALL_LIBDIR} STREQUAL "lib64") | ||
set(FIND_LIBRARY_USE_LIB64_PATHS true) | ||
endif() | ||
endif() | ||
|
||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_PREFIX_PATH}/${CMAKE_INSTALL_LIBDIR}/cmake") | ||
|
||
if (NOT CMAKE_CXX_STANDARD) | ||
set(CMAKE_CXX_STANDARD 11) | ||
endif() | ||
|
||
file(GLOB AWS_IOTIDENTITY_HEADERS | ||
"include/aws/iotidentity/*.h" | ||
) | ||
|
||
file(GLOB AWS_IOTIDENTITY_SRC | ||
"source/*.cpp" | ||
) | ||
|
||
file(GLOB AWS_IOTIDENTITY_CPP_SRC | ||
${AWS_IOTIDENTITY_SRC} | ||
) | ||
|
||
if (WIN32) | ||
if (MSVC) | ||
source_group("Header Files\\aws\\iotidentity\\" FILES ${AWS_IOTIDENTITY_HEADERS}) | ||
|
||
source_group("Source Files" FILES ${AWS_IOTIDENTITY_SRC}) | ||
endif () | ||
endif() | ||
|
||
add_library(IotIdentity-cpp ${AWS_IOTIDENTITY_CPP_SRC}) | ||
|
||
set_target_properties(IotIdentity-cpp PROPERTIES LINKER_LANGUAGE CXX) | ||
|
||
set(CMAKE_C_FLAGS_DEBUGOPT "") | ||
|
||
#set warnings | ||
if (MSVC) | ||
target_compile_options(IotIdentity-cpp PRIVATE /W4 /WX) | ||
else () | ||
target_compile_options(IotIdentity-cpp PRIVATE -Wall -Wno-long-long -pedantic -Werror) | ||
endif () | ||
|
||
if (CMAKE_BUILD_TYPE STREQUAL "" OR CMAKE_BUILD_TYPE MATCHES Debug) | ||
target_compile_definitions(IotIdentity-cpp PRIVATE "-DDEBUG_BUILD") | ||
endif () | ||
|
||
if (BUILD_SHARED_LIBS) | ||
target_compile_definitions(IotIdentity-cpp PUBLIC "-DAWS_IOTIDENTITY_USE_IMPORT_EXPORT") | ||
target_compile_definitions(IotIdentity-cpp PRIVATE "-DAWS_IOTIDENTITY_EXPORTS") | ||
|
||
install(TARGETS IotIdentity-cpp | ||
EXPORT IotIdentity-cpp-targets | ||
ARCHIVE | ||
DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
COMPONENT Development | ||
LIBRARY | ||
DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
NAMELINK_SKIP | ||
COMPONENT Runtime | ||
RUNTIME | ||
DESTINATION ${RUNTIME_DIRECTORY} | ||
COMPONENT Runtime) | ||
|
||
install(TARGETS IotIdentity-cpp | ||
EXPORT IotIdentity-cpp-targets | ||
LIBRARY | ||
DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
NAMELINK_ONLY | ||
COMPONENT Development) | ||
else() | ||
install(TARGETS IotIdentity-cpp | ||
EXPORT IotIdentity-cpp-targets | ||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
COMPONENT Development) | ||
endif() | ||
|
||
target_include_directories(IotIdentity-cpp PUBLIC | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
$<INSTALL_INTERFACE:include>) | ||
|
||
if (NOT IS_SUBDIRECTORY_INCLUDE) | ||
aws_use_package(aws-crt-cpp) | ||
endif() | ||
|
||
target_link_libraries(IotIdentity-cpp ${DEP_AWS_LIBS}) | ||
|
||
install(FILES ${AWS_IOTIDENTITY_HEADERS} DESTINATION "include/aws/iotidentity/" COMPONENT Development) | ||
|
||
if (BUILD_SHARED_LIBS) | ||
set(TARGET_DIR "shared") | ||
else() | ||
set(TARGET_DIR "static") | ||
endif() | ||
|
||
install(EXPORT "IotIdentity-cpp-targets" | ||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/IotIdentity-cpp/cmake/${TARGET_DIR}" | ||
NAMESPACE AWS:: | ||
COMPONENT Development) | ||
|
||
configure_file("cmake/IotIdentity-cpp-config.cmake" | ||
"${CMAKE_CURRENT_BINARY_DIR}/IotIdentity-cpp-config.cmake" | ||
@ONLY) | ||
|
||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/IotIdentity-cpp-config.cmake" | ||
DESTINATION "lib/IotIdentity-cpp/cmake/" | ||
COMPONENT Development) |
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,9 @@ | ||
include(CMakeFindDependencyMacro) | ||
|
||
find_dependency(aws-crt-cpp) | ||
|
||
if (BUILD_SHARED_LIBS) | ||
include(${CMAKE_CURRENT_LIST_DIR}/shared/@PROJECT_NAME@-targets.cmake) | ||
else() | ||
include(${CMAKE_CURRENT_LIST_DIR}/static/@PROJECT_NAME@-targets.cmake) | ||
endif() |
44 changes: 44 additions & 0 deletions
44
identity/include/aws/iotidentity/CreateCertificateFromCsrRequest.h
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,44 @@ | ||
#pragma once | ||
/* Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"). | ||
* You may not use this file except in compliance with the License. | ||
* A copy of the License is located at | ||
* | ||
* http://aws.amazon.com/apache2.0 | ||
* | ||
* or in the "license" file accompanying this file. This file is distributed | ||
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
* express or implied. See the License for the specific language governing | ||
* permissions and limitations under the License. | ||
* This file is generated | ||
*/ | ||
|
||
#include <aws/iotidentity/Exports.h> | ||
|
||
#include <aws/crt/JsonObject.h> | ||
#include <aws/crt/StlAllocator.h> | ||
|
||
namespace Aws | ||
{ | ||
namespace Iotidentity | ||
{ | ||
|
||
class AWS_IOTIDENTITY_API CreateCertificateFromCsrRequest final | ||
{ | ||
public: | ||
CreateCertificateFromCsrRequest() = default; | ||
|
||
CreateCertificateFromCsrRequest(const Crt::JsonView &doc); | ||
CreateCertificateFromCsrRequest &operator=(const Crt::JsonView &doc); | ||
|
||
void SerializeToObject(Crt::JsonObject &doc) const; | ||
|
||
Aws::Crt::Optional<Aws::Crt::String> CertificateSigningRequest; | ||
|
||
private: | ||
static void LoadFromObject(CreateCertificateFromCsrRequest &obj, const Crt::JsonView &doc); | ||
}; | ||
} // namespace Iotidentity | ||
} // namespace Aws |
46 changes: 46 additions & 0 deletions
46
identity/include/aws/iotidentity/CreateCertificateFromCsrResponse.h
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,46 @@ | ||
#pragma once | ||
/* Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"). | ||
* You may not use this file except in compliance with the License. | ||
* A copy of the License is located at | ||
* | ||
* http://aws.amazon.com/apache2.0 | ||
* | ||
* or in the "license" file accompanying this file. This file is distributed | ||
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
* express or implied. See the License for the specific language governing | ||
* permissions and limitations under the License. | ||
* This file is generated | ||
*/ | ||
|
||
#include <aws/iotidentity/Exports.h> | ||
|
||
#include <aws/crt/JsonObject.h> | ||
#include <aws/crt/StlAllocator.h> | ||
|
||
namespace Aws | ||
{ | ||
namespace Iotidentity | ||
{ | ||
|
||
class AWS_IOTIDENTITY_API CreateCertificateFromCsrResponse final | ||
{ | ||
public: | ||
CreateCertificateFromCsrResponse() = default; | ||
|
||
CreateCertificateFromCsrResponse(const Crt::JsonView &doc); | ||
CreateCertificateFromCsrResponse &operator=(const Crt::JsonView &doc); | ||
|
||
void SerializeToObject(Crt::JsonObject &doc) const; | ||
|
||
Aws::Crt::Optional<Aws::Crt::String> CertificateId; | ||
Aws::Crt::Optional<Aws::Crt::String> CertificateOwnershipToken; | ||
Aws::Crt::Optional<Aws::Crt::String> CertificatePem; | ||
|
||
private: | ||
static void LoadFromObject(CreateCertificateFromCsrResponse &obj, const Crt::JsonView &doc); | ||
}; | ||
} // namespace Iotidentity | ||
} // namespace Aws |
42 changes: 42 additions & 0 deletions
42
identity/include/aws/iotidentity/CreateCertificateFromCsrSubscriptionRequest.h
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,42 @@ | ||
#pragma once | ||
/* Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"). | ||
* You may not use this file except in compliance with the License. | ||
* A copy of the License is located at | ||
* | ||
* http://aws.amazon.com/apache2.0 | ||
* | ||
* or in the "license" file accompanying this file. This file is distributed | ||
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
* express or implied. See the License for the specific language governing | ||
* permissions and limitations under the License. | ||
* This file is generated | ||
*/ | ||
|
||
#include <aws/iotidentity/Exports.h> | ||
|
||
#include <aws/crt/JsonObject.h> | ||
#include <aws/crt/StlAllocator.h> | ||
|
||
namespace Aws | ||
{ | ||
namespace Iotidentity | ||
{ | ||
|
||
class AWS_IOTIDENTITY_API CreateCertificateFromCsrSubscriptionRequest final | ||
{ | ||
public: | ||
CreateCertificateFromCsrSubscriptionRequest() = default; | ||
|
||
CreateCertificateFromCsrSubscriptionRequest(const Crt::JsonView &doc); | ||
CreateCertificateFromCsrSubscriptionRequest &operator=(const Crt::JsonView &doc); | ||
|
||
void SerializeToObject(Crt::JsonObject &doc) const; | ||
|
||
private: | ||
static void LoadFromObject(CreateCertificateFromCsrSubscriptionRequest &obj, const Crt::JsonView &doc); | ||
}; | ||
} // namespace Iotidentity | ||
} // namespace Aws |
Oops, something went wrong.