File tree 2 files changed +17
-1
lines changed
2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -290,6 +290,22 @@ if (LEGACY_BUILD)
290
290
set (ARCHIVE_DIRECTORY "${LIBRARY_DIRECTORY} " )
291
291
endif ()
292
292
293
+ # We need to point this to the directory containing import libraries or static
294
+ # libraries on Windows, and to the directory containing the so / dylib
295
+ # libraries on other platforms.
296
+ if (WIN32 )
297
+ set (PKG_CONFIG_LIB_DIRECTORY "${ARCHIVE_DIRECTORY} " )
298
+ else ()
299
+ set (PKG_CONFIG_LIB_DIRECTORY "${LIBRARY_DIRECTORY} " )
300
+ endif ()
301
+
302
+ # MSVC consumers of the shared library need to define this macro when linking
303
+ # to aws-cpp-sdk-* libs, or they will get undefined reference errors. Also
304
+ # doesn't hurt to define this with MinGW, so add it unconditionally on Windows.
305
+ if (WIN32 AND BUILD_SHARED_LIBS )
306
+ set (PKG_CONFIG_EXPORT_CFLAGS "-DUSE_IMPORT_EXPORT" )
307
+ endif ()
308
+
293
309
if (ENABLE_ADDRESS_SANITIZER)
294
310
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -g -fno-omit-frame-pointer" )
295
311
if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.1)
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ libdir=@CMAKE_INSTALL_PREFIX@/@LIBRARY_DIRECTORY@
4
4
Name: @PROJECT_NAME@
5
5
Description: @PROJECT_DESCRIPTION@
6
6
Version: @PROJECT_VERSION@
7
- Cflags: -I${includedir} @PKG_CONFIG_CFLAGS@
7
+ Cflags: -I${includedir} @PKG_CONFIG_CFLAGS@ @PKG_CONFIG_EXPORT_CFLAGS@
8
8
Libs: -L${libdir} -l@PROJECT_NAME@
9
9
Libs.private: @ALL_DEP_LIBS_LINK_FLAGS@
10
10
Requires: @PROJECT_LIBS_STRING@
You can’t perform that action at this time.
0 commit comments