vcpkg/ports/mlpack/cmakelists.patch
Stefano Sinigardi 5898891125 [openexr,openimageio,suitesparse,theia] updates for non-win32 (#6371)
* [openexr,openimageio,suitesparse,theia] updates for non-win32

* [theia] use only valid cmake symbols

* [suitesparse] Fix build

* [lapack] still not properly integrating with other ports

* [lapack] intercept cmake module calls and substitute them with our defs

* [suitesparse,clapack] fixes for proper integration

* [ceres,clapack] bump CONTROL

* [suitesparse] remove unnecessary defs

* [clapack] improve wrapper logic

* [WIN32] remove wrong symbol

* [clapack] fix wrapper integration

* [Accelerate] use best framework when available

* [clapack] separate config from wrapper

* [clapack] fix paths and filenames

* [mlpack,armadillo,clapack] improve library handling

* [mlpack] remove unnecessary cmake option

* [clp,coinutils,osi,liblemon] dependencies of openmvg, improve compatibility with non-win32

* [openmvg] fix for case-sensitive filesystems

* [clp,coinutils,osi] simplify CMakeLists removing many unnecessary steps

* [sophus] Force rebuild

* [theia] fixes for linux, part1

* [io2d] remove broken sintax

* [fontconfig] bump version to remove CI cached failure

* [theia] fixes for linux, part2

* [theia] remove unnecessary empty folders and comments from portfile

* [theia] use correct build type removing forced vars in cmakelists.txt

* [openmvg] add missing suitesparse target detection

* [sophus] fix Suitesparse dependency

* [sophus,openmvg] use suitesparse lowercase for module compatibility on case-sensitive filesystems

* [suitesparse] fixes for case-sensitive filesystems

* [openmvg] use correct Eigen3 name for case-sensitive filesystems

* [sophus] trigger rebuild

* [shogun] use modern vcpkg style

* [shogun] add missing cmake system processor symbol
2019-05-31 15:48:17 -07:00

55 lines
1.8 KiB
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 26dfd6e..5e287d8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -283,25 +283,8 @@ endif()
# and find LAPACK and BLAS ourselves, using a slightly modified variant of the
# script Armadillo uses to find these.
if (WIN32)
- find_library(LAPACK_LIBRARY
- NAMES lapack liblapack lapack_win32_MT lapack_win32
- PATHS "C:/Program Files/Armadillo"
- PATH_SUFFIXES "examples/lib_win32/")
-
- if (NOT LAPACK_LIBRARY)
- message(FATAL_ERROR "Cannot find LAPACK library (.lib)!")
- endif ()
-
- find_library(BLAS_LIBRARY
- NAMES blas libblas blas_win32_MT blas_win32
- PATHS "C:/Program Files/Armadillo"
- PATH_SUFFIXES "examples/lib_win32/")
-
- if (NOT BLAS_LIBRARY)
- message(FATAL_ERROR "Cannot find BLAS library (.lib)!")
- endif ()
-
- # Piggyback LAPACK and BLAS linking into Armadillo link.
+ find_package(LAPACK)
+ find_package(BLAS)
set(ARMADILLO_LIBRARIES
${ARMADILLO_LIBRARIES} ${BLAS_LIBRARY} ${LAPACK_LIBRARY})
endif ()
@@ -392,19 +375,11 @@ find_package(Boost 1.49
REQUIRED
)
-link_directories(${Boost_LIBRARY_DIRS})
-
-# In Visual Studio, automatic linking is performed, so we don't need to worry
-# about it. Clear the list of libraries to link against and let Visual Studio
-# handle it.
-if (MSVC)
- link_directories(${Boost_LIBRARY_DIRS})
- set(Boost_LIBRARIES "")
-endif ()
+link_directories(${Boost_LIBRARIES})
set(MLPACK_INCLUDE_DIRS ${MLPACK_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
set(MLPACK_LIBRARIES ${MLPACK_LIBRARIES} ${Boost_LIBRARIES})
-set(MLPACK_LIBRARY_DIRS ${MLPACK_LIBRARY_DIRS} ${Boost_LIBRARY_DIRS})
+set(MLPACK_LIBRARY_DIRS ${MLPACK_LIBRARY_DIRS} ${Boost_LIBRARIES})
# For Boost testing framework (will have no effect on non-testing executables).
# This specifies to Boost that we are dynamically linking to the Boost test