vcpkg/ports/ceres/portfile.cmake

78 lines
2.5 KiB
CMake
Raw Normal View History

set(MSVC_USE_STATIC_CRT_VALUE OFF)
if(VCPKG_CRT_LINKAGE STREQUAL "static")
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
message(FATAL_ERROR "Ceres does not support mixing static CRT and dynamic library linkage")
endif()
set(MSVC_USE_STATIC_CRT_VALUE ON)
endif()
2017-06-10 01:16:58 +08:00
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO ceres-solver/ceres-solver
REF f68321e7de8929fbcdb95dd42877531e64f72f66 #2.1.0
SHA512 67bbd8a9385a40fe69d118fbc84da0fcc9aa1fbe14dd52f5403ed09686504213a1d931e95a1a0148d293b27ab5ce7c1d618fbf2e8fed95f2bbafab851a1ef449
HEAD_REF master
PATCHES
[many ports] improvements for linux/wsl (#6730) * [many ports] improve compatibility with WSL and mixed case filesystems * [treehopper] express dependency on libusb, which was not working on non-win32 platforms and is still broken there * [libharu] add compatibility with non-win32 platforms * [geogram] fix openblas on linux [clapack] better integration with linux environment [visit-struct] put cmake config file in the expected folder [geogram] remove trailing underscore to enable compatibility with OpenBLAS * [openblas] playing with underscore, without success * [openblas/lapack] fix library integration * [clapack] improve target handling in cmake module * [openblas] promote self-generated config to default cmake module, otherwise internal ones thinks wrongly that openblas can also solve lapack libs * [clapack,openblas] improve libraries integration * [many ports] fix cmake unnecessary target paths, wrong config paths, empty default dependencies, unnecessary [core] tags * [suitesparse] improve integration with new lapack/openblas mechanism * [suitesparse] add no underscore postfix also for linux * [ceres] fix integration with newer openblas/lapack configs * [aws-c-event-stream] fix regression * [systemc] fix regression * [libwebp,geogram] trigger rebuild * [libwebp,pthread4w] fix regressions * [glbinding] fix cmake module installation * [globjects] disentangle unnecessary dependency from qt5 * [jasper] remove broken and unnecessary patches * [libwebp] fix regression * [many ports] avoid using BUILD_SHARED_LIBS which is uninitialized in port files * [clapack] correctly find dlls * [clapack] use a generic blas as dependency * [fizz,g2o] restore expected version * fix mistake * [many ports] remove WIN32, APPLE and UNIX (again, they keep creeping in) from ports since they are broken and usually break non-win32 ports * [libressl,openssl] do not try to build one if the other is already installed * [itk] update ref and patch to avoid regression * [libressl,openssl] implement full strategy to fix CI * [libwebp] disable components that are broken on macOS * [ogre] enable macOS build * [freeimage,jxrlib,ogre,openexr,protobuf] port patches from #5169 * [ogre] add missing install command * [ffmpeg] enable wrapper for cmake module * [ffmpeg] add avresample module finder * [ffmpeg] improve module detection and exported symbols * [ffmpeg] add variables to cache * [thrift] remove unnecessary build option * [allegro5] fix shared/static inversion * [protobuf] cleanup * [libressl] cleanup * [moos-core] cleanup * commented features must not be separated from other features, otherwise vcpkg complains * [itk] fix regression * [shogun,itk] fix regressions * [ogre] fix regression * [opusfile] add compatibility with non-win32 * [itk] fix regression * [sndfile,libsndfile] remove duplicate, redirect sndfile to libsndfile * add missing dependencies * [ismrmrd] fix regression * [ffmpeg] trigger rebuild * [clapack,openblas,libogg] fix regressions on macOS * [libtins] fix regression * force rebuild windows regressions, unable to reproduce locally * [mosquitto] enable non-win32 builds * [json-dto] force rebuild, unable to reproduce regression locally * [many ports] uniform naming and path length requests * fix regression * fix regression * [ffmpeg] fixes for downstream projects * clean up - thanks to reviewers * trigger rebuild of regressions on macOS * trigger rebuild of regressions on macOS - part2 * Add core back * Use VCPKG_CONCURRENCY * Add core back to suitesparse * Add core back to curl * Add core back to magnum * Add core back to magnum * Add core back to magnum * Add core back to cgal
2019-06-21 10:11:54 +08:00
0001_cmakelists_fixes.patch
0002_use_glog_target.patch
0003_fix_exported_ceres_config.patch
find-package-required.patch
2017-06-09 11:53:01 +08:00
)
file(REMOVE "${SOURCE_PATH}/cmake/FindCXSparse.cmake")
file(REMOVE "${SOURCE_PATH}/cmake/FindGflags.cmake")
file(REMOVE "${SOURCE_PATH}/cmake/FindGlog.cmake")
file(REMOVE "${SOURCE_PATH}/cmake/FindEigen.cmake")
file(REMOVE "${SOURCE_PATH}/cmake/FindSuiteSparse.cmake")
file(REMOVE "${SOURCE_PATH}/cmake/FindMETIS.cmake")
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
"schur" SCHUR_SPECIALIZATIONS
"suitesparse" SUITESPARSE
"cxsparse" CXSPARSE
"lapack" LAPACK
"eigensparse" EIGENSPARSE
"tools" GFLAGS
"cuda" CUDA
)
if(VCPKG_TARGET_IS_UWP)
list(APPEND FEATURE_OPTIONS -DMINIGLOG=ON)
endif()
foreach (FEATURE ${FEATURE_OPTIONS})
message(STATUS "${FEATURE}")
endforeach()
set(TARGET_OPTIONS )
if(VCPKG_TARGET_IS_IOS)
# Note: CMake uses "OSX" not just for macOS, but also iOS, watchOS and tvOS.
list(APPEND TARGET_OPTIONS "-DIOS_DEPLOYMENT_TARGET=${VCPKG_OSX_DEPLOYMENT_TARGET}")
endif()
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
2017-06-10 18:05:44 +08:00
OPTIONS
${FEATURE_OPTIONS}
${TARGET_OPTIONS}
2017-06-10 18:05:44 +08:00
-DEXPORT_BUILD_DIR=ON
2020-12-07 Build Fixes (#14986) From most recent completed nightly build: https://dev.azure.com/vcpkg/public/_build/results?buildId=46182 PASSING, REMOVE FROM FAIL LIST: ignition-msgs5:x64-linux (.\scripts\ci.baseline.txt) I'm assuming this got fixed by @strega-nil 's llvm changes: https://github.com/microsoft/vcpkg/pull/14399 PASSING, REMOVE FROM FAIL LIST: libraqm:x64-windows-static (.\scripts\ci.baseline.txt) Cause unknown. PASSING, REMOVE FROM FAIL LIST: openssl-windows:arm-uwp (.\scripts\ci.baseline.txt) PASSING, REMOVE FROM FAIL LIST: openssl-windows:x64-uwp (.\scripts\ci.baseline.txt) Probably fixed by https://github.com/microsoft/vcpkg/pull/14308 ; also removed Supports: excluded entries for these. PASSING, REMOVE FROM FAIL LIST: speexdsp:x64-osx (.\scripts\ci.baseline.txt) Probably fixed by https://github.com/microsoft/vcpkg/pull/14758 PASSING, REMOVE FROM FAIL LIST: sundials:arm64-windows (.\scripts\ci.baseline.txt) PASSING, REMOVE FROM FAIL LIST: sundials:x64-windows (.\scripts\ci.baseline.txt) PASSING, REMOVE FROM FAIL LIST: sundials:x86-windows (.\scripts\ci.baseline.txt) Probably fixed by https://github.com/microsoft/vcpkg/pull/14618 PASSING, REMOVE FROM FAIL LIST: wepoll:arm-uwp (.\scripts\ci.baseline.txt) PASSING, REMOVE FROM FAIL LIST: wepoll:x64-uwp (.\scripts\ci.baseline.txt) Probably fixed by https://github.com/microsoft/vcpkg/pull/14456 -- and also fixed missing Supports. REGRESSION: ceres:x64-windows. If expected, add ceres:x64-windows=fail to .\scripts\ci.baseline.txt. REGRESSION: ceres:x86-windows. If expected, add ceres:x86-windows=fail to .\scripts\ci.baseline.txt. Probably broken by https://github.com/microsoft/vcpkg/pull/14719 ; ceres has: ``` if (BUILD_BENCHMARKS) find_package(benchmark QUIET) if (benchmark_FOUND) message("-- Found Google benchmark library. Building Ceres benchmarks.") else() message("-- Failed to find Google benchmark library, disabling build of benchmarks.") update_cache_variable(BUILD_BENCHMARKS OFF) endif() mark_as_advanced(benchmark_DIR) endif() ``` so it passed there because Google Benchmark was not also installed. Worked around by `-DBUILD_BENCHMARKS=OFF`. REGRESSION: dirent:arm64-windows. If expected, add dirent:arm64-windows=fail to .\scripts\ci.baseline.txt. Transient: ``` -- Downloading https://github.com/tronkko/dirent/archive/1.23.2.tar.gz... -- Downloading https://github.com/tronkko/dirent/archive/1.23.2.tar.gz... Failed. Status: 28;"Timeout was reached" CMake Error at scripts/cmake/vcpkg_download_distfile.cmake:184 (message): ``` REGRESSION: discord-rpc:arm64-windows. If expected, add discord-rpc:arm64-windows=fail to .\scripts\ci.baseline.txt. Transient: ``` -- Downloading https://github.com/discordapp/discord-rpc/archive/v3.4.0.tar.gz... -- Downloading https://github.com/discordapp/discord-rpc/archive/v3.4.0.tar.gz... Failed. Status: 28;"Timeout was reached" CMake Error at scripts/cmake/vcpkg_download_distfile.cmake:184 (message): ``` REGRESSION: libunibreak:x86-windows. If expected, add libunibreak:x86-windows=fail to .\scripts\ci.baseline.txt. Transient: ``` -- Note: libunibreak only supports static library linkage. Building static library. -- Downloading https://github.com/adah1972/libunibreak/archive/8df6ef4ebe5dbd2a49539d05366337ab7fb57ae3.tar.gz... -- Downloading https://github.com/adah1972/libunibreak/archive/8df6ef4ebe5dbd2a49539d05366337ab7fb57ae3.tar.gz... Failed. Status: 28;"Timeout was reached" ``` REGRESSION: libzip:x86-windows. If expected, add libzip:x86-windows=fail to .\scripts\ci.baseline.txt. Transient: ``` -- Downloading https://github.com/nih-at/libzip/archive/66e496489bdae81bfda8b0088172871d8fda0032.tar.gz... -- Downloading https://github.com/nih-at/libzip/archive/66e496489bdae81bfda8b0088172871d8fda0032.tar.gz... Failed. Status: 28;"Timeout was reached" CMake Error at scripts/cmake/vcpkg_download_distfile.cmake:184 (message): ``` REGRESSION: ocilib:x64-windows-static. If expected, add ocilib:x64-windows-static=fail to .\scripts\ci.baseline.txt. Probably broken by https://github.com/microsoft/vcpkg/pull/13158 but it passed there: (Link target) -> chromium_base.lib(stack_trace_win.obj) : error LNK2001: unresolved external symbol __imp_SymCleanup [D:\buildtrees\ocilib\x64-windows-static-rel\4fc7a69e6d-337dbe59ca.clean\proj\dll\ocilib_dll_vs2019.vcxproj] Looks like it was skipped before that PR because the port conflicts with chromium-base which couldn't have been caught in that PR. Putting it back on ci.baseline.txt. REGRESSION: osgearth:x64-windows. If expected, add osgearth:x64-windows=fail to .\scripts\ci.baseline.txt. REGRESSION: osgearth:x86-windows. If expected, add osgearth:x86-windows=fail to .\scripts\ci.baseline.txt. Cause unknown. I think we should skip this one in ci.baseline.txt since I've never seen it work OK. REGRESSION: qt5-tools:x64-windows-static. If expected, add qt5-tools:x64-windows-static=fail to .\scripts\ci.baseline.txt. Last I heard @ras0219 was investigating this one but that's been a while now. I pinged him again.
2020-12-08 03:17:46 +08:00
-DBUILD_BENCHMARKS=OFF
2017-06-10 18:05:44 +08:00
-DBUILD_EXAMPLES=OFF
-DBUILD_TESTING=OFF
-DBUILD_BENCHMARKS=OFF
-DPROVIDE_UNINSTALL_TARGET=OFF
-DMSVC_USE_STATIC_CRT=${MSVC_USE_STATIC_CRT_VALUE}
-DLIB_SUFFIX=${LIB_SUFFIX}
2017-06-09 11:53:01 +08:00
)
2017-06-10 18:05:44 +08:00
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH "lib${LIB_SUFFIX}/cmake/Ceres")
2017-06-09 11:53:01 +08:00
vcpkg_copy_pdbs()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
2017-06-09 11:53:01 +08:00
2020-08-28 13:13:05 +08:00
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)