diff options
| author | JackBoosY <47264268+JackBoosY@users.noreply.github.com> | 2019-03-26 05:06:55 +0800 |
|---|---|---|
| committer | Phil Christensen <philc@microsoft.com> | 2019-03-25 14:06:55 -0700 |
| commit | f1164a25918f0f73c3d083ad6da687c6285da148 (patch) | |
| tree | 56bb897d1ecb7825793fa066ffdef66f6054cb37 | |
| parent | 7f364076bb708cf2142715ff9e0829dfcbc92b4e (diff) | |
| download | vcpkg-f1164a25918f0f73c3d083ad6da687c6285da148.tar.gz vcpkg-f1164a25918f0f73c3d083ad6da687c6285da148.zip | |
[apr-util]Fix static library usage bug. (#5769)
* [apr-util]Fix static library usage bug.
* [apr-util]Fix macro error.
| -rw-r--r-- | ports/apr-util/CONTROL | 2 | ||||
| -rw-r--r-- | ports/apr-util/portfile.cmake | 22 |
2 files changed, 16 insertions, 8 deletions
diff --git a/ports/apr-util/CONTROL b/ports/apr-util/CONTROL index 81814a2ca..1ff406efd 100644 --- a/ports/apr-util/CONTROL +++ b/ports/apr-util/CONTROL @@ -1,4 +1,4 @@ Source: apr-util -Version: 1.6.0-1 +Version: 1.6.0-2 Description: Apache Portable Runtime (APR) project mission is to create and maintain software libraries that provide a predictable and consistent interface to underlying platform-specific implementation Build-Depends: expat, apr, openssl diff --git a/ports/apr-util/portfile.cmake b/ports/apr-util/portfile.cmake index abff4b47d..6ac311d76 100644 --- a/ports/apr-util/portfile.cmake +++ b/ports/apr-util/portfile.cmake @@ -13,16 +13,24 @@ vcpkg_apply_patches( PATCHES "${CMAKE_CURRENT_LIST_DIR}/use-vcpkg-expat.patch" ) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON -) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DAPU_DECLARE_EXPORT=ON + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON + ) +else() + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DAPU_DECLARE_STATIC=ON + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON + ) +endif() vcpkg_install_cmake() - file(READ ${CURRENT_PACKAGES_DIR}/include/apu.h APU_H) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) string(REPLACE "defined(APU_DECLARE_EXPORT)" "1" APU_H "${APU_H}") |
