Fix coin-or ports. (#29398)

* add stuff

* coinutils stuff

* coin-or-* fixes!

* fix patch

* Fix openmvg

* fix openmvg by modifying includes

* fix ipopt.

* add !uwp supports in coinutils

* try fixing openmvg on osx

* format manifest and license stuff

* fix linkage

* v db
This commit is contained in:
Alexander Neumann 2023-02-09 23:51:04 +01:00 committed by GitHub
parent e039ba75d2
commit d84e61c2c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
47 changed files with 575 additions and 672 deletions

View File

@ -1,125 +0,0 @@
cmake_minimum_required(VERSION 3.11)
project(Cgl LANGUAGES C CXX)
set(PROJECT_VERSION 0.60.2)
set(PROJECT_VERSION_MAJOR 0)
set(PROJECT_VERSION_MINOR 60)
set(PROJECT_VERSION_PATCH 2)
set(CMAKE_CXX_STANDARD 14)
set(INSTALL_BIN_DIR "bin" CACHE PATH "Path where exe and dll will be installed")
set(INSTALL_LIB_DIR "lib" CACHE PATH "Path where lib will be installed")
set(INSTALL_INCLUDE_DIR "include/Coin" CACHE PATH "Path where headers will be installed")
set(INSTALL_CMAKE_DIR "share/cgl" CACHE PATH "Path where cmake configs will be installed")
# Make relative paths absolute (needed later on)
set(RELATIVE_INSTALL_INCLUDE_DIR ${INSTALL_INCLUDE_DIR})
foreach(p LIB BIN INCLUDE CMAKE)
set(var INSTALL_${p}_DIR)
if(NOT IS_ABSOLUTE "${${var}}")
set(${var} "${CMAKE_INSTALL_PREFIX}/${${var}}")
endif()
endforeach()
find_package(CoinUtils REQUIRED)
find_package(Osi REQUIRED)
find_package(Clp REQUIRED)
file(GLOB CGL_SOURCES
Cgl/src/CglConfig.h
Cgl/src/*.hpp
Cgl/src/*.cpp
Cgl/src/CglAllDifferent/*.cpp
Cgl/src/CglAllDifferent/*.hpp
Cgl/src/CglBKClique/*.cpp
Cgl/src/CglBKClique/*.hpp
Cgl/src/CglClique/*.cpp
Cgl/src/CglClique/*.hpp
Cgl/src/CglCliqueMerging/*.cpp
Cgl/src/CglCliqueMerging/*.hpp
Cgl/src/CglDuplicateRow/*.cpp
Cgl/src/CglDuplicateRow/*.hpp
Cgl/src/CglFlowCover/*.cpp
Cgl/src/CglFlowCover/*.hpp
Cgl/src/CglGMI/*.cpp
Cgl/src/CglGMI/*.hpp
Cgl/src/CglGomory/*.cpp
Cgl/src/CglGomory/*.hpp
Cgl/src/CglKnapsackCover/*.cpp
Cgl/src/CglKnapsackCover/*.hpp
Cgl/src/CglLandP/*.cpp
Cgl/src/CglLandP/*.hpp
Cgl/src/CglLiftAndProject/*.cpp
Cgl/src/CglLiftAndProject/*.hpp
Cgl/src/CglMixedIntegerRounding/*.cpp
Cgl/src/CglMixedIntegerRounding/*.hpp
Cgl/src/CglMixedIntegerRounding2/*.cpp
Cgl/src/CglMixedIntegerRounding2/*.hpp
Cgl/src/CglOddHole/*.cpp
Cgl/src/CglOddHole/*.hpp
Cgl/src/CglOddHoleWC/*.cpp
Cgl/src/CglOddHoleWC/*.hpp
Cgl/src/CglPreProcess/*.cpp
Cgl/src/CglPreProcess/*.hpp
Cgl/src/CglProbing/*.cpp
Cgl/src/CglProbing/*.hpp
Cgl/src/CglRedSplit/*.cpp
Cgl/src/CglRedSplit/*.hpp
Cgl/src/CglRedSplit2/*.cpp
Cgl/src/CglRedSplit2/*.hpp
Cgl/src/CglResidualCapacity/*.cpp
Cgl/src/CglResidualCapacity/*.hpp
Cgl/src/CglSimpleRounding/*.cpp
Cgl/src/CglSimpleRounding/*.hpp
Cgl/src/CglTwomir/*.cpp
Cgl/src/CglTwomir/*.hpp
Cgl/src/CglZeroHalf/*.cpp
Cgl/src/CglZeroHalf/*.hpp)
add_library(${PROJECT_NAME} ${CGL_SOURCES})
target_include_directories(${PROJECT_NAME}
PUBLIC
$<INSTALL_INTERFACE:${RELATIVE_INSTALL_INCLUDE_DIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Cgl/src/>)
target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_CMATH)
target_compile_definitions(${PROJECT_NAME} PUBLIC COIN_HAS_CLP)
target_link_libraries(${PROJECT_NAME} PRIVATE Coin::CoinUtils Coin::Osi Coin::Clp)
install(DIRECTORY Cgl/src/
DESTINATION ${INSTALL_INCLUDE_DIR}
FILES_MATCHING
PATTERN "*.h"
PATTERN "*.hpp"
PATTERN "config_default.h" EXCLUDE)
install(TARGETS ${PROJECT_NAME}
EXPORT "${PROJECT_NAME}Targets"
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin)
include(CMakePackageConfigHelpers)
set(version_config "${CMAKE_CURRENT_BINARY_DIR}/temp/${PROJECT_NAME}ConfigVersion.cmake")
set(project_config "${CMAKE_CURRENT_BINARY_DIR}/temp/${PROJECT_NAME}Config.cmake")
set(namespace "Coin::")
write_basic_package_version_file("${version_config}"
COMPATIBILITY SameMajorVersion)
configure_package_config_file("Config.cmake.in"
"${project_config}"
INSTALL_DESTINATION
"${INSTALL_CMAKE_DIR}")
install(FILES "${project_config}" "${version_config}"
DESTINATION "${INSTALL_CMAKE_DIR}")
install(EXPORT "${PROJECT_NAME}Targets"
NAMESPACE "${namespace}"
DESTINATION "${INSTALL_CMAKE_DIR}")

View File

@ -1,5 +0,0 @@
@PACKAGE_INIT@
include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")
check_required_components("@PROJECT_NAME@")

View File

@ -1,27 +0,0 @@
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO coin-or/Cgl
REF 31797b2997219934db02a40d501c4b6d8efa7398 # 0.60.3
SHA512 33e01acdfd2057541492f4e83c0554ed74489995c47cef0b954529d4603090d03457fdababb331132b3fd286c985e46a3c8e3abbdb2eed36e7eaa8102acd095e
PATCHES fix-c1083-error.patch
)
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/Config.cmake.in" DESTINATION "${SOURCE_PATH}")
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup()
vcpkg_copy_pdbs()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@ -1,121 +0,0 @@
cmake_minimum_required(VERSION 3.11)
project(Clp LANGUAGES C CXX)
set(PROJECT_VERSION 1.16.11)
set(PROJECT_VERSION_MAJOR 1)
set(PROJECT_VERSION_MINOR 16)
set(PROJECT_VERSION_PATCH 11)
set(CMAKE_CXX_STANDARD 14)
set(INSTALL_BIN_DIR "bin" CACHE PATH "Path where exe and dll will be installed")
set(INSTALL_LIB_DIR "lib" CACHE PATH "Path where lib will be installed")
set(INSTALL_INCLUDE_DIR "include/Coin" CACHE PATH "Path where headers will be installed")
set(INSTALL_CMAKE_DIR "share/clp" CACHE PATH "Path where cmake configs will be installed")
# Make relative paths absolute (needed later on)
set(RELATIVE_INSTALL_INCLUDE_DIR ${INSTALL_INCLUDE_DIR})
foreach(p LIB BIN INCLUDE CMAKE)
set(var INSTALL_${p}_DIR)
if(NOT IS_ABSOLUTE "${${var}}")
set(${var} "${CMAKE_INSTALL_PREFIX}/${${var}}")
endif()
endforeach()
if(MSVC)
set(
CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} /bigobj /MP /wd4996 /wd4819 /wd4251 /wd4267 /wd4244 /wd4275"
)
endif()
if(APPLE)
set(
CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -Wno-inconsistent-missing-override -Wno-unused-command-line-argument -Wno-unused-result -Wno-exceptions"
)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9"
CACHE STRING "Minimum OS X deployment version")
endif()
find_package(CoinUtils REQUIRED)
find_package(Osi REQUIRED)
file(GLOB CLP_SOURCES
Clp/src/*.hpp
Clp/src/*.cpp
Clp/src/OsiClp/*.hpp
Clp/src/OsiClp/*.cpp)
file(GLOB CLP_REMOVE
Clp/src/ClpCholeskyMumps.cpp
Clp/src/ClpCholeskyUfl.cpp
Clp/src/ClpCholeskyWssmp.cpp
Clp/src/ClpCholeskyWssmpKKT.cpp
Clp/src/ClpMain.cpp
Clp/src/*Abc*.cpp
Clp/src/ClpCholeskyMumps.hpp
Clp/src/ClpCholeskyUfl.hpp
Clp/src/ClpCholeskyWssmp.hpp
Clp/src/ClpCholeskyWssmpKKT.hpp
Clp/src/ClpMain.hpp
Clp/src/*Abc*.hpp
Clp/src/*Abc*.h)
list(REMOVE_ITEM CLP_SOURCES ${CLP_REMOVE})
add_library(${PROJECT_NAME} ${CLP_SOURCES})
target_include_directories(${PROJECT_NAME}
PUBLIC
$<INSTALL_INTERFACE:${RELATIVE_INSTALL_INCLUDE_DIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Clp/src/>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Clp/src/OsiClp>)
if(MSVC)
target_compile_definitions(${PROJECT_NAME} PRIVATE _CRT_SECURE_NO_WARNINGS)
endif()
target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_CMATH)
target_compile_definitions(${PROJECT_NAME} PUBLIC COIN_HAS_CLP)
target_link_libraries(${PROJECT_NAME} PRIVATE Coin::CoinUtils Coin::Osi)
install(DIRECTORY Clp/src/
DESTINATION ${INSTALL_INCLUDE_DIR}
FILES_MATCHING
PATTERN "*.h"
PATTERN "*.hpp"
PATTERN "config_default.h" EXCLUDE)
install(DIRECTORY Clp/src/OsiClp/
DESTINATION ${INSTALL_INCLUDE_DIR}
FILES_MATCHING
PATTERN "*.h"
PATTERN "*.hpp"
PATTERN "config_default.h" EXCLUDE)
install(TARGETS ${PROJECT_NAME}
EXPORT "${PROJECT_NAME}Targets"
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin)
include(CMakePackageConfigHelpers)
set(version_config "${CMAKE_CURRENT_BINARY_DIR}/temp/${PROJECT_NAME}ConfigVersion.cmake")
set(project_config "${CMAKE_CURRENT_BINARY_DIR}/temp/${PROJECT_NAME}Config.cmake")
set(namespace "Coin::")
write_basic_package_version_file("${version_config}"
COMPATIBILITY SameMajorVersion)
configure_package_config_file("Config.cmake.in"
"${project_config}"
INSTALL_DESTINATION
"${INSTALL_CMAKE_DIR}")
install(FILES "${project_config}" "${version_config}"
DESTINATION "${INSTALL_CMAKE_DIR}")
install(EXPORT "${PROJECT_NAME}Targets"
NAMESPACE "${namespace}"
DESTINATION "${INSTALL_CMAKE_DIR}")

View File

@ -1,5 +0,0 @@
@PACKAGE_INIT@
include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")
check_required_components("@PROJECT_NAME@")

View File

@ -1,24 +0,0 @@
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO coin-or/Clp
REF 756ddd3ed813eb1fa8b2d1b4fe813e6a4d7aa1eb # releases/1.17.6
SHA512 579f6f47a4878ce82b69474880ef0796893279a8dac6e40feb7c29c5249180704c9b7a6443e717190b85811af3f1768d097511de2aa99396f725d6d02eb1a621
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
file(COPY ${CMAKE_CURRENT_LIST_DIR}/Config.cmake.in DESTINATION ${SOURCE_PATH})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
)
vcpkg_install_cmake()
vcpkg_copy_pdbs()
vcpkg_fixup_cmake_targets()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/clp RENAME copyright)

View File

@ -0,0 +1,32 @@
diff --git a/coin.m4 b/coin.m4
index 46501b207..a0ff20a6f 100644
--- a/coin.m4
+++ b/coin.m4
@@ -1312,11 +1312,11 @@ AC_DEFUN([AC_COIN_CHK_ZLIB],
if test x$coin_enable_zlib = xyes ; then
AC_CHECK_HEADER([zlib.h],[coin_has_zlib=yes])
if test x$coin_has_zlib = xyes ; then
- AC_CHECK_LIB([z],[gzopen],[],[coin_has_zlib=no])
+ AC_SEARCH_LIBS([gzopen],[z zlib zlibd],[],[coin_has_zlib=no])
fi
if test x$coin_has_zlib = xyes ; then
m4_foreach_w([myvar],[$1],
- [m4_toupper(myvar)_LFLAGS="-lz $m4_toupper(myvar)_LFLAGS"
+ [m4_toupper(myvar)_LFLAGS="-l$ac_cv_search_gzopen $m4_toupper(myvar)_LFLAGS"
])
AC_DEFINE(m4_toupper(AC_PACKAGE_NAME)_HAS_ZLIB,[1],[Define to 1 if zlib is available])
fi
@@ -1353,11 +1353,11 @@ AC_DEFUN([AC_COIN_CHK_BZLIB],
if test $coin_enable_bzlib = yes ; then
AC_CHECK_HEADER([bzlib.h],[coin_has_bzlib=yes])
if test $coin_has_bzlib = yes ; then
- AC_CHECK_LIB([bz2],[BZ2_bzReadOpen],[],[coin_has_bzlib=no])
+ AC_SEARCH_LIBS([BZ2_bzReadOpen],[bz2 bz2d],[],[coin_has_bzlib=no])
fi
if test $coin_has_bzlib = yes ; then
m4_foreach_w([myvar],[$1],
- [m4_toupper(myvar)_LFLAGS="-lbz2 $m4_toupper(myvar)_LFLAGS"
+ [m4_toupper(myvar)_LFLAGS="-l$ac_cv_search_BZ2_bzReadOpen $m4_toupper(myvar)_LFLAGS"
])
AC_DEFINE(m4_toupper(AC_PACKAGE_NAME)_HAS_BZLIB,[1],[Define to 1 if bzlib is available])
fi

View File

@ -0,0 +1,54 @@
diff --git a/coin.m4 b/coin.m4
index a0ff20a6f..46e0519d1 100644
--- a/coin.m4
+++ b/coin.m4
@@ -773,7 +773,6 @@ dnl Create a automake conditional and PKG_CONFIG variable
COIN_PKG_CONFIG_PATH="${PKG_CONFIG_PATH}"
AC_SUBST(COIN_PKG_CONFIG_PATH)
- COIN_PKG_CONFIG_PATH="${expanded_libdir}/pkgconfig:${COIN_PKG_CONFIG_PATH}"
if test -n "$PKG_CONFIG"; then
AC_MSG_NOTICE([$PKG_CONFIG path is "$COIN_PKG_CONFIG_PATH"])
fi
@@ -1316,7 +1315,7 @@ AC_DEFUN([AC_COIN_CHK_ZLIB],
fi
if test x$coin_has_zlib = xyes ; then
m4_foreach_w([myvar],[$1],
- [m4_toupper(myvar)_LFLAGS="-l$ac_cv_search_gzopen $m4_toupper(myvar)_LFLAGS"
+ [m4_toupper(myvar)_LFLAGS="$ac_cv_search_gzopen $m4_toupper(myvar)_LFLAGS"
])
AC_DEFINE(m4_toupper(AC_PACKAGE_NAME)_HAS_ZLIB,[1],[Define to 1 if zlib is available])
fi
@@ -1357,7 +1356,7 @@ AC_DEFUN([AC_COIN_CHK_BZLIB],
fi
if test $coin_has_bzlib = yes ; then
m4_foreach_w([myvar],[$1],
- [m4_toupper(myvar)_LFLAGS="-l$ac_cv_search_BZ2_bzReadOpen $m4_toupper(myvar)_LFLAGS"
+ [m4_toupper(myvar)_LFLAGS="$ac_cv_search_BZ2_bzReadOpen $m4_toupper(myvar)_LFLAGS"
])
AC_DEFINE(m4_toupper(AC_PACKAGE_NAME)_HAS_BZLIB,[1],[Define to 1 if bzlib is available])
fi
diff --git a/coin_chk_lapack.m4 b/coin_chk_lapack.m4
index 6085069af..3314f97e2 100644
--- a/coin_chk_lapack.m4
+++ b/coin_chk_lapack.m4
@@ -186,9 +186,7 @@ dnl links. We check for both to ensure that blas lib also appears on link line
dnl in case someone wants to use Blas functions but tests only for Lapack.
dnl We skip this if int64
if test "$lapack_keep_looking" = yes ; then
- case " $2 " in
- *\ int64\ * ) ;;
- *) AC_COIN_CHK_MOD_EXISTS([lapack],[lapack blas],
+ AC_COIN_CHK_MOD_EXISTS([lapack],[lapack blas],
[lapack_what="generic module (lapack.pc blas.pc)"
AC_COIN_TRY_LINK([dsyev],[],[lapack],
[coin_has_lapack=yes
@@ -196,8 +194,6 @@ dnl We skip this if int64
lapack_pcfiles="lapack blas"],
[AC_MSG_WARN([lapack.pc and blas.pc present, but could not find dsyev when trying to link with LAPACK.])],no)
])
- ;;
- esac
fi
dnl TODO do we need another check with lapack.pc only?

View File

@ -0,0 +1,14 @@
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
vcpkg_from_github(
OUT_SOURCE_PATH BUILD_SCRIPTS_PATH
REPO coin-or-tools/BuildTools
REF 1e473af11438bc0a9e8506252e31fc14b902a31e
SHA512 c142163a270848d1e1300a70713ee03ec822cc9d7583ba7aa685c02b7c25e0d4c0f7d958aad320dbf1824cc88fe0a49dc3357e0fe11588dc8c30e7fec8d239f6
PATCHES buildtools.patch
buildtools2.patch
)
file(COPY "${BUILD_SCRIPTS_PATH}/" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/BuildTools")
file(INSTALL "${BUILD_SCRIPTS_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@ -0,0 +1,7 @@
{
"name": "coin-or-buildtools",
"version-date": "2023-02-02",
"description": "Macros and patches for GNU autotools ",
"homepage": "https://coin-or-tools.github.io/BuildTools/",
"license": "EPL-2.0"
}

View File

@ -0,0 +1,34 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO coin-or/Cgl
REF 3d7daa62b37e7b3504a372f2c93236052952d0f8
SHA512 48014a5e5bec23ebda34d97f1c3aeb511271e17dac203258668a94a8004c01b7460ddfd7086b6db911d4e8800b61cf2bdc5a11b597cc22317cfef45364cf20fd
)
file(COPY "${CURRENT_INSTALLED_DIR}/share/coin-or-buildtools/" DESTINATION "${SOURCE_PATH}")
set(ENV{ACLOCAL} "aclocal -I \"${SOURCE_PATH}/BuildTools\"")
vcpkg_configure_make(
SOURCE_PATH "${SOURCE_PATH}"
AUTOCONFIG
OPTIONS
--with-coinutils
--with-osi
# The rest will be pulled in via being available.
# Since there are no features in the other coin-or-* ports
# yet there is no need to control them here.
--without-sample
--without-netlib
--enable-relocatable
--disable-readline
)
vcpkg_install_make()
vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@ -1,19 +1,12 @@
{
"name": "cgl",
"version": "0.60.3",
"name": "coin-or-cgl",
"version-date": "2023-02-01",
"description": "The COIN-OR Cut Generation Library (Cgl) is a collection of cut generators that can be used with other COIN-OR packages that make use of cuts, such as, among others, the linear solver Clp or the mixed integer linear programming solvers Cbc or BCP.",
"homepage": "https://github.com/coin-or/Cgl",
"license": "EPL-2.0",
"dependencies": [
"clp",
"coinutils",
"osi",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
"coin-or-clp",
"coin-or-osi",
"coinutils"
]
}

View File

@ -0,0 +1,31 @@
diff --git a/configure.ac b/configure.ac
index a3f2fb9c4..e6f53f26c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,6 +16,8 @@ All Rights Reserved.
This file is part of the open source package Clp which is distributed
under the Eclipse Public License.])
+AC_CONFIG_MACRO_DIR([m4])
+
# List one file in the package so that the configure script can test
# whether the package is actually there.
AC_CONFIG_SRCDIR(src/ClpSimplex.cpp)
@@ -63,7 +63,7 @@ AC_COIN_CHK_PKG(Osi,[OsiClpLib OsiClpUnitTest])
AC_COIN_CHK_PKG(OsiTests,[OsiClpUnitTest],[osi-unittests])
AC_COIN_CHK_PKG(Sample,,[coindatasample],[],dataonly)
AC_COIN_CHK_PKG(Netlib,,[coindatanetlib],[],dataonly)
-AC_COIN_CHK_PKG(Glpk,[ClpLib],[coinglpk])
+AC_COIN_CHK_PKG(Glpk,[ClpLib],[glpk])
#############################################################################
# Aboca #
@@ -96,7 +96,7 @@ AC_COIN_CHK_LIBHDR(CHOLMOD,[ClpLib],[-lcholmod],[-I/usr/include/suitesparse],[],
# bothered to build it, we should use it. If it's not present, try for a
# system installation. If we find it, define CLP_HAS_MUMPS for export to code
# using clp.
-AC_COIN_CHK_PKG(MUMPS,[ClpLib],[coinmumps])
+AC_COIN_CHK_PKG(MUMPS,[ClpLib],[mumps])
if test $coin_has_mumps = no ; then
AC_COIN_CHK_LIBHDR(MUMPS,[ClpLib],[-ldmumps],[-I/usr/include/MUMPS],[],
[dmumps_c((DMUMPS_STRUC_C*)0)],

View File

@ -0,0 +1,39 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO coin-or/Clp
REF 5315ef2e93f5f532a600e16ab604ac439a416e59
SHA512 78dc8f562e7c1bff3e86c81eda4eda9780a4075921bcdd2338191f37820699baee94eec86b6f63b1b27e5bca7346a2611d669a7cdf3e47e1c032b072ca10bdab
PATCHES dep.patch
)
file(COPY "${CURRENT_INSTALLED_DIR}/share/coin-or-buildtools/" DESTINATION "${SOURCE_PATH}")
set(ENV{ACLOCAL} "aclocal -I \"${SOURCE_PATH}/BuildTools\"")
vcpkg_configure_make(
SOURCE_PATH "${SOURCE_PATH}"
AUTOCONFIG
OPTIONS
--with-coinutils
--with-glpk
--with-osi
--without-ositests
--without-sample
--without-netlib
--without-amd
--without-cholmod
--without-mumps
--enable-relocatable
--disable-readline
)
vcpkg_install_make()
vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/coin-or/ClpModel.hpp" "\"glpk.h\"" "\"../glpk.h\"")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@ -1,10 +1,10 @@
{
"name": "clp",
"version-string": "1.17.6",
"port-version": 1,
"name": "coin-or-clp",
"version-date": "2023-02-01",
"description": "Clp (Coin-or linear programming) is an open-source linear programming solver written in C++. It is primarily meant to be used as a callable library, but a basic, stand-alone executable version is also available.",
"license": "EPL-2.0",
"dependencies": [
"coinutils",
"osi"
"coin-or-osi",
"coinutils"
]
}

View File

@ -0,0 +1,39 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO coin-or/Ipopt
REF ec43e37a06054246764fb116e50e3e30c9ada089
SHA512 f5b30e81b4a1a178e9a0e2b51b4832f07441b2c3e9a2aa61a6f07807f94185998e985fcf3c34d96fbfde78f07b69f2e0a0675e1e478a4e668da6da60521e0fd6
HEAD_REF master
)
# --with-precision floating-point precision to use: single or double
# (default)
# --with-intsize integer type to use: specify 32 for int or 64 for
# int64_t
file(COPY "${CURRENT_INSTALLED_DIR}/share/coin-or-buildtools/" DESTINATION "${SOURCE_PATH}")
set(ENV{ACLOCAL} "aclocal -I \"${SOURCE_PATH}/BuildTools\"")
vcpkg_configure_make(
SOURCE_PATH "${SOURCE_PATH}"
AUTOCONFIG
OPTIONS
#--with-pardiso
--without-spral
#--without-wsmp
--without-hsl
--without-asl
--with-lapack
--without-mumps
--enable-relocatable
--disable-f77
--disable-java
)
vcpkg_install_make()
vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@ -0,0 +1,11 @@
{
"name": "coin-or-ipopt",
"version-date": "2023-02-01",
"description": "Ipopt (Interior Point OPTimizer, pronounced eye-pea-Opt) is a software package for large-scale nonlinear optimization",
"homepage": "https://github.com/coin-or/Ipopt",
"license": "EPL-2.0",
"dependencies": [
"coinutils",
"intel-mkl"
]
}

View File

@ -0,0 +1,13 @@
diff --git a/configure.ac b/configure.ac
index e4bd1361e..4c3a2a166 100644
--- a/configure.ac
+++ b/configure.ac
@@ -78,7 +78,7 @@ AC_COIN_CHK_HERE([OsiLib],[OsiCommonTestLib],[osi])
# downloaded and built. The general flow here is as above: Initialise the
# library, add external components, finalize the flags, and add any components
# being built here.
-AC_COIN_CHK_PKG(Glpk,[OsiGlpkLib OsiTest],[coinglpk])
+AC_COIN_CHK_PKG(Glpk,[OsiGlpkLib OsiTest],[glpk])
AC_LANG_PUSH(C++)
AC_COIN_CHK_LIBHDR(SoPlex,[OsiSpxLib OsiTest],[-lsoplex],[],[],

View File

@ -0,0 +1,37 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO coin-or/Osi
REF 79167ab9a4487b5a1f88ec4fdfd4ed529a1c31ff
SHA512 405206d1a8e1f0adff8223ad4843251532dc954a6400f8566d826f93dd55741423185001f4d5a97b4d02ed39a9fe32ef063978d101c0a3eaa341a7c0dbce9765
PATCHES glpk.patch
)
file(COPY "${CURRENT_INSTALLED_DIR}/share/coin-or-buildtools/" DESTINATION "${SOURCE_PATH}")
set(ENV{ACLOCAL} "aclocal -I \"${SOURCE_PATH}/BuildTools\"")
vcpkg_configure_make(
SOURCE_PATH "${SOURCE_PATH}"
AUTOCONFIG
OPTIONS
--with-glpk
--with-lapack
--with-coinutils
--without-netlib
--without-sample
--without-gurobi
--without-xpress
--without-cplex
--without-soplex
--enable-relocatable
--disable-readline
)
vcpkg_install_make()
vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@ -1,8 +1,8 @@
{
"name": "osi",
"version-string": "0.108.6",
"port-version": 1,
"name": "coin-or-osi",
"version-date": "2023-02-01",
"description": "Osi (Open Solver Interface) provides an abstract base class to a generic linear programming (LP) solver, along with derived classes for specific solvers. Many applications may be able to use the Osi to insulate themselves from a specific LP solver.",
"license": "EPL-2.0",
"dependencies": [
"coinutils"
]

View File

@ -1,95 +0,0 @@
cmake_minimum_required(VERSION 3.11)
project(CoinUtils LANGUAGES C CXX)
set(PROJECT_VERSION 2.10.14)
set(PROJECT_VERSION_MAJOR 2)
set(PROJECT_VERSION_MINOR 10)
set(PROJECT_VERSION_PATCH 14)
set(CMAKE_CXX_STANDARD 14)
set(INSTALL_BIN_DIR "bin" CACHE PATH "Path where exe and dll will be installed")
set(INSTALL_LIB_DIR "lib" CACHE PATH "Path where lib will be installed")
set(INSTALL_INCLUDE_DIR "include/Coin" CACHE PATH "Path where headers will be installed")
set(INSTALL_CMAKE_DIR "share/coinutils" CACHE PATH "Path where cmake configs will be installed")
# Make relative paths absolute (needed later on)
set(RELATIVE_INSTALL_INCLUDE_DIR ${INSTALL_INCLUDE_DIR})
foreach(p LIB BIN INCLUDE CMAKE)
set(var INSTALL_${p}_DIR)
if(NOT IS_ABSOLUTE "${${var}}")
set(${var} "${CMAKE_INSTALL_PREFIX}/${${var}}")
endif()
endforeach()
if(MSVC)
set(
CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} /bigobj /MP /wd4996 /wd4819 /wd4251 /wd4267 /wd4244 /wd4275"
)
endif()
if(APPLE)
set(
CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -Wno-inconsistent-missing-override -Wno-unused-command-line-argument -Wno-unused-result -Wno-exceptions"
)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9"
CACHE STRING "Minimum OS X deployment version")
endif()
include(CheckIncludeFileCXX)
include(CheckIncludeFile)
check_include_file_cxx("cmath" HAVE_CMATH)
check_include_file_cxx("cfloat" HAVE_CFLOAT)
if(NOT HAVE_CMATH OR NOT HAVE_CFLOAT)
message(FATAL_ERROR "Missing necessary include files, like cmath or cfloat")
endif()
file(GLOB UTILS_SOURCES
CoinUtils/src/*.hpp
CoinUtils/src/*.cpp
CoinUtils/src/*.h)
add_library(${PROJECT_NAME} ${UTILS_SOURCES})
target_include_directories(${PROJECT_NAME} PUBLIC $<INSTALL_INTERFACE:${RELATIVE_INSTALL_INCLUDE_DIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/CoinUtils/src>)
if(MSVC)
target_compile_definitions(${PROJECT_NAME} PRIVATE _CRT_SECURE_NO_WARNINGS)
endif()
target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_CMATH HAVE_CFLOAT)
install(DIRECTORY CoinUtils/src/
DESTINATION ${INSTALL_INCLUDE_DIR}
FILES_MATCHING
PATTERN "*.h"
PATTERN "*.hpp")
install(TARGETS ${PROJECT_NAME}
EXPORT "${PROJECT_NAME}Targets"
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin)
include(CMakePackageConfigHelpers)
set(version_config "${CMAKE_CURRENT_BINARY_DIR}/temp/${PROJECT_NAME}ConfigVersion.cmake")
set(project_config "${CMAKE_CURRENT_BINARY_DIR}/temp/${PROJECT_NAME}Config.cmake")
set(namespace "Coin::")
write_basic_package_version_file("${version_config}"
COMPATIBILITY SameMajorVersion)
configure_package_config_file("Config.cmake.in"
"${project_config}"
INSTALL_DESTINATION
"${INSTALL_CMAKE_DIR}")
install(FILES "${project_config}" "${version_config}"
DESTINATION "${INSTALL_CMAKE_DIR}")
install(EXPORT "${PROJECT_NAME}Targets"
NAMESPACE "${namespace}"
DESTINATION "${INSTALL_CMAKE_DIR}")

View File

@ -1,5 +0,0 @@
@PACKAGE_INIT@
include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")
check_required_components("@PROJECT_NAME@")

View File

@ -0,0 +1,13 @@
diff --git a/configure.ac b/configure.ac
index f35c22949..8787a1c0b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10,6 +10,8 @@
AC_INIT([CoinUtils],[devel],[https://github.com/coin-or/CoinUtils/issues/new],[coin-or-coinutils],[https://github.com/coin-or/CoinUtils])
+AC_CONFIG_MACRO_DIR([m4])
+
AC_COPYRIGHT([
Copyright 2006 International Business Machines and others.
All Rights Reserved.

View File

@ -0,0 +1,15 @@
diff --git a/configure.ac b/configure.ac
index 8787a1c0b..504019b78 100644
--- a/configure.ac
+++ b/configure.ac
@@ -96,8 +96,8 @@ AC_COINUTILS_MEMPOOL(4096,no)
# Collect information required to use component libraries.
AC_COIN_CHK_LAPACK(CoinUtilsLib)
-AC_COIN_CHK_PKG(Glpk,[CoinUtilsLib CoinUtilsTest],[coinglpk])
-AC_COIN_CHK_PKG(ASL,[CoinUtilsLib],[coinasl])
+AC_COIN_CHK_PKG(Glpk,[CoinUtilsLib CoinUtilsTest],[glpk])
+AC_COIN_CHK_PKG(ASL,[CoinUtilsLib],[asl])
AC_COIN_CHK_PKG(Sample,[],[coindatasample],[],dataonly)
AC_COIN_CHK_PKG(Netlib,[],[coindatanetlib],[],dataonly)

View File

@ -1,24 +1,41 @@
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO coin-or/CoinUtils
REF f709081c9b57cc2dd32579d804b30689ca789982 # releases/2.11.4
SHA512 1c2e7f796524d67d87253bc7938c1a6db3c8266acec6b6399aeb83c0fb253b77507e6b5e84f16b0b8e40098aef94676499f396d1c7f653b1e04cbadca7620185
REF aae9b0b807a920c41d7782d7bf2775afb17a12c6 # I don't trust the release tags. They seem to point to a different fork with an outdates file structure?
SHA512 a515e62846698bcc3df15aabcce89d9052e30dffe2112ab5eb54c0c5def199140bd25435ef17e453c873239ab63fd03dd4cee5e4c4bfae5521f549917e025efe
PATCHES coinutils.patch coinutils2.patch
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
file(COPY ${CMAKE_CURRENT_LIST_DIR}/Config.cmake.in DESTINATION ${SOURCE_PATH})
file(COPY "${CURRENT_INSTALLED_DIR}/share/coin-or-buildtools/" DESTINATION "${SOURCE_PATH}")
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
set(ENV{ACLOCAL} "aclocal -I \"${SOURCE_PATH}/BuildTools\"")
#--enable-msvc
vcpkg_configure_make(
SOURCE_PATH "${SOURCE_PATH}"
AUTOCONFIG
OPTIONS
--with-glpk
--with-lapack
--without-netlib
--without-sample
--without-asl
#--enable-coinutils-threads # only with -lrt
#--enable-coinutils-bigindex # only for x64
--enable-relocatable
--disable-readline
)
vcpkg_install_cmake()
vcpkg_install_make()
vcpkg_copy_pdbs()
vcpkg_fixup_cmake_targets()
vcpkg_fixup_pkgconfig()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/coinutils RENAME copyright)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/coin-or/CoinMpsIO.hpp" "\"glpk.h\"" "\"../glpk.h\"")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/coinutils" RENAME copyright)
file(COPY "${SOURCE_PATH}/m4" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")

View File

@ -1,6 +1,15 @@
{
"name": "coinutils",
"version-string": "2.11.4",
"port-version": 1,
"description": "CoinUtils (Coin-or Utilities) is an open-source collection of classes and functions that are generally useful to more than one COIN-OR project"
"version-date": "2023-02-02",
"description": "CoinUtils (Coin-or Utilities) is an open-source collection of classes and functions that are generally useful to more than one COIN-OR project",
"homepage": "https://www.coin-or.org/",
"license": "EPL-2.0",
"supports": "!uwp",
"dependencies": [
"bzip2",
"coin-or-buildtools",
"glpk",
"lapack",
"zlib"
]
}

11
ports/glpk/glpk.pc.in Normal file
View File

@ -0,0 +1,11 @@
prefix=${pcfiledir}/../..
exec_prefix=${prefix}
libdir=${prefix}/lib
includedir=${prefix}/include
Name: glpk
Description: The GNU Linear Programming Kit (GLPK) solves large-scale linear programming (LP), mixed integer programming (MIP), and related problems.
Version: @VERSION@
Libs: -L${libdir} -l@libname@
Cflags: -I${includedir}
Requires: @requires@

View File

@ -24,6 +24,7 @@ endif()
if("gmp" IN_LIST FEATURES)
vcpkg_list(APPEND CONFIGURE_OPTIONS --with-gmp)
string(APPEND requires " gmp")
else()
vcpkg_list(APPEND CONFIGURE_OPTIONS --without-gmp)
endif()
@ -33,12 +34,14 @@ if("mysql" IN_LIST FEATURES)
--enable-mysql
"CPPFLAGS=-I${CURRENT_INSTALLED_DIR}/include/mysql \$CPPFLAGS"
)
string(APPEND requires " mysql")
else()
vcpkg_list(APPEND CONFIGURE_OPTIONS --disable-mysql)
endif()
if("odbc" IN_LIST FEATURES)
vcpkg_list(APPEND CONFIGURE_OPTIONS --enable-odbc)
string(APPEND requires " odbc")
else()
vcpkg_list(APPEND CONFIGURE_OPTIONS --disable-odbc)
endif()
@ -53,7 +56,13 @@ vcpkg_configure_make(
)
vcpkg_install_make()
set(libname glpk)
configure_file("${CMAKE_CURRENT_LIST_DIR}/glpk.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/glpk.pc" @ONLY)
if(NOT VCPKG_BUILD_TYPE)
configure_file("${CMAKE_CURRENT_LIST_DIR}/glpk.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/glpk.pc" @ONLY)
endif()
vcpkg_fixup_pkgconfig()
vcpkg_copy_pdbs()
vcpkg_copy_tools(TOOL_NAMES glpsol AUTO_CLEAN)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")

View File

@ -2,6 +2,7 @@
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
"name": "glpk",
"version": "5.0",
"port-version": 1,
"maintainers": "Fabio A. Correa Duran",
"description": [
"The GNU Linear Programming Kit (GLPK) solves large-scale linear programming (LP), mixed integer programming (MIP), and related problems.",

View File

@ -156,63 +156,9 @@ index 5d909ec..ab7eb6f 100644
+endif()
+
+find_package(flann REQUIRED)
# ==============================================================================
# CoinUtils
@@ -303,6 +322,7 @@ endif()
# - internal by default (CoinUtils),
# - external if COINUTILS_INCLUDE_DIR_HINTS and a valid CoinUtils setup is found
# ==============================================================================
+if(0)
if (NOT DEFINED COINUTILS_INCLUDE_DIR_HINTS)
set(COINUTILS_INCLUDE_DIR_HINTS ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/osi_clp/CoinUtils/src/)
set(OpenMVG_USE_INTERNAL_COINUTILS ON)
@@ -312,6 +332,9 @@ if (NOT DEFINED COINUTILS_INCLUDE_DIR_HINTS)
else()
find_package(CoinUtils QUIET)
endif()
+endif()
+
+find_package(CoinUtils REQUIRED)
## ==============================================================================
## Clp
@@ -319,6 +342,7 @@ endif()
## - internal by default (Clp),
## - external if CLP_INCLUDE_DIR_HINTS and a valid Clp setup is found
## ==============================================================================
+if(0)
if (NOT DEFINED CLP_INCLUDE_DIR_HINTS)
set(CLP_INCLUDE_DIR_HINTS ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/osi_clp/Clp/src/)
set(OpenMVG_USE_INTERNAL_CLP ON)
@@ -330,13 +354,17 @@ if (NOT DEFINED CLP_INCLUDE_DIR_HINTS)
else()
find_package(Clp QUIET)
endif()
+endif()
+find_package(Clp REQUIRED)
+
# ==============================================================================
# Osi
# ==============================================================================
# - internal by default (Osi),
# - external if OSI_INCLUDE_DIR_HINTS and a valid Osi setup is found
# ==============================================================================
+if(0)
if (NOT DEFINED OSI_INCLUDE_DIR_HINTS)
set(OSI_INCLUDE_DIR_HINTS ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/osi_clp/Osi/src/)
set(OpenMVG_USE_INTERNAL_OSI ON)
@@ -346,6 +374,9 @@ if (NOT DEFINED OSI_INCLUDE_DIR_HINTS)
else()
find_package(Osi QUIET)
endif()
+endif()
+
+find_package(Osi REQUIRED)
# ==============================================================================
# Internal CLP/OSI/COINUTILS libraries:
@@ -364,6 +395,7 @@ endif()
# - internal by default (Lemon),
# - external if LEMON_INCLUDE_DIR_HINTS and a valid Lemon setup is found
@ -332,21 +278,6 @@ index 5d909ec..ab7eb6f 100644
message(STATUS "LEMON: " ${LEMON_VERSION} " (internal)")
else()
message(STATUS "LEMON: " ${LEMON_VERSION} " (external)")
diff --git a/src/cmakeFindModules/FindClp.cmake b/src/cmakeFindModules/FindClp.cmake
index 8a69c23..6ebc661 100644
--- a/src/cmakeFindModules/FindClp.cmake
+++ b/src/cmakeFindModules/FindClp.cmake
@@ -50,8 +50,8 @@ IF(EXISTS "${CLP_DIR}" AND NOT "${CLP_DIR}" STREQUAL "")
ENDIF (NOT EXISTS ${CLP_VERSION_FILE})
SET(CLP_INCLUDE_DIR ${CLP_DIR})
- FIND_LIBRARY(CLP_LIBRARY NAMES Clp)
- FIND_LIBRARY(CLPSOLVER_LIBRARY NAMES ClpSolver)
+ FIND_LIBRARY(CLPSOLVER_LIBRARY NAMES ClpSolver Clp)
+ FIND_LIBRARY(OSICLP_LIBRARY NAMES OsiClp Clp)
FIND_LIBRARY(OSICLP_LIBRARY NAMES OsiClp)
# locate Clp libraries
diff --git a/src/cmakeFindModules/OpenMVGConfig.cmake.in b/src/cmakeFindModules/OpenMVGConfig.cmake.in
index e7dfbfd..65224c4 100644
--- a/src/cmakeFindModules/OpenMVGConfig.cmake.in
@ -360,15 +291,12 @@ index e7dfbfd..65224c4 100644
# unsets all public (designed to be used externally) variables and reports
# error message at priority depending upon [REQUIRED/QUIET/<NONE>] argument.
macro(OPENMVG_REPORT_NOT_FOUND REASON_MSG)
@@ -58,10 +58,20 @@ set(CALLERS_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})
@@ -58,10 +58,17 @@ set(CALLERS_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})
# Reset CMake module path to the installation directory of this
# script.
set(CMAKE_MODULE_PATH ${CURRENT_CONFIG_INSTALL_DIR})
+include(CMakeFindDependencyMacro)
+
+find_dependency(CoinUtils)
+find_dependency(Clp)
+find_dependency(Osi)
+find_dependency(flann)
+find_dependency(Threads)
+find_dependency(cereal)
@ -477,30 +405,6 @@ index cd800b0..20e9c8e 100644
#ifdef OPENMVG_USE_OPENMP
#pragma omp parallel for private(descr, descriptor)
diff --git a/src/openMVG/linearProgramming/CMakeLists.txt b/src/openMVG/linearProgramming/CMakeLists.txt
index cc5212f..acc57dd 100644
--- a/src/openMVG/linearProgramming/CMakeLists.txt
+++ b/src/openMVG/linearProgramming/CMakeLists.txt
@@ -15,16 +15,12 @@ target_link_libraries(openMVG_linearProgramming
PUBLIC
openMVG_numeric
PRIVATE
- ${CLP_LIBRARIES} # clp + solver wrapper
- ${COINUTILS_LIBRARY} # container tools
- ${OSI_LIBRARY} # generic LP
+ Coin::Clp # clp + solver wrapper
+ Coin::CoinUtils # container tools
+ Coin::Osi # generic LP
)
target_include_directories(openMVG_linearProgramming
- PRIVATE
- ${CLP_INCLUDE_DIRS}
- ${COINUTILS_INCLUDE_DIRS}
- ${OSI_INCLUDE_DIRS}
PUBLIC
$<INSTALL_INTERFACE:include>
)
diff --git a/src/openMVG/matching/CMakeLists.txt b/src/openMVG/matching/CMakeLists.txt
index 2e0eafd7..d54d1e88 100644
--- a/src/openMVG/matching/CMakeLists.txt
@ -722,3 +626,16 @@ index b8928083..1d10f939 100644
${OPENMVG_LIBRARY_DEPENDENCIES}
)
diff --git a/src/cmakeFindModules/FindClp.cmake b/src/cmakeFindModules/FindClp.cmake
index 8a69c2344..1ed9a21fe 100644
--- a/src/cmakeFindModules/FindClp.cmake
+++ b/src/cmakeFindModules/FindClp.cmake
@@ -51,7 +51,7 @@ IF(EXISTS "${CLP_DIR}" AND NOT "${CLP_DIR}" STREQUAL "")
SET(CLP_INCLUDE_DIR ${CLP_DIR})
FIND_LIBRARY(CLP_LIBRARY NAMES Clp)
- FIND_LIBRARY(CLPSOLVER_LIBRARY NAMES ClpSolver)
+ FIND_LIBRARY(CLPSOLVER_LIBRARY NAMES ClpSolver Clp)
FIND_LIBRARY(OSICLP_LIBRARY NAMES OsiClp)
# locate Clp libraries

View File

@ -0,0 +1,47 @@
diff --git a/src/openMVG/linearProgramming/CMakeLists.txt b/src/openMVG/linearProgramming/CMakeLists.txt
index cc5212fda..0fb59c44c 100644
--- a/src/openMVG/linearProgramming/CMakeLists.txt
+++ b/src/openMVG/linearProgramming/CMakeLists.txt
@@ -16,8 +16,8 @@ target_link_libraries(openMVG_linearProgramming
openMVG_numeric
PRIVATE
${CLP_LIBRARIES} # clp + solver wrapper
- ${COINUTILS_LIBRARY} # container tools
- ${OSI_LIBRARY} # generic LP
+ ${COINUTILS_LIBRARIES} # container tools
+ ${OSI_LIBRARIES} # generic LP
)
target_include_directories(openMVG_linearProgramming
diff --git a/src/cmakeFindModules/FindCoinUtils.cmake b/src/cmakeFindModules/FindCoinUtils.cmake
index 5b64ce14c..595fb7dc8 100644
--- a/src/cmakeFindModules/FindCoinUtils.cmake
+++ b/src/cmakeFindModules/FindCoinUtils.cmake
@@ -57,6 +57,12 @@ IF(EXISTS "${COINUTILS_DIR}" AND NOT "${COINUTILS_DIR}" STREQUAL "")
SET(COINUTILS_LIBRARIES ${COINUTILS_LIBRARY})
ENDIF()
+ if(NOT WIN32)
+ find_package(PkgConfig)
+ pkg_check_modules(CoinUtils coinutils IMPORTED_TARGET)
+ list(APPEND COINUTILS_LIBRARIES PkgConfig::CoinUtils)
+ endif()
+
MESSAGE(STATUS "CoinUtils ${COINUTILS_VERSION} found (include: ${COINUTILS_INCLUDE_DIRS})")
ELSE()
MESSAGE(STATUS "You are attempting to build without CoinUtils. "
diff --git a/src/cmakeFindModules/OpenMVGConfig.cmake.in b/src/cmakeFindModules/OpenMVGConfig.cmake.in
index d4ae73d1a..87f71cd7d 100644
--- a/src/cmakeFindModules/OpenMVGConfig.cmake.in
+++ b/src/cmakeFindModules/OpenMVGConfig.cmake.in
@@ -65,6 +65,10 @@ find_dependency(Threads)
find_dependency(cereal)
find_dependency(Ceres)
find_dependency(vlfeat)
+if(NOT WIN32)
+ find_dependency(PkgConfig)
+ pkg_check_modules(CoinUtils coinutils IMPORTED_TARGET)
+endif()
# Build the absolute root install directory as a relative path
get_filename_component(CURRENT_ROOT_INSTALL_DIR

View File

@ -17,6 +17,7 @@ vcpkg_from_github(
0001-eigen_3.4.0.patch
0002-eigen-3.4.patch
no-absolute-paths.patch
fix-coinutils.patch
)
set(OpenMVG_USE_OPENMP OFF)
@ -47,9 +48,10 @@ file(REMOVE_RECURSE ${SOURCE_PATH}/src/third_party/ceres-solver
file(REMOVE_RECURSE ${SOURCE_PATH}/src/cmakeFindModules/FindEigen.cmake
${SOURCE_PATH}/src/cmakeFindModules/FindLemon.cmake
${SOURCE_PATH}/src/cmakeFindModules/FindFlann.cmake
${SOURCE_PATH}/src/cmakeFindModules/FindCoinUtils.cmake
${SOURCE_PATH}/src/cmakeFindModules/FindClp.cmake
${SOURCE_PATH}/src/cmakeFindModules/FindOsi.cmake)
#${SOURCE_PATH}/src/cmakeFindModules/FindCoinUtils.cmake
#${SOURCE_PATH}/src/cmakeFindModules/FindClp.cmake
#${SOURCE_PATH}/src/cmakeFindModules/FindOsi.cmake
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}/src"
@ -69,6 +71,9 @@ vcpkg_cmake_configure(
-DOpenMVG_USE_INTERNAL_CERES=OFF
-DOpenMVG_USE_INTERNAL_FLANN=OFF
-DOpenMVG_USE_INTERNAL_LEMON=OFF
"-DCOINUTILS_INCLUDE_DIR_HINTS=${CURRENT_INSTALLED_DIR}/include/coin-or"
"-DCLP_INCLUDE_DIR_HINTS=${CURRENT_INSTALLED_DIR}/include/coin-or"
"-DOSI_INCLUDE_DIR_HINTS=${CURRENT_INSTALLED_DIR}/include/coin-or"
)
vcpkg_cmake_install()

View File

@ -1,7 +1,7 @@
{
"name": "openmvg",
"version": "2.0",
"port-version": 5,
"port-version": 6,
"description": "open Multiple View Geometry library. Basis for 3D computer vision and Structure from Motion.",
"license": "MPL-2.0-no-copyleft-exception",
"supports": "!(osx & arm64)",
@ -14,14 +14,14 @@
"suitesparse"
]
},
"clp",
"coin-or-clp",
"coin-or-osi",
"coinutils",
"eigen3",
"flann",
"libjpeg-turbo",
"liblemon",
"libpng",
"osi",
"tiff",
{
"name": "vcpkg-cmake",

View File

@ -1,89 +0,0 @@
cmake_minimum_required(VERSION 3.11)
project(Osi LANGUAGES C CXX)
set(PROJECT_VERSION 0.107.9)
set(PROJECT_VERSION_MAJOR 0)
set(PROJECT_VERSION_MINOR 107)
set(PROJECT_VERSION_PATCH 9)
set(CMAKE_CXX_STANDARD 14)
set(INSTALL_BIN_DIR "bin" CACHE PATH "Path where exe and dll will be installed")
set(INSTALL_LIB_DIR "lib" CACHE PATH "Path where lib will be installed")
set(INSTALL_INCLUDE_DIR "include/Coin" CACHE PATH "Path where headers will be installed")
set(INSTALL_CMAKE_DIR "share/osi" CACHE PATH "Path where cmake configs will be installed")
# Make relative paths absolute (needed later on)
set(RELATIVE_INSTALL_INCLUDE_DIR ${INSTALL_INCLUDE_DIR})
foreach(p LIB BIN INCLUDE CMAKE)
set(var INSTALL_${p}_DIR)
if(NOT IS_ABSOLUTE "${${var}}")
set(${var} "${CMAKE_INSTALL_PREFIX}/${${var}}")
endif()
endforeach()
if(MSVC)
set(
CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} /bigobj /MP /wd4996 /wd4819 /wd4251 /wd4267 /wd4244 /wd4275"
)
endif()
if(APPLE)
set(
CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -Wno-inconsistent-missing-override -Wno-unused-command-line-argument -Wno-unused-result -Wno-exceptions"
)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9"
CACHE STRING "Minimum OS X deployment version")
endif()
find_package(CoinUtils REQUIRED)
file(GLOB OSI_SOURCES Osi/src/Osi/*.hpp Osi/src/Osi/*.cpp)
add_library(${PROJECT_NAME} ${OSI_SOURCES})
target_include_directories(${PROJECT_NAME} PUBLIC $<INSTALL_INTERFACE:${RELATIVE_INSTALL_INCLUDE_DIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Osi/src/Osi>)
if(MSVC)
target_compile_definitions(${PROJECT_NAME} PRIVATE _CRT_SECURE_NO_WARNINGS)
endif()
target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_CMATH)
target_link_libraries(${PROJECT_NAME} PRIVATE Coin::CoinUtils)
install(DIRECTORY Osi/src/Osi/
DESTINATION ${INSTALL_INCLUDE_DIR}
FILES_MATCHING
PATTERN "*.h"
PATTERN "*.hpp"
PATTERN "config_default.h" EXCLUDE)
install(TARGETS ${PROJECT_NAME}
EXPORT "${PROJECT_NAME}Targets"
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin)
include(CMakePackageConfigHelpers)
set(version_config "${CMAKE_CURRENT_BINARY_DIR}/temp/${PROJECT_NAME}ConfigVersion.cmake")
set(project_config "${CMAKE_CURRENT_BINARY_DIR}/temp/${PROJECT_NAME}Config.cmake")
set(namespace "Coin::")
write_basic_package_version_file("${version_config}"
COMPATIBILITY SameMajorVersion)
configure_package_config_file("Config.cmake.in"
"${project_config}"
INSTALL_DESTINATION
"${INSTALL_CMAKE_DIR}")
install(FILES "${project_config}" "${version_config}"
DESTINATION "${INSTALL_CMAKE_DIR}")
install(EXPORT "${PROJECT_NAME}Targets"
NAMESPACE "${namespace}"
DESTINATION "${INSTALL_CMAKE_DIR}")

View File

@ -1,5 +0,0 @@
@PACKAGE_INIT@
include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")
check_required_components("@PROJECT_NAME@")

View File

@ -1,25 +0,0 @@
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO coin-or/Osi
REF dfa6449d6756fdd96912cf96e168d0be07b1d37c # releases/0.108.6
SHA512 8c23998a3f442766c515acd5549ed97608b972de61b9ef5b50b9e5d1d03b43fb5f77dc02d3562084fbf4f18f3397f9cd50c0f9bde4f576a4dff0dab795c04358
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
file(COPY ${CMAKE_CURRENT_LIST_DIR}/Config.cmake.in DESTINATION ${SOURCE_PATH})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
)
vcpkg_install_cmake()
vcpkg_copy_pdbs()
vcpkg_fixup_cmake_targets()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/osi RENAME copyright)

View File

@ -142,7 +142,8 @@ cmcstl2:x86-windows = skip
coin:arm64-windows=fail
coin:arm-uwp=fail
coin:x64-uwp=fail
# coinutils requires autoconf2.71 not yet available in CI
coinutils:x64-linux=fail
# there is an ICE in VS2022 with colmap in release mode
colmap:x86-windows=fail
colmap:x64-windows=fail

View File

@ -1580,9 +1580,29 @@
"baseline": "4.0.0",
"port-version": 5
},
"coin-or-buildtools": {
"baseline": "2023-02-02",
"port-version": 0
},
"coin-or-cgl": {
"baseline": "2023-02-01",
"port-version": 0
},
"coin-or-clp": {
"baseline": "2023-02-01",
"port-version": 0
},
"coin-or-ipopt": {
"baseline": "2023-02-01",
"port-version": 0
},
"coin-or-osi": {
"baseline": "2023-02-01",
"port-version": 0
},
"coinutils": {
"baseline": "2.11.4",
"port-version": 1
"baseline": "2023-02-02",
"port-version": 0
},
"collada-dom": {
"baseline": "2.5.0",
@ -2758,7 +2778,7 @@
},
"glpk": {
"baseline": "5.0",
"port-version": 0
"port-version": 1
},
"glslang": {
"baseline": "11.13.0",
@ -5694,7 +5714,7 @@
},
"openmvg": {
"baseline": "2.0",
"port-version": 5
"port-version": 6
},
"openmvs": {
"baseline": "2.1.0",

View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "b0d17057d8452f7e7fa4a3bfe6a2fab3520be6e9",
"version-date": "2023-02-02",
"port-version": 0
}
]
}

View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "3272f90811fbc680b219072ed319082b025a4788",
"version-date": "2023-02-01",
"port-version": 0
}
]
}

View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "35592c499a237bd46e45a9016aaa82ac06f3d2b6",
"version-date": "2023-02-01",
"port-version": 0
}
]
}

View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "8f3393d37ff448cd73bb3bdf00b812a0a38e2a9c",
"version-date": "2023-02-01",
"port-version": 0
}
]
}

View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "1f7058750dc53193abef4534059e3717cd310310",
"version-date": "2023-02-01",
"port-version": 0
}
]
}

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "9f78d3e4a95d02a06ad5fe90773ca39a25cd93de",
"version-date": "2023-02-02",
"port-version": 0
},
{
"git-tree": "eee28965c61a5dae6407b3f93bbd945b7992537d",
"version-string": "2.11.4",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "4ccc68be5d979b64412919b488ed88b798903ccf",
"version": "5.0",
"port-version": 1
},
{
"git-tree": "e1346a1f1cdf3d0b7aa46517ae0f8f0006ac6903",
"version": "5.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "5c54c4aa02d2a668bd3d97a1b2a9d412efe284d3",
"version": "2.0",
"port-version": 6
},
{
"git-tree": "884daf253c53c86a780f1a75907d0c0f28e352de",
"version": "2.0",