mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
[lapack-reference] Fixed lapack.lib not being found when linking using cmake under Windows (#38035)
Fixes https://github.com/microsoft/vcpkg/issues/38009 Remove the statement renaming liblapack.lib. - [X] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md). - [ ] ~~SHA512s are updated for each updated download.~~ - [ ] ~~The "supports" clause reflects platforms that may be fixed by this new version.~~ - [ ] ~~Any fixed [CI baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt) entries are removed from that file.~~ - [ ] ~~Any patches that are no longer applied are deleted from the port's directory.~~ - [X] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [X] Only one version is added to each modified port's versions file. Usage test pass with following triplets: ``` x64-windows ``` --------- Co-authored-by: Jim wang (BEYONDSOFT CONSULTING INC) <v-wangjim@microsoft.com>
This commit is contained in:
parent
069695daed
commit
6d2c971458
17
ports/lapack-reference/fix_prefix.patch
Normal file
17
ports/lapack-reference/fix_prefix.patch
Normal file
@ -0,0 +1,17 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index c99d71a..7333110 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -10,6 +10,12 @@ set(
|
||||
${LAPACK_MAJOR_VERSION}.${LAPACK_MINOR_VERSION}.${LAPACK_PATCH_VERSION}
|
||||
)
|
||||
|
||||
+if(WIN32)
|
||||
+ set(CMAKE_STATIC_LIBRARY_PREFIX "")
|
||||
+ set(CMAKE_SHARED_LIBRARY_PREFIX "lib")
|
||||
+ set(CMAKE_IMPORT_LIBRARY_PREFIX "")
|
||||
+endif()
|
||||
+
|
||||
# Add the CMake directory for custom CMake modules
|
||||
set(CMAKE_MODULE_PATH "${LAPACK_SOURCE_DIR}/CMAKE" ${CMAKE_MODULE_PATH})
|
||||
|
@ -23,6 +23,7 @@ vcpkg_from_github(
|
||||
PATCHES
|
||||
cmake-config.patch
|
||||
lapacke.patch
|
||||
fix_prefix.patch
|
||||
)
|
||||
|
||||
if(NOT VCPKG_TARGET_IS_WINDOWS)
|
||||
@ -69,7 +70,7 @@ vcpkg_cmake_configure(
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME lapack-${VERSION} CONFIG_PATH lib/cmake/lapack-${VERSION}) #Should the target path be lapack and not lapack-reference?
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME ${PORT} CONFIG_PATH lib/cmake/lapack-${VERSION}) #Should the target path be lapack and not lapack-reference?
|
||||
|
||||
set(pcfile "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/lapack.pc")
|
||||
if(EXISTS "${pcfile}")
|
||||
@ -129,12 +130,6 @@ endif()
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/liblapack.lib")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/lib/liblapack.lib" "${CURRENT_PACKAGES_DIR}/lib/lapack.lib")
|
||||
endif()
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/liblapack.lib")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/liblapack.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/lapack.lib")
|
||||
endif()
|
||||
if(NOT USE_OPTIMIZED_BLAS)
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/libblas.lib")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/lib/libblas.lib" "${CURRENT_PACKAGES_DIR}/lib/blas.lib")
|
||||
@ -156,4 +151,4 @@ configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake.in" "${CURRE
|
||||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/FindLAPACK.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
|
||||
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)
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
||||
|
@ -25,7 +25,7 @@ if(@CBLAS@)
|
||||
find_library(CBLAS_LIBRARY_RELEASE NAMES libcblas PATHS "${CURRENT_PACKAGES_DIR}/lib" NO_DEFAULT_PATH)
|
||||
find_library(CBLAS_LIBRARY_DEBUG NAMES libcblas PATHS "${CURRENT_PACKAGES_DIR}/debug/lib" NO_DEFAULT_PATH)
|
||||
select_library_configurations(CBLAS)
|
||||
set(LAPACK_LIBRARIES ${CBLAS_LIBRARIES} ${LAPACK_LIBRARIES})
|
||||
set(LAPACK_LIBRARIES ${LAPACK_LIBRARIES})
|
||||
endif()
|
||||
|
||||
set(CMAKE_MODULE_PATH "${LAPACK_PREV_MODULE_PATH}")
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "lapack-reference",
|
||||
"version": "3.11.0",
|
||||
"port-version": 4,
|
||||
"port-version": 5,
|
||||
"description": "LAPACK - Linear Algebra PACKage",
|
||||
"homepage": "https://netlib.org/lapack/",
|
||||
"license": "BSD-3-Clause-Open-MPI",
|
||||
|
26
ports/opencv4/0023-fix-no-flatbuffers.patch
Normal file
26
ports/opencv4/0023-fix-no-flatbuffers.patch
Normal file
@ -0,0 +1,26 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 5b6e382..29a81f0 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -756,7 +756,7 @@ include(cmake/OpenCVFindLibsVideo.cmake)
|
||||
include(cmake/OpenCVFindLibsPerf.cmake)
|
||||
include(cmake/OpenCVFindLAPACK.cmake)
|
||||
include(cmake/OpenCVFindProtobuf.cmake)
|
||||
-include(cmake/OpenCVDetectFlatbuffers.cmake)
|
||||
+find_package(flatbuffers CONFIG REQUIRED)
|
||||
if(WITH_TENGINE)
|
||||
include(cmake/OpenCVFindTengine.cmake)
|
||||
endif()
|
||||
diff --git a/modules/dnn/CMakeLists.txt b/modules/dnn/CMakeLists.txt
|
||||
index 804b78e..86d9d45 100644
|
||||
--- a/modules/dnn/CMakeLists.txt
|
||||
+++ b/modules/dnn/CMakeLists.txt
|
||||
@@ -133,7 +133,7 @@ if(TARGET ocv.3rdparty.flatbuffers AND OPENCV_DNN_TFLITE)
|
||||
if(NOT HAVE_FLATBUFFERS)
|
||||
message(FATAL_ERROR "DNN: TFLite is not supported without enabled 'flatbuffers'. Check build configuration.")
|
||||
endif()
|
||||
- list(APPEND libs ocv.3rdparty.flatbuffers)
|
||||
+ list(APPEND libs flatbuffers::flatbuffers)
|
||||
list(APPEND fw_hdrs "${CMAKE_CURRENT_LIST_DIR}/misc/tflite/schema_generated.h")
|
||||
list(APPEND fw_inc "${CMAKE_CURRENT_LIST_DIR}/misc/tflite")
|
||||
|
@ -32,6 +32,7 @@ vcpkg_from_github(
|
||||
0021-static-openvino.patch # https://github.com/opencv/opencv/pull/23963
|
||||
"${ARM64_WINDOWS_FIX}"
|
||||
0022-fix-supportqnx.patch
|
||||
0023-fix-no-flatbuffers.patch
|
||||
)
|
||||
# Disallow accidental build of vendored copies
|
||||
file(REMOVE_RECURSE "${SOURCE_PATH}/3rdparty/openexr")
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "opencv4",
|
||||
"version": "4.8.0",
|
||||
"port-version": 15,
|
||||
"port-version": 16,
|
||||
"description": "computer vision library",
|
||||
"homepage": "https://github.com/opencv/opencv",
|
||||
"license": "Apache-2.0",
|
||||
|
17
ports/openmvs/fix_no_zstd.patch
Normal file
17
ports/openmvs/fix_no_zstd.patch
Normal file
@ -0,0 +1,17 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 39ec359..ee90ae6 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -177,10 +177,8 @@ if(Boost_FOUND)
|
||||
LIST(APPEND OpenMVS_DEFINITIONS -D_USE_BOOST)
|
||||
ADD_DEFINITIONS(${Boost_DEFINITIONS})
|
||||
LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
|
||||
- if(NOT MSVC AND DEFINED CMAKE_TOOLCHAIN_FILE)
|
||||
- # work around this missing library link in vcpkg
|
||||
- LIST(APPEND Boost_LIBRARIES zstd)
|
||||
- endif()
|
||||
+ # work around this missing library link in vcpkg
|
||||
+ LIST(APPEND Boost_LIBRARIES zstd)
|
||||
SET(_USE_BOOST TRUE)
|
||||
endif()
|
||||
|
@ -3,12 +3,13 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO cdcseacave/openMVS
|
||||
REF v2.1.0
|
||||
REF "v${VERSION}"
|
||||
SHA512 95d83c6694b63b6fd27657c4c5e22ddbc078d26b7324b8f17952a6c7e4547028698aa155077c0cfb916d3497ca31c365e0cbcd81f3cbe959ef40a7ee2e5cd300
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
fix-build.patch
|
||||
no-absolute-paths.patch
|
||||
fix_no_zstd.patch
|
||||
)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
@ -82,4 +83,4 @@ configure_file("${SOURCE_PATH}/MvgMvsPipeline.py.in" "${CURRENT_PACKAGES_DIR}/to
|
||||
configure_file("${SOURCE_PATH}/MvgOptimizeSfM.py.in" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/MvgOptimizeSfM.py" @ONLY)
|
||||
file(INSTALL "${SOURCE_PATH}/build/Modules/FindVCG.cmake" DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT})
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "openmvs",
|
||||
"version": "2.1.0",
|
||||
"port-version": 2,
|
||||
"port-version": 3,
|
||||
"description": "OpenMVS: open Multi-View Stereo reconstruction library",
|
||||
"homepage": "https://cdcseacave.github.io/openMVS",
|
||||
"license": "AGPL-3.0-only",
|
||||
|
@ -4070,7 +4070,7 @@
|
||||
},
|
||||
"lapack-reference": {
|
||||
"baseline": "3.11.0",
|
||||
"port-version": 4
|
||||
"port-version": 5
|
||||
},
|
||||
"lastools": {
|
||||
"baseline": "2.0.2+20230206",
|
||||
@ -6430,7 +6430,7 @@
|
||||
},
|
||||
"opencv4": {
|
||||
"baseline": "4.8.0",
|
||||
"port-version": 15
|
||||
"port-version": 16
|
||||
},
|
||||
"opendnp3": {
|
||||
"baseline": "3.1.1",
|
||||
@ -6494,7 +6494,7 @@
|
||||
},
|
||||
"openmvs": {
|
||||
"baseline": "2.1.0",
|
||||
"port-version": 2
|
||||
"port-version": 3
|
||||
},
|
||||
"openni2": {
|
||||
"baseline": "2.2.0.33",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "27fda0472d5bfb11fef0264ba62681f6d6b4b1d2",
|
||||
"version": "3.11.0",
|
||||
"port-version": 5
|
||||
},
|
||||
{
|
||||
"git-tree": "0036813fc0d0004d8a47ec3743ab9c9c37beaac2",
|
||||
"version": "3.11.0",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "1818e44260c19a5524d75c66fd51af9d5857df6d",
|
||||
"version": "4.8.0",
|
||||
"port-version": 16
|
||||
},
|
||||
{
|
||||
"git-tree": "ec4e040d476cee60b2fc21a1f847d30905ac9726",
|
||||
"version": "4.8.0",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "14cc4ac41f5710b5281e06697ac6e6cd7800377f",
|
||||
"version": "2.1.0",
|
||||
"port-version": 3
|
||||
},
|
||||
{
|
||||
"git-tree": "8779bcf1acd942b029c79791b2335b252e151f20",
|
||||
"version": "2.1.0",
|
||||
|
Loading…
x
Reference in New Issue
Block a user