ENH: libsodium: Copy necessary files

This commit is contained in:
xoviat 2017-10-17 18:43:54 -05:00 committed by GitHub
parent b3f123fdd0
commit 9642423f1d

View File

@ -12,20 +12,53 @@ vcpkg_from_github(
) )
if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
vcpkg_build_msbuild( set(LIBSODIUM_RELEASE_CONFIGURATION ReleaseDLL)
PROJECT_PATH ${SOURCE_PATH}/libsodium.vcxproj set(LIBSODIUM_DEBUG_CONFIGURATION DebugDLL)
RELEASE_CONFIGURATION ReleaseDLL
DEBUG_CONFIGURATION DebugDLL
)
else() else()
vcpkg_build_msbuild( set(LIBSODIUM_RELEASE_CONFIGURATION Release)
PROJECT_PATH ${SOURCE_PATH}/libsodium.vcxproj set(LIBSODIUM_DEBUG_CONFIGURATION Debug)
)
endif() endif()
vcpkg_build_msbuild(
PROJECT_PATH ${SOURCE_PATH}/libsodium.vcxproj
RELEASE_CONFIGURATION ${LIBSODIUM_RELEASE_CONFIGURATION}
DEBUG_CONFIGURATION ${LIBSODIUM_DEBUG_CONFIGURATION}
)
IF(VCPKG_TARGET_ARCHITECTURE MATCHES "x86")
SET(BUILD_ARCH "Win32")
ELSE()
SET(BUILD_ARCH ${VCPKG_TARGET_ARCHITECTURE})
ENDIF()
file(GLOB LIBSODIUM_HEADERS "${SOURCE_PATH}/src/libsodium/include/sodium/*.h")
file(INSTALL
${LIBSODIUM_HEADERS}
DESTINATION ${CURRENT_PACKAGES_DIR}/include/sodium
)
file(INSTALL file(INSTALL
${SOURCE_PATH}/LICENSE Build\${LIBSODIUM_RELEASE_CONFIGURATION}\${BUILD_ARCH}\libsodium.dll
DESTINATION ${CURRENT_PACKAGES_DIR}/share/libsodium DESTINATION ${CURRENT_PACKAGES_DIR}/bin
RENAME copyright )
file(INSTALL
Build\${LIBSODIUM_RELEASE_CONFIGURATION}\${BUILD_ARCH}\libsodium.lib
DESTINATION ${CURRENT_PACKAGES_DIR}/lib
)
file(INSTALL
Build\${LIBSODIUM_DEBUG_CONFIGURATION}\${BUILD_ARCH}\libsodium.dll
DESTINATION ${CURRENT_PACKAGES_DIR}/bin/debug
)
file(INSTALL
Build\${LIBSODIUM_DEBUG_CONFIGURATION}\${BUILD_ARCH}\libsodium.lib
DESTINATION ${CURRENT_PACKAGES_DIR}/lib/debug
)
vcpkg_copy_pdbs()
file(INSTALL
${SOURCE_PATH}/LICENSE
DESTINATION ${CURRENT_PACKAGES_DIR}/share/libsodium
RENAME copyright
) )