@@ -40,9 +40,14 @@ else ()
40
40
set (CMAKE_CXX_EXTENSIONS OFF )
41
41
set (CMAKE_CXX_STANDARD_REQUIRED ON )
42
42
43
- message (STATUS "Building ${PROJECT_NAME} ${CMAKE_PROJECT_VERSION} " )
43
+ # Setting build to hide symbols in targets by default
44
+ set (CMAKE_CXX_VISIBILITY_PRESET hidden)
45
+ set (CMAKE_VISIBILITY_INLINES_HIDDEN YES )
44
46
45
- # Setting version header for library
47
+ # Preventing writes to package registry by default
48
+ set (CMAKE_EXPORT_NO_PACKAGE_REGISTRY YES )
49
+
50
+ message (STATUS "Generating source file for introspection of version to ${CMAKE_PROJECT_VERSION} " )
46
51
configure_file (
47
52
VersionConfig.h.in
48
53
src/aws-cpp-sdk-core/include /aws/core/VersionConfig.h
@@ -62,10 +67,31 @@ else ()
62
67
message (FATAL_ERROR "Unknown build type: ${CMAKE_BUILD_TYPE} " )
63
68
endif ()
64
69
endif ()
65
- option (BUILD_TESTS "If enabled, the SDK will include tests in the build" OFF )
70
+
71
+ # Options definition
72
+ option (BUILD_TESTING "If enabled, the SDK will include tests in the build" OFF )
73
+
74
+ message (STATUS "Setting toolchain and dependencies" )
75
+ if (BUILD_TESTING)
76
+ message (STATUS "Building tests" )
77
+ enable_testing ()
78
+ # Testing dependency
79
+ find_package (GTest 1.11 REQUIRED )
80
+ include (GoogleTest) # for gtest_discover_tests()
81
+ endif ()
82
+
83
+ # Project dependencies http library (curl or OS), tinyxml2, cJSON, ssl (open or other), CRT
84
+ find_package (CURL REQUIRED)
85
+ find_package (ZLIB REQUIRED)
86
+ find_package (OpenSSL REQUIRED COMPONENTS Crypto)
87
+ pkg_check_modules(tinyxml2 REQUIRED IMPORTED_TARGET tinyxml2>=9.0.0)
88
+ pkg_check_modules(CJSON REQUIRED IMPORTED_TARGET libcjson>=1.7.15)
89
+ find_package (aws-crt-cpp 0.17.9 EXACT REQUIRED COMPONENTS io)
90
+
91
+ message (WARNING "The dependencies are currently checked only for a basic Linux build, new ones need to be added for other platforms yet" )
66
92
67
93
message (WARNING "Anything below this warning is a TODO not yet implemented." )
68
- message ( STATUS "Detecting toolchain and external dependencies." )
94
+
69
95
message (STATUS "Setting up core library." )
70
96
message (STATUS "Prepare CRT dependency." )
71
97
message (STATUS "Building core library." )
0 commit comments