From f1a3424c772581f70351a9dfbf73c9f8d2a9e521 Mon Sep 17 00:00:00 2001 From: codicodi Date: Tue, 6 Dec 2016 22:38:25 +0100 Subject: [libflac] update config in static builds Now static libs can be used without defining FLAC__NO_DLL by user. --- ports/libflac/portfile.cmake | 5 +++++ 1 file changed, 5 insertions(+) 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) -- cgit v1.2.3