mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-15 04:47:59 +08:00
Add ability to build static libraries and copy correct license file
This commit is contained in:
parent
7561bbd045
commit
eb2a2e375d
@ -4,7 +4,7 @@ index 0feb068..74e5613 100644
|
||||
+++ "b/include/iconv.h.build.in"
|
||||
@@ -27,6 +27,12 @@
|
||||
#define LIBICONV_DLL_EXPORTED __attribute__((__visibility__("default")))
|
||||
+#elif defined(_WIN32)
|
||||
+#elif defined(_WIN32) && @LIBICONV_DYNAMIC@
|
||||
+ #if defined(libiconv_EXPORTS)
|
||||
+ #define LIBICONV_DLL_EXPORTED __declspec(dllexport)
|
||||
+ #else
|
||||
@ -21,7 +21,7 @@ index c691359..2a23585 100644
|
||||
+++ "b/libcharset/include/localcharset.h.build.in"
|
||||
@@ -24,6 +24,12 @@
|
||||
#define LIBCHARSET_DLL_EXPORTED __attribute__((__visibility__("default")))
|
||||
+#elif defined(_WIN32)
|
||||
+#elif defined(_WIN32) && @LIBICONV_DYNAMIC@
|
||||
+ #if defined(libcharset_EXPORTS)
|
||||
+ #define LIBCHARSET_DLL_EXPORTED __declspec(dllexport)
|
||||
+ #else
|
||||
|
@ -9,7 +9,6 @@ project(Libiconv)
|
||||
#
|
||||
# Options
|
||||
#
|
||||
set(BUILD_SHARED_LIBS ON CACHE BOOL "Build shared libraries, Always ON since this code is LGPL" FORCE)
|
||||
|
||||
# Config file
|
||||
configure_file(
|
||||
@ -17,6 +16,11 @@ configure_file(
|
||||
${Libiconv_BINARY_DIR}/config.h
|
||||
)
|
||||
|
||||
if(BUILD_SHARED_LIBS)
|
||||
set(LIBICONV_DYNAMIC "1 /*LIBICONV_DYNAMIC*/")
|
||||
else()
|
||||
set(LIBICONV_DYNAMIC "0 /*LIBICONV_DYNAMIC*/")
|
||||
endif()
|
||||
set(HAVE_WCHAR_T "1 /*HAVE_WCHAR_T*/")
|
||||
set(USE_MBSTATE_T "0 /*USE_MBSTATE_T*/")
|
||||
set(BROKEN_WCHAR_H "0 /*BROKEN_WCHAR_H*/")
|
||||
|
@ -1,3 +1,4 @@
|
||||
include(${CMAKE_TRIPLET_FILE})
|
||||
include(vcpkg_common_functions)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://ftp.gnu.org/gnu/libiconv/libiconv-1.14.tar.gz"
|
||||
@ -22,8 +23,8 @@ vcpkg_configure_cmake(
|
||||
vcpkg_install_cmake()
|
||||
|
||||
# Handle copyright
|
||||
file(COPY ${CURRENT_BUILDTREES_DIR}/src/libiconv-1.14/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libiconv)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libiconv/COPYING ${CURRENT_PACKAGES_DIR}/share/libiconv/copyright)
|
||||
file(COPY ${CURRENT_BUILDTREES_DIR}/src/libiconv-1.14/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/libiconv)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libiconv/COPYING.LIB ${CURRENT_PACKAGES_DIR}/share/libiconv/copyright)
|
||||
|
||||
# clean out the debug include
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
Loading…
x
Reference in New Issue
Block a user