[apr-util]Fix static library usage bug. (#5769)

* [apr-util]Fix static library usage bug.

* [apr-util]Fix macro error.
This commit is contained in:
JackBoosY 2019-03-26 05:06:55 +08:00 committed by Phil Christensen
parent 7f364076bb
commit f1164a2591
2 changed files with 16 additions and 8 deletions

View File

@ -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

View File

@ -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}")