diff options
author | Eugene Kliuchnikov <eustas@google.com> | 2016-10-18 17:14:49 +0200 |
---|---|---|
committer | Eugene Kliuchnikov <eustas@google.com> | 2016-10-18 17:14:49 +0200 |
commit | b93cb69831093864a4312094c5b27d153f322a80 (patch) | |
tree | d4a85142986d1eece713a27e0b47a85e7d23cc23 | |
parent | f5ba0b6c17d73968eb3b2199b9041fd909a0eb29 (diff) | |
download | brotli-b93cb69831093864a4312094c5b27d153f322a80.zip brotli-b93cb69831093864a4312094c5b27d153f322a80.tar.gz brotli-b93cb69831093864a4312094c5b27d153f322a80.tar.bz2 |
* leave static compilation declaration intouch (e.g. Python build)
-rw-r--r-- | CMakeLists.txt | 3 | ||||
-rwxr-xr-x | include/brotli/port.h | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c439685..fe9d993 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,6 +27,7 @@ mark_as_advanced(BROTLI_BUNDLED_MODE) # When building shared libraries it is important to set the correct rpath. # See https://cmake.org/Wiki/CMake_RPATH_handling#Always_full_RPATH if (BUILD_SHARED_LIBS) + add_definitions(-DBROTLI_SHARED_COMPILATION) set(CMAKE_SKIP_BUILD_RPATH FALSE) set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) @@ -36,7 +37,7 @@ if (BUILD_SHARED_LIBS) endif() endif() -# Parse version information from common/version.h. Normally we would +# Parse version information from common/version.h. Normally we would # define these values here and write them out to configuration file(s) # (i.e., config.h), but in this case we parse them from # common/version.h to be less intrusive. diff --git a/include/brotli/port.h b/include/brotli/port.h index f38bdfa..3613893 100755 --- a/include/brotli/port.h +++ b/include/brotli/port.h @@ -87,7 +87,7 @@ OR: #define BROTLI_INTERNAL BROTLI_ATTRIBUTE_VISIBILITY_HIDDEN #endif -#if defined (_WIN32) +#if defined(BROTLI_SHARED_COMPILATION) && defined(_WIN32) #if defined(BROTLICOMMON_SHARED_COMPILATION) #define BROTLI_COMMON_API __declspec(dllexport) #else |