vcpkg/ports/wolftpm/portfile.cmake

28 lines
779 B
CMake
Raw Normal View History

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO wolfssl/wolftpm
REF v2.5.0
SHA512 4047671171fda4115a4e94bbd2362642752efbaf30531b1f55f6fe66e2e90bdf3b5549c6ddf4e53dce3b6f44c59e792217b2be4c5650857d28193aa5466919fc
HEAD_REF master
PATCHES
wolftpm_pr235.diff
)
vcpkg_cmake_configure(SOURCE_PATH ${SOURCE_PATH}
OPTIONS
-DWOLFTPM_EXAMPLES=no
-DWOLFTPM_BUILD_OUT_OF_TREE=yes
OPTIONS_DEBUG
-DCMAKE_C_FLAGS='-DDEBUG_WOLFTPM'
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/wolftpm)
vcpkg_fixup_pkgconfig()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")