forked from Azure/azure-iot-sdk-c
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
75 lines (63 loc) · 2.77 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#Copyright (c) Microsoft. All rights reserved.
#Licensed under the MIT license. See LICENSE file in the project root for full license information.
#this is CMakeLists for provisioning_service_client
if(NOT ${use_http})
message("provisioning service client needs HTTP support - use_http option was ${use_http}")
return()
endif()
compileAsC99()
set(provisioning_service_client_c_files
./src/provisioning_sc_attestation_mechanism.c
./src/provisioning_sc_bulk_operation.c
./src/provisioning_sc_device_capabilities.c
./src/provisioning_sc_device_registration_state.c
./src/provisioning_sc_enrollment.c
./src/provisioning_sc_query.c
./src/provisioning_sc_shared_helpers.c
./src/provisioning_sc_tpm_attestation.c
./src/provisioning_sc_twin.c
./src/provisioning_sc_x509_attestation.c
./src/provisioning_service_client.c
)
set(provisioning_service_client_h_files
./inc/prov_service_client/provisioning_sc_attestation_mechanism.h
./inc/prov_service_client/provisioning_sc_bulk_operation.h
./inc/prov_service_client/provisioning_sc_device_capabilities.h
./inc/prov_service_client/provisioning_sc_device_registration_state.h
./inc/prov_service_client/provisioning_sc_enrollment.h
./inc/prov_service_client/provisioning_sc_json_const.h
./inc/prov_service_client/provisioning_sc_models.h
./inc/prov_service_client/provisioning_sc_models_serializer.h
./inc/prov_service_client/provisioning_sc_query.h
./inc/prov_service_client/provisioning_sc_shared_helpers.h
./inc/prov_service_client/provisioning_sc_tpm_attestation.h
./inc/prov_service_client/provisioning_sc_twin.h
./inc/prov_service_client/provisioning_sc_x509_attestation.h
./inc/prov_service_client/provisioning_service_client.h
)
include_directories(${SHARED_UTIL_INC_FOLDER})
include_directories(${UHTTP_C_INC_FOLDER})
include_directories(${CMAKE_CURRENT_LIST_DIR}/../deps/parson)
set(PROVISIONING_SERVICE_CLIENT_INC_FOLDER ${CMAKE_CURRENT_LIST_DIR}/inc CACHE INTERNAL "This is the include folder for provisioning_service_client" FORCE)
include_directories(${PROVISIONING_SERVICE_CLIENT_INC_FOLDER})
include_directories(${DEV_AUTH_MODULES_CLIENT_INC_FOLDER})
IF(WIN32)
#windows needs this define
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
add_definitions(-DGB_MEASURE_MEMORY_FOR_THIS -DGB_DEBUG_ALLOC)
ENDIF(WIN32)
add_library(provisioning_service_client
${provisioning_service_client_c_files}
${provisioning_service_client_h_files})
target_link_libraries(provisioning_service_client parson uhttp)
if (NOT ${ARCHITECTURE} STREQUAL "ARM")
if (NOT ${skip_samples})
add_subdirectory(samples)
endif()
endif()
if(NOT IN_OPENWRT)
# Disable tests for OpenWRT
if(${run_unittests})
add_subdirectory(tests)
endif()
endif()