aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcodicodi <rob.ceglinski@gmail.com>2016-12-06 22:38:25 +0100
committerGitHub <noreply@github.com>2016-12-06 22:38:25 +0100
commitf1a3424c772581f70351a9dfbf73c9f8d2a9e521 (patch)
tree6a9400c4698c85dedc570fecbc7420f2c02bde94
parent175bb41f822891eb3a69795eb132c85f5b869a4b (diff)
downloadvcpkg-f1a3424c772581f70351a9dfbf73c9f8d2a9e521.tar.gz
vcpkg-f1a3424c772581f70351a9dfbf73c9f8d2a9e521.zip
[libflac] update config in static builds
Now static libs can be used without defining FLAC__NO_DLL by user.
-rw-r--r--ports/libflac/portfile.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/ports/libflac/portfile.cmake b/ports/libflac/portfile.cmake
index bb7daae72..79445a406 100644
--- a/ports/libflac/portfile.cmake
+++ b/ports/libflac/portfile.cmake
@@ -26,6 +26,11 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
vcpkg_copy_pdbs()
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ file(APPEND ${CURRENT_PACKAGES_DIR}/include/FLAC/export.h "#undef FLAC_API\n#define FLAC_API\n")
+ file(APPEND ${CURRENT_PACKAGES_DIR}/include/FLAC++/export.h "#undef FLAC_API\n#define FLAC_API\n")
+endif()
+
# This license (BSD) is relevant only for library - if someone would want to install
# FLAC cmd line tools as well additional license (GPL) should be included
file(COPY ${SOURCE_PATH}/COPYING.Xiph DESTINATION ${CURRENT_PACKAGES_DIR}/share/libflac)