diff options
| author | icedream2linxi <icedream2linxi@qq.com> | 2018-08-26 10:05:56 +0800 |
|---|---|---|
| committer | icedream2linxi <icedream2linxi@qq.com> | 2018-08-26 10:05:56 +0800 |
| commit | 197645a0f7be6d24ae972fdbe1aa010e6591731e (patch) | |
| tree | b62efe4284db0173f4eacb2d947a23bf050cf400 | |
| parent | 04ba5aa07bddb72056a5a04ed705f54bc515923f (diff) | |
| download | vcpkg-197645a0f7be6d24ae972fdbe1aa010e6591731e.tar.gz vcpkg-197645a0f7be6d24ae972fdbe1aa010e6591731e.zip | |
[icu] Support for compiling static libraries.
| -rw-r--r-- | ports/icu/portfile.cmake | 6 | ||||
| -rw-r--r-- | ports/icu/remove-MD-from-configure.patch | 18 |
2 files changed, 23 insertions, 1 deletions
diff --git a/ports/icu/portfile.cmake b/ports/icu/portfile.cmake index ee558d886..f331537f9 100644 --- a/ports/icu/portfile.cmake +++ b/ports/icu/portfile.cmake @@ -28,7 +28,9 @@ vcpkg_download_distfile( vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/src/icu-${VERSION})
vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH}
- PATCHES ${CMAKE_CURRENT_LIST_DIR}/disable-escapestr-tool.patch)
+ PATCHES ${CMAKE_CURRENT_LIST_DIR}/disable-escapestr-tool.patch
+ ${CMAKE_CURRENT_LIST_DIR}/remove-MD-from-configure.patch
+)
set(CONFIGURE_OPTIONS "--disable-samples --disable-tests")
@@ -44,6 +46,8 @@ set(CONFIGURE_OPTIONS_DEBUG "--enable-debug --disable-release --prefix=${CURREN if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
set(BASH bash)
+ set(VCPKG_C_FLAGS "${VCPKG_C_FLAGS} -fPIC")
+ set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS} -fPIC")
# Configure release
message(STATUS "Configuring ${TARGET_TRIPLET}-rel")
diff --git a/ports/icu/remove-MD-from-configure.patch b/ports/icu/remove-MD-from-configure.patch new file mode 100644 index 000000000..d35205ebf --- /dev/null +++ b/ports/icu/remove-MD-from-configure.patch @@ -0,0 +1,18 @@ +diff -urN a/source/runConfigureICU b/source/runConfigureICU +--- a/source/runConfigureICU 2018-03-26 21:38:44.000000000 +0800 ++++ b/source/runConfigureICU 2018-08-26 09:04:53.197454400 +0800 +@@ -322,10 +322,10 @@ + THE_COMP="Microsoft Visual C++" + CC=cl; export CC + CXX=cl; export CXX +- RELEASE_CFLAGS='-Gy -MD' +- RELEASE_CXXFLAGS='-Gy -MD' +- DEBUG_CFLAGS='-Zi -MDd' +- DEBUG_CXXFLAGS='-Zi -MDd' ++ RELEASE_CFLAGS='-Gy' ++ RELEASE_CXXFLAGS='-Gy' ++ DEBUG_CFLAGS='-Zi' ++ DEBUG_CXXFLAGS='-Zi' + DEBUG_LDFLAGS='-DEBUG' + ;; + *BSD) |
