-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
46 lines (34 loc) · 1.32 KB
/
CMakeLists.txt
File metadata and controls
46 lines (34 loc) · 1.32 KB
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
add_project(aws-cpp-sdk-cognitoidentityprovider-integration-tests
"Tests for the AWS Cognito IDP C++ SDK"
aws-cpp-sdk-cognito-idp
testing-resources
aws-cpp-sdk-core
)
# Headers are included in the source so that they show up in Visual Studio.
# They are included elsewhere for consistency.
file(GLOB AWS_COGNITO_SRC
"${CMAKE_CURRENT_SOURCE_DIR}/*.cpp"
)
file(GLOB AWS_COGNITO_INTEGRATION_TESTS_SRC
${AWS_COGNITO_SRC}
)
if(MSVC AND BUILD_SHARED_LIBS)
add_definitions(-DGTEST_LINKED_AS_SHARED_LIBRARY=1)
endif()
enable_testing()
if(PLATFORM_ANDROID AND BUILD_SHARED_LIBS)
add_library(${PROJECT_NAME} ${AWS_COGNITO_INTEGRATION_TESTS_SRC})
else()
add_executable(${PROJECT_NAME} ${AWS_COGNITO_INTEGRATION_TESTS_SRC})
endif()
set_compiler_flags(${PROJECT_NAME})
set_compiler_warnings(${PROJECT_NAME})
find_package(OpenSSL REQUIRED)
# Include directories for OpenSSL headers
include_directories(${OPENSSL_INCLUDE_DIR})
target_link_libraries(${PROJECT_NAME} ${PROJECT_LIBS} OpenSSL::Crypto)
if(MSVC AND BUILD_SHARED_LIBS)
set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS
"/DELAYLOAD:aws-cpp-sdk-access-management.dll /DELAYLOAD:aws-cpp-sdk-cognito-idp /DELAYLOAD:aws-cpp-sdk-iam /DELAYLOAD:aws-cpp-sdk-core.dll")
target_link_libraries(${PROJECT_NAME} delayimp.lib)
endif()