vcpkg/ports/dlfcn-win32/portfile.cmake

30 lines
1.1 KiB
CMake
Raw Normal View History

2017-03-20 01:06:05 +08:00
include(vcpkg_common_functions)
2017-05-06 20:59:17 +08:00
set(SOURCE_VERSION 1.1.1)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO dlfcn-win32/dlfcn-win32
REF v${SOURCE_VERSION}
SHA512 557729511546f574487f8c7de437c53bcf5ae11640349c338ead9965a4ac0f937de647839b63c821003be54dca5bcbf28f2899d2348acf7dfef31e487da1cba1
HEAD_REF master
2017-03-20 01:06:05 +08:00
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
2017-03-20 01:06:05 +08:00
)
vcpkg_install_cmake()
file(READ ${CURRENT_PACKAGES_DIR}/debug/share/dlfcn-win32/dlfcn-win32-targets-debug.cmake dlfcn-win32_DEBUG_MODULE)
string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" dlfcn-win32_DEBUG_MODULE "${dlfcn-win32_DEBUG_MODULE}")
file(WRITE ${CURRENT_PACKAGES_DIR}/share/dlfcn-win32/dlfcn-win32-targets-debug.cmake "${dlfcn-win32_DEBUG_MODULE}")
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
vcpkg_copy_pdbs()
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright)