This repository has been archived by the owner on Nov 15, 2024. It is now read-only.
forked from violethaze74/aws-sdk-cpp
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
76 lines (55 loc) · 1.8 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
add_project(aws-cpp-sdk-amp "C++ SDK for the AWS amp service" aws-cpp-sdk-core)
file(GLOB AWS_AMP_HEADERS
"include/aws/amp/*.h"
)
file(GLOB AWS_AMP_MODEL_HEADERS
"include/aws/amp/model/*.h"
)
file(GLOB AWS_AMP_SOURCE
"source/*.cpp"
)
file(GLOB AWS_AMP_MODEL_SOURCE
"source/model/*.cpp"
)
file(GLOB AMP_UNIFIED_HEADERS
${AWS_AMP_HEADERS}
${AWS_AMP_MODEL_HEADERS}
)
file(GLOB AMP_UNITY_SRC
${AWS_AMP_SOURCE}
${AWS_AMP_MODEL_SOURCE}
)
if(ENABLE_UNITY_BUILD)
enable_unity_build("AMP" AMP_UNITY_SRC)
endif()
file(GLOB AMP_SRC
${AMP_UNIFIED_HEADERS}
${AMP_UNITY_SRC}
)
if(WIN32)
#if we are compiling for visual studio, create a sane directory tree.
if(MSVC)
source_group("Header Files\\aws\\amp" FILES ${AWS_AMP_HEADERS})
source_group("Header Files\\aws\\amp\\model" FILES ${AWS_AMP_MODEL_HEADERS})
source_group("Source Files" FILES ${AWS_AMP_SOURCE})
source_group("Source Files\\model" FILES ${AWS_AMP_MODEL_SOURCE})
endif(MSVC)
endif()
set(AMP_INCLUDES
"${CMAKE_CURRENT_SOURCE_DIR}/include/"
)
add_library(${PROJECT_NAME} ${AMP_SRC})
add_library(AWS::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
set_compiler_flags(${PROJECT_NAME})
set_compiler_warnings(${PROJECT_NAME})
if(USE_WINDOWS_DLL_SEMANTICS AND BUILD_SHARED_LIBS)
target_compile_definitions(${PROJECT_NAME} PRIVATE "AWS_PROMETHEUSSERVICE_EXPORTS")
endif()
target_include_directories(${PROJECT_NAME} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
target_link_libraries(${PROJECT_NAME} PRIVATE ${PLATFORM_DEP_LIBS} ${PROJECT_LIBS})
setup_install()
install (FILES ${AWS_AMP_HEADERS} DESTINATION ${INCLUDE_DIRECTORY}/aws/amp)
install (FILES ${AWS_AMP_MODEL_HEADERS} DESTINATION ${INCLUDE_DIRECTORY}/aws/amp/model)
do_packaging()