early-access version 2853
This commit is contained in:
47
externals/vcpkg/ports/liblinear/CMakeLists.txt
vendored
Executable file
47
externals/vcpkg/ports/liblinear/CMakeLists.txt
vendored
Executable file
@@ -0,0 +1,47 @@
|
||||
cmake_minimum_required(VERSION 3.9)
|
||||
project(liblinear)
|
||||
|
||||
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
|
||||
|
||||
add_library(blas OBJECT
|
||||
blas/daxpy.c
|
||||
blas/ddot.c
|
||||
blas/dnrm2.c
|
||||
blas/dscal.c
|
||||
)
|
||||
|
||||
add_library(liblinear
|
||||
linear.cpp
|
||||
newton.cpp
|
||||
$<TARGET_OBJECTS:blas>
|
||||
)
|
||||
target_include_directories(liblinear PRIVATE .)
|
||||
if(BUILD_SHARED_LIBS)
|
||||
target_link_libraries(liblinear PRIVATE "-DEF:${CMAKE_CURRENT_SOURCE_DIR}/linear.def")
|
||||
endif()
|
||||
|
||||
add_executable(train train.c $<TARGET_OBJECTS:blas>)
|
||||
target_link_libraries(train liblinear)
|
||||
|
||||
add_executable(predict predict.c $<TARGET_OBJECTS:blas>)
|
||||
target_link_libraries(predict liblinear)
|
||||
|
||||
install(
|
||||
TARGETS liblinear
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
)
|
||||
|
||||
if(NOT DISABLE_INSTALL_TOOLS)
|
||||
install(
|
||||
TARGETS train predict
|
||||
RUNTIME DESTINATION tools/liblinear
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT DISABLE_INSTALL_HEADERS)
|
||||
install(
|
||||
FILES linear.h newton.h
|
||||
DESTINATION include/liblinear)
|
||||
endif()
|
||||
26
externals/vcpkg/ports/liblinear/portfile.cmake
vendored
Executable file
26
externals/vcpkg/ports/liblinear/portfile.cmake
vendored
Executable file
@@ -0,0 +1,26 @@
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO cjlin1/liblinear
|
||||
REF 60f1adf6f35d6f3e031c334b33dfe8399d6f8a9d #v243
|
||||
SHA512 0f88f8dd768313d0a9b3bb82e7b878d7173ea43ef609e993dc79e94398897373faf2688249b17111e2b6e06e78e26a50570a1b746dc4e73fb7416ccc24936c66
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS_DEBUG
|
||||
-DDISABLE_INSTALL_HEADERS=ON
|
||||
-DDISABLE_INSTALL_TOOLS=ON
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
if(NOT DISABLE_INSTALL_TOOLS)
|
||||
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/liblinear")
|
||||
endif()
|
||||
|
||||
file(INSTALL "${SOURCE_PATH}/COPYRIGHT" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
file(INSTALL "${SOURCE_PATH}/README" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
18
externals/vcpkg/ports/liblinear/vcpkg.json
vendored
Executable file
18
externals/vcpkg/ports/liblinear/vcpkg.json
vendored
Executable file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "liblinear",
|
||||
"version": "243",
|
||||
"port-version": 1,
|
||||
"description": "A Library for Large Linear Classification",
|
||||
"homepage": "https://github.com/cjlin1/liblinear",
|
||||
"supports": "!uwp",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user