vcpkg/ports/expat/portfile.cmake

30 lines
1.0 KiB
CMake
Raw Normal View History

2016-09-19 11:50:08 +08:00
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/expat-2.1.1)
2016-09-19 11:50:08 +08:00
vcpkg_download_distfile(ARCHIVE_FILE
URLS "http://downloads.sourceforge.net/project/expat/expat/2.1.1/expat-2.1.1.tar.bz2"
2016-09-19 11:50:08 +08:00
FILENAME "expat-2.1.1.tar.bz2"
SHA512 088e2ef3434f2affd4fc79fe46f0e9826b9b4c3931ddc780cd18892f1cd1e11365169c6807f45916a56bb6abcc627dcd17a23f970be0bf464f048f5be2713628
2016-09-19 11:50:08 +08:00
)
vcpkg_extract_source_archive(${ARCHIVE_FILE})
2016-11-01 04:47:07 +08:00
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
set(EXPAT_LINKAGE ON)
else()
set(EXPAT_LINKAGE OFF)
endif()
2016-09-19 11:50:08 +08:00
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
2016-09-19 11:50:08 +08:00
OPTIONS
-DBUILD_examples=OFF
-DBUILD_tests=OFF
-DBUILD_tools=OFF
2016-11-01 04:47:07 +08:00
-DBUILD_shared=${EXPAT_LINKAGE}
2016-09-19 11:50:08 +08:00
)
vcpkg_install_cmake()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig ${CURRENT_PACKAGES_DIR}/lib/pkgconfig)
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/expat RENAME copyright)
2016-11-01 04:47:07 +08:00
2016-09-19 11:50:08 +08:00
vcpkg_copy_pdbs()