2022-07-12 07:22:28 +08:00
if ( EXISTS "${CURRENT_INSTALLED_DIR}/share/spdk-isal/copyright" )
message ( FATAL_ERROR "'${PORT}' conflicts with 'spdk-isal'. Please remove spdk-isal:${TARGET_TRIPLET}, and try to install ${PORT}:${TARGET_TRIPLET} again." )
endif ( )
2022-07-07 05:07:55 +08:00
vcpkg_from_github (
O U T _ S O U R C E _ P A T H S O U R C E _ P A T H
R E P O 0 1 o r g / i s a - l
R E F v 2 . 2 5 . 0
S H A 5 1 2 a a 5 5 6 c 8 b a 2 6 b 4 6 3 7 4 9 3 b 3 d e 5 0 a 2 3 6 3 6 6 6 8 b c f d 7 1 2 4 9 0 2 9 c 5 2 f e 6 9 8 3 d 0 b c f 1 2 0 d 1 b 9 1 f 3 9 a a a 2 5 9 c b 5 8 e 5 9 4 4 8 d 4 0 1 3 6 6 f 3 b f a a e e 2 4 6 0 9 d b 7 e 6 a 1 c d 3 f d f 1 a 9 5 3 e f e
H E A D _ R E F m a s t e r
P A T C H E S f i x - n m a k e . p a t c h
2019-03-05 07:12:28 +08:00
)
2022-07-07 05:07:55 +08:00
vcpkg_find_acquire_program ( YASM )
get_filename_component ( YASM_PATH ${ YASM } DIRECTORY )
vcpkg_add_to_path ( "${YASM_PATH}" )
vcpkg_find_acquire_program ( NASM )
get_filename_component ( NASM_PATH ${ NASM } DIRECTORY )
vcpkg_add_to_path ( "${NASM_PATH}" )
if ( VCPKG_TARGET_IS_WINDOWS )
if ( VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic" )
set ( NMAKE_TARGET dll )
else ( )
set ( NMAKE_TARGET static )
endif ( )
vcpkg_build_nmake (
S O U R C E _ P A T H " $ { S O U R C E _ P A T H } "
P R O J E C T _ N A M E M a k e f i l e . n m a k e
T A R G E T $ { N M A K E _ T A R G E T }
O P T I O N S C C = c l
)
if ( NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug" )
set ( NMAKE_BINARY_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" )
if ( VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic" )
file ( INSTALL "${NMAKE_BINARY_DIR}/isa-l.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin" )
file ( INSTALL "${NMAKE_BINARY_DIR}/isa-l.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib" )
else ( )
file ( INSTALL "${NMAKE_BINARY_DIR}/isa-l_static.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib" )
endif ( )
endif ( )
if ( NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release" )
set ( NMAKE_BINARY_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" )
if ( VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic" )
file ( INSTALL "${NMAKE_BINARY_DIR}/isa-l.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/bin" )
file ( INSTALL "${NMAKE_BINARY_DIR}/isa-l.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib" )
else ( )
file ( INSTALL "${NMAKE_BINARY_DIR}/isa-l_static.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib" )
endif ( )
endif ( )
file ( GLOB ISAL_HDRS "${SOURCE_PATH}/include/*" )
file ( INSTALL ${ ISAL_HDRS } DESTINATION "${CURRENT_PACKAGES_DIR}/include/isal" )
file ( INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/isa-l.def" DESTINATION "${CURRENT_PACKAGES_DIR}/include/isal" )
else ( )
vcpkg_configure_make (
S O U R C E _ P A T H " $ { S O U R C E _ P A T H } "
)
2019-03-05 07:12:28 +08:00
2022-07-07 05:07:55 +08:00
vcpkg_install_make ( )
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share" )
endif ( )
2019-03-05 07:12:28 +08:00
2022-07-07 05:07:55 +08:00
configure_file ( "${CMAKE_CURRENT_LIST_DIR}/isalConfig.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/isalConfig.cmake" @ONLY )
file ( INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" )
file ( INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright )