early-access version 2853
This commit is contained in:
49
externals/vcpkg/ports/ecos/CMakeLists.txt
vendored
Executable file
49
externals/vcpkg/ports/ecos/CMakeLists.txt
vendored
Executable file
@@ -0,0 +1,49 @@
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
project(ecos C)
|
||||
|
||||
#include(GNUInstallDirs)
|
||||
|
||||
set(EXTERNAL_SRC ${CMAKE_CURRENT_SOURCE_DIR}/external)
|
||||
|
||||
set(SUITESPARSE ${EXTERNAL_SRC}/SuiteSparse_config)
|
||||
add_library(ecos-suitesparse INTERFACE)
|
||||
target_sources(ecos-suitesparse INTERFACE $<BUILD_INTERFACE:${SUITESPARSE}/SuiteSparse_config.h> $<INSTALL_INTERFACE:include/ecos>)
|
||||
target_include_directories(ecos-suitesparse INTERFACE $<BUILD_INTERFACE:${SUITESPARSE}> $<INSTALL_INTERFACE:include/ecos>)
|
||||
target_compile_definitions(ecos-suitesparse INTERFACE DLONG LDL_LONG)
|
||||
|
||||
set(AMD_SRC ${EXTERNAL_SRC}/amd/src)
|
||||
set(AMD_INCLUDE ${EXTERNAL_SRC}/amd/include)
|
||||
add_library(ecos-amd STATIC
|
||||
${AMD_SRC}/amd_1.c ${AMD_SRC}/amd_2.c ${AMD_SRC}/amd_aat.c ${AMD_SRC}/amd_control.c ${AMD_SRC}/amd_defaults.c ${AMD_SRC}/amd_dump.c ${AMD_SRC}/amd_global.c ${AMD_SRC}/amd_info.c ${AMD_SRC}/amd_order.c ${AMD_SRC}/amd_post_tree.c ${AMD_SRC}/amd_postorder.c ${AMD_SRC}/amd_preprocess.c ${AMD_SRC}/amd_valid.c
|
||||
)
|
||||
file(GLOB AMD_HEADERS ${EXTERNAL_SRC}/amd/include/*.h)
|
||||
target_include_directories(ecos-amd PUBLIC $<BUILD_INTERFACE:${AMD_INCLUDE}> $<INSTALL_INTERFACE:include/ecos>)
|
||||
target_link_libraries(ecos-amd ecos-suitesparse)
|
||||
|
||||
|
||||
add_library(ecos-ldl STATIC
|
||||
${EXTERNAL_SRC}/ldl/src/ldl.c
|
||||
)
|
||||
file(GLOB LDL_HEADERS ${EXTERNAL_SRC}/ldl/include/*.h)
|
||||
target_include_directories(ecos-ldl PUBLIC $<BUILD_INTERFACE:${EXTERNAL_SRC}/ldl/include/> $<INSTALL_INTERFACE:include/ecos>)
|
||||
target_link_libraries(ecos-ldl ecos-suitesparse)
|
||||
|
||||
|
||||
add_library(ecos STATIC
|
||||
src/cone.c src/ecos.c src/expcone.c src/preproc.c src/splamm.c src/wright_omega.c src/ctrlc.c src/equil.c src/kkt.c src/spla.c src/timer.c
|
||||
)
|
||||
file(GLOB ECOS_HEADERS include/*.h)
|
||||
target_include_directories(ecos PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include/ecos>)
|
||||
target_link_libraries(ecos ecos-amd ecos-ldl)
|
||||
|
||||
install(FILES ${SUITESPARSE}/SuiteSparse_config.h DESTINATION "include/ecos/")
|
||||
install(FILES ${ECOS_HEADERS} DESTINATION "include/ecos/")
|
||||
install(FILES ${LDL_HEADERS} DESTINATION "include/ecos/")
|
||||
install(FILES ${AMD_HEADERS} DESTINATION "include/ecos/")
|
||||
|
||||
install(TARGETS ecos ecos-amd ecos-ldl ecos-suitesparse EXPORT ecos-targets)
|
||||
install(
|
||||
EXPORT ecos-targets
|
||||
FILE ecos-config.cmake
|
||||
DESTINATION share/ecos/
|
||||
)
|
||||
23
externals/vcpkg/ports/ecos/portfile.cmake
vendored
Executable file
23
externals/vcpkg/ports/ecos/portfile.cmake
vendored
Executable file
@@ -0,0 +1,23 @@
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO embotech/ecos
|
||||
REF v2.0.8
|
||||
SHA512 c1adb188d6b2c400f817de15272472adfd013e2a174f49ec0bb2f7f889f26ba2b7ea165d9bedac3031bd2da7a770f2a285ad825d5b22ccc6cf43c756a20f844f
|
||||
HEAD_REF develop
|
||||
)
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/ecos RENAME copyright)
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH "share/ecos")
|
||||
6
externals/vcpkg/ports/ecos/vcpkg.json
vendored
Executable file
6
externals/vcpkg/ports/ecos/vcpkg.json
vendored
Executable file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "ecos",
|
||||
"version-string": "2.0.8",
|
||||
"port-version": 1,
|
||||
"description": "A lightweight conic solver for second-order cone programming."
|
||||
}
|
||||
Reference in New Issue
Block a user