Comparing version 1.0.2 to 1.0.4
@@ -109,3 +109,3 @@ # Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
aws_use_package(aws-c-common) | ||
target_link_libraries(${PROJECT_NAME} PUBLIC AWS::aws-c-common ${PLATFORM_LIBS} ${DEP_AWS_LIBS}) | ||
target_link_libraries(${PROJECT_NAME} PUBLIC ${DEP_AWS_LIBS} ${PLATFORM_LIBS}) | ||
@@ -112,0 +112,0 @@ if (BYO_CRYPTO) |
@@ -32,2 +32,3 @@ cmake_minimum_required(VERSION 3.1) | ||
include(CheckCCompilerFlag) | ||
include(AwsFindPackage) | ||
@@ -61,20 +62,20 @@ file(GLOB AWS_COMPRESSION_HEADERS | ||
add_library(${CMAKE_PROJECT_NAME} ${LIBTYPE} ${COMPRESSION_HEADERS} ${COMPRESSION_SRC}) | ||
aws_set_common_properties(${CMAKE_PROJECT_NAME}) | ||
aws_prepare_symbol_visibility_args(${CMAKE_PROJECT_NAME} "AWS_COMPRESSION") | ||
add_library(${PROJECT_NAME} ${LIBTYPE} ${COMPRESSION_HEADERS} ${COMPRESSION_SRC}) | ||
aws_set_common_properties(${PROJECT_NAME}) | ||
aws_prepare_symbol_visibility_args(${PROJECT_NAME} "AWS_COMPRESSION") | ||
aws_add_sanitizers(${CMAKE_PROJECT_NAME}) | ||
aws_add_sanitizers(${PROJECT_NAME}) | ||
# We are not ABI stable yet | ||
set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES VERSION 1.0.0) | ||
set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES SOVERSION 0unstable) | ||
set_target_properties(${PROJECT_NAME} PROPERTIES VERSION 1.0.0) | ||
set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION 0unstable) | ||
target_include_directories(${CMAKE_PROJECT_NAME} PUBLIC | ||
target_include_directories(${PROJECT_NAME} PUBLIC | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
$<INSTALL_INTERFACE:include>) | ||
find_package(aws-c-common REQUIRED) | ||
target_link_libraries(${CMAKE_PROJECT_NAME} PUBLIC AWS::aws-c-common) | ||
aws_use_package(aws-c-common) | ||
target_link_libraries(${PROJECT_NAME} PUBLIC ${DEP_AWS_LIBS}) | ||
aws_prepare_shared_lib_exports(${CMAKE_PROJECT_NAME}) | ||
aws_prepare_shared_lib_exports(${PROJECT_NAME}) | ||
@@ -90,13 +91,13 @@ install(FILES ${AWS_COMPRESSION_HEADERS} DESTINATION "include/aws/compression") | ||
install(EXPORT "${CMAKE_PROJECT_NAME}-targets" | ||
DESTINATION "${LIBRARY_DIRECTORY}/${CMAKE_PROJECT_NAME}/cmake/${TARGET_DIR}" | ||
install(EXPORT "${PROJECT_NAME}-targets" | ||
DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/${TARGET_DIR}" | ||
NAMESPACE AWS:: | ||
COMPONENT Development) | ||
configure_file("cmake/${CMAKE_PROJECT_NAME}-config.cmake" | ||
"${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}-config.cmake" | ||
configure_file("cmake/${PROJECT_NAME}-config.cmake" | ||
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake" | ||
@ONLY) | ||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}-config.cmake" | ||
DESTINATION "${LIBRARY_DIRECTORY}/${CMAKE_PROJECT_NAME}/cmake/" | ||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake" | ||
DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/" | ||
COMPONENT Development) | ||
@@ -103,0 +104,0 @@ |
cmake_minimum_required(VERSION 3.1) | ||
project(aws-crt-nodejs C) | ||
option(BUILD_DEPS "Builds aws common runtime dependencies as part of build, only do this if you don't want to control your dependency chain." ON) | ||
include(CTest) | ||
# ensure that the release build has symbols | ||
@@ -20,47 +22,35 @@ if (NOT CMAKE_BUILD_TYPE) | ||
# This is required in order to append /lib/cmake to each element in CMAKE_PREFIX_PATH | ||
set(AWS_MODULE_DIR "/${CMAKE_INSTALL_LIBDIR}/cmake") | ||
string(REPLACE ";" "${AWS_MODULE_DIR};" AWS_MODULE_PATH "${CMAKE_PREFIX_PATH}${AWS_MODULE_DIR}") | ||
# Append that generated list to the module search path | ||
list(APPEND CMAKE_MODULE_PATH ${AWS_MODULE_PATH}) | ||
if (BUILD_DEPS) | ||
set(AWS_DEPS_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/deps CACHE STRING "If BUILD_DEPS is on, aws common runtime dependencies build in this directory.") | ||
set(AWS_DEPS_INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/deps/install) | ||
message(STATUS "Using submodule dependencies") | ||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/aws-common-runtime/aws-c-common/cmake") | ||
include(AwsFindPackage) | ||
list(APPEND CMAKE_PREFIX_PATH ${AWS_DEPS_INSTALL_DIR}) | ||
set(IN_SOURCE_BUILD ON) | ||
set(BUILD_TESTING_PREV ${BUILD_TESTING}) | ||
set(BUILD_TESTING OFF) | ||
string(REPLACE ";" "|" CMAKE_PREFIX_PATH_BAR "${CMAKE_PREFIX_PATH}") | ||
file(MAKE_DIRECTORY ${AWS_DEPS_BUILD_DIR}) | ||
execute_process( | ||
COMMAND ${CMAKE_COMMAND} -G ${CMAKE_GENERATOR} | ||
-DTARGET_ARCH=${TARGET_ARCH} | ||
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} | ||
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} | ||
-DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} | ||
-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH_BAR} | ||
-DCMAKE_INSTALL_PREFIX=${AWS_DEPS_INSTALL_DIR} | ||
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=${CMAKE_CURRENT_BINARY_DIR}/bin | ||
-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} | ||
${CMAKE_CURRENT_SOURCE_DIR}/aws-common-runtime | ||
WORKING_DIRECTORY ${AWS_DEPS_BUILD_DIR} | ||
RESULT_VARIABLE BUILD_AWSCRT_EXIT_CODE | ||
) | ||
if (NOT ${BUILD_AWSCRT_EXIT_CODE} EQUAL 0) | ||
message(FATAL_ERROR "Failed to configure aws crt libraries.") | ||
add_subdirectory(aws-common-runtime/aws-c-common) | ||
if (UNIX AND NOT APPLE) | ||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/aws-common-runtime/s2n/cmake/modules") | ||
find_package(LibCrypto REQUIRED) | ||
add_subdirectory(aws-common-runtime/s2n) | ||
endif() | ||
execute_process(COMMAND ${CMAKE_COMMAND} --build ${AWS_DEPS_BUILD_DIR} --config ${CMAKE_BUILD_TYPE} | ||
RESULT_VARIABLE BUILD_AWSCRT_EXIT_CODE) | ||
if (NOT ${BUILD_AWSCRT_EXIT_CODE} EQUAL 0) | ||
message(FATAL_ERROR "Failed to build aws crt libraries.") | ||
endif() | ||
#the following two lines are done in this branch intentionally, don't move it. project() does some magic that | ||
#we don't want happening until we're done with the above code. | ||
list(APPEND CMAKE_PREFIX_PATH "${AWS_DEPS_INSTALL_DIR}") | ||
project(aws-crt-nodejs C) | ||
add_subdirectory(aws-common-runtime/aws-c-io) | ||
add_subdirectory(aws-common-runtime/aws-c-cal) | ||
add_subdirectory(aws-common-runtime/aws-c-compression) | ||
add_subdirectory(aws-common-runtime/aws-c-http) | ||
add_subdirectory(aws-common-runtime/aws-c-auth) | ||
add_subdirectory(aws-common-runtime/aws-c-mqtt) | ||
set(BUILD_TESTING ${BUILD_TESTING_PREV}) | ||
else() | ||
#the following two lines are done in this branch intentionally, don't move it. project() does some magic that | ||
#we want happening exactly right now. | ||
project(aws-crt-nodejs C) | ||
include(AwsFindPackage) | ||
set(IN_SOURCE_BUILD OFF) | ||
endif() | ||
@@ -83,6 +73,6 @@ | ||
add_library(${CMAKE_PROJECT_NAME} SHARED ${AWS_CRT_SRC}) | ||
aws_set_common_properties(${CMAKE_PROJECT_NAME}) | ||
aws_prepare_symbol_visibility_args(${CMAKE_PROJECT_NAME} "AWS_CRT_NODEJS") | ||
aws_add_sanitizers(${CMAKE_PROJECT_NAME}) | ||
add_library(${PROJECT_NAME} SHARED ${AWS_CRT_SRC}) | ||
aws_set_common_properties(${PROJECT_NAME}) | ||
aws_prepare_symbol_visibility_args(${PROJECT_NAME} "AWS_CRT_NODEJS") | ||
aws_add_sanitizers(${PROJECT_NAME}) | ||
@@ -92,3 +82,3 @@ # Gives our library file a .node extension without any "lib" prefix | ||
target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE | ||
target_include_directories(${PROJECT_NAME} PRIVATE | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
@@ -98,6 +88,6 @@ $<INSTALL_INTERFACE:include> | ||
find_package(aws-c-http REQUIRED) | ||
find_package(aws-c-mqtt REQUIRED) | ||
find_package(aws-c-auth REQUIRED) | ||
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE ${CMAKE_JS_LIB} AWS::aws-c-auth AWS::aws-c-http AWS::aws-c-mqtt) | ||
aws_use_package(aws-c-http REQUIRED) | ||
aws_use_package(aws-c-mqtt REQUIRED) | ||
aws_use_package(aws-c-auth REQUIRED) | ||
target_link_libraries(${PROJECT_NAME} PRIVATE ${CMAKE_JS_LIB} ${DEP_AWS_LIBS}) | ||
@@ -104,0 +94,0 @@ if (CMAKE_JS_PLATFORM AND CMAKE_JS_ARCH) |
@@ -55,3 +55,3 @@ "use strict"; | ||
let parent = undefined; | ||
for (const part in parts) { | ||
for (const part of parts) { | ||
let child = current.children.get(part); | ||
@@ -58,0 +58,0 @@ if (!child) { |
@@ -46,3 +46,3 @@ "use strict"; | ||
let parent = undefined; | ||
for (const part in parts) { | ||
for (const part of parts) { | ||
let child = current.children.get(part); | ||
@@ -49,0 +49,0 @@ if (!child) { |
{ | ||
"name": "aws-crt", | ||
"version": "1.0.2", | ||
"version": "1.0.4", | ||
"description": "NodeJS bindings to the aws-c-* libraries", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/awslabs/aws-crt-nodejs", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12186872
779
5