vcpkg/ports/lzo/portfile.cmake
2017-05-08 11:04:00 +02:00

40 lines
1.5 KiB
CMake

# Common Ambient Variables:
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
# TARGET_TRIPLET is the current triplet (x86-windows, etc)
# PORT is the current port name (zlib, etc)
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
#
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
message(STATUS "Warning: Dynamic building not supported yet. Building static.")
set(VCPKG_LIBRARY_LINKAGE static)
endif()
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/lzo-2.10)
vcpkg_download_distfile(ARCHIVE
URLS "http://www.oberhumer.com/opensource/lzo/download/lzo-2.10.tar.gz"
FILENAME "lzo-2.10.tar.gz"
SHA512 a3dae5e4a6b93b1f5bf7435e8ab114a9be57252e9efc5dd444947d7a2d031b0819f34bcaeb35f60b5629a01b1238d738735a64db8f672be9690d3c80094511a4
)
vcpkg_extract_source_archive(${ARCHIVE})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
# OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2
# OPTIONS_RELEASE -DOPTIMIZE=1
# OPTIONS_DEBUG -DDEBUGGABLE=1
)
vcpkg_install_cmake()
vcpkg_copy_pdbs()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
# Handle copyright
file(COPY ${CURRENT_BUILDTREES_DIR}/src/lzo-2.10/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/lzo)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/lzo/COPYING ${CURRENT_PACKAGES_DIR}/share/lzo/copyright)