aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)