2017-11-17 19:48:52 +08:00
|
|
|
set(MSVC_USE_STATIC_CRT_VALUE OFF)
|
2017-06-10 14:31:44 +08:00
|
|
|
if(VCPKG_CRT_LINKAGE STREQUAL "static")
|
2018-05-14 22:01:26 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
|
|
|
message(FATAL_ERROR "Ceres does not currently support mixing static CRT and dynamic library linkage")
|
|
|
|
endif()
|
|
|
|
set(MSVC_USE_STATIC_CRT_VALUE ON)
|
2017-06-10 14:31:44 +08:00
|
|
|
endif()
|
|
|
|
|
2017-06-09 11:53:01 +08:00
|
|
|
include(vcpkg_common_functions)
|
|
|
|
|
2017-06-10 01:16:58 +08:00
|
|
|
vcpkg_from_github(
|
2017-06-10 14:31:44 +08:00
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO ceres-solver/ceres-solver
|
2018-03-26 09:54:19 +08:00
|
|
|
REF 1.14.0
|
|
|
|
SHA512 6dddddf5bd5834332a69add468578ad527e4d94fe85c9751ddf5fe9ad11a34918bdd9c994c49dd6ffc398333d0ac9752ac89aaef1293e2fe0a55524e303d415d
|
2017-06-10 14:31:44 +08:00
|
|
|
HEAD_REF master
|
2019-05-01 07:54:33 +08:00
|
|
|
PATCHES
|
|
|
|
0001_add_missing_include_path.patch
|
|
|
|
0002_cmakelists_fixes.patch
|
[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-06-01 06:48:17 +08:00
|
|
|
0003_use_glog_target.patch
|
|
|
|
0004_fix_exported_ceres_config.patch
|
2017-06-09 11:53:01 +08:00
|
|
|
)
|
|
|
|
|
[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-06-01 06:48:17 +08:00
|
|
|
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/FindTBB.cmake)
|
|
|
|
|
2018-02-17 19:16:32 +08:00
|
|
|
set(SUITESPARSE OFF)
|
|
|
|
if("suitesparse" IN_LIST FEATURES)
|
|
|
|
set(SUITESPARSE ON)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set(CXSPARSE OFF)
|
|
|
|
if("cxsparse" IN_LIST FEATURES)
|
|
|
|
set(CXSPARSE ON)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set(LAPACK OFF)
|
|
|
|
if("lapack" IN_LIST FEATURES)
|
|
|
|
set(LAPACK ON)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set(EIGENSPARSE OFF)
|
|
|
|
if("eigensparse" IN_LIST FEATURES)
|
|
|
|
set(EIGENSPARSE ON)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set(GFLAGS OFF)
|
|
|
|
if("tools" IN_LIST FEATURES)
|
|
|
|
set(GFLAGS ON)
|
|
|
|
endif()
|
|
|
|
|
2017-06-09 11:53:01 +08:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2018-03-27 02:58:37 +08:00
|
|
|
PREFER_NINJA
|
2017-06-10 18:05:44 +08:00
|
|
|
OPTIONS
|
|
|
|
-DEXPORT_BUILD_DIR=ON
|
|
|
|
-DBUILD_EXAMPLES=OFF
|
|
|
|
-DBUILD_TESTING=OFF
|
2018-02-17 19:16:32 +08:00
|
|
|
-DGFLAGS=${GFLAGS}
|
|
|
|
-DCXSPARSE=${CXSPARSE}
|
|
|
|
-DEIGENSPARSE=${EIGENSPARSE}
|
|
|
|
-DLAPACK=${LAPACK}
|
|
|
|
-DSUITESPARSE=${SUITESPARSE}
|
2017-11-17 19:48:52 +08:00
|
|
|
-DMSVC_USE_STATIC_CRT=${MSVC_USE_STATIC_CRT_VALUE}
|
2017-06-09 11:53:01 +08:00
|
|
|
)
|
2017-06-10 18:05:44 +08:00
|
|
|
|
2017-06-09 11:53:01 +08:00
|
|
|
vcpkg_install_cmake()
|
2018-05-14 22:01:26 +08:00
|
|
|
|
[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-06-01 06:48:17 +08:00
|
|
|
if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
2018-05-14 22:01:26 +08:00
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake")
|
|
|
|
else()
|
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH "lib${LIB_SUFFIX}/cmake/Ceres")
|
|
|
|
endif()
|
|
|
|
|
2017-06-09 11:53:01 +08:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2017-06-30 23:13:09 +08:00
|
|
|
# Changes target search path
|
[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-06-01 06:48:17 +08:00
|
|
|
if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
2019-05-01 07:54:33 +08:00
|
|
|
file(READ ${CURRENT_PACKAGES_DIR}/share/ceres/CeresConfig.cmake CERES_TARGETS)
|
|
|
|
string(REPLACE "get_filename_component(CURRENT_ROOT_INSTALL_DIR\n \${CERES_CURRENT_CONFIG_DIR}/../"
|
|
|
|
"get_filename_component(CURRENT_ROOT_INSTALL_DIR\n \${CERES_CURRENT_CONFIG_DIR}/../../" CERES_TARGETS "${CERES_TARGETS}")
|
|
|
|
file(WRITE ${CURRENT_PACKAGES_DIR}/share/ceres/CeresConfig.cmake "${CERES_TARGETS}")
|
|
|
|
else()
|
|
|
|
file(READ ${CURRENT_PACKAGES_DIR}/share/ceres/CeresConfig.cmake CERES_TARGETS)
|
|
|
|
string(REPLACE "get_filename_component(CURRENT_ROOT_INSTALL_DIR\n \${CERES_CURRENT_CONFIG_DIR}/../../../"
|
|
|
|
"get_filename_component(CURRENT_ROOT_INSTALL_DIR\n \${CERES_CURRENT_CONFIG_DIR}/../../" CERES_TARGETS "${CERES_TARGETS}")
|
|
|
|
file(WRITE ${CURRENT_PACKAGES_DIR}/share/ceres/CeresConfig.cmake "${CERES_TARGETS}")
|
|
|
|
endif()
|
2017-06-30 23:13:09 +08:00
|
|
|
|
|
|
|
# Clean
|
2017-06-09 11:53:01 +08:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
2017-06-10 18:05:44 +08:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
2017-06-09 11:53:01 +08:00
|
|
|
|
|
|
|
# Handle copyright of suitesparse and metis
|
2017-06-10 01:16:58 +08:00
|
|
|
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/ceres)
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/ceres/LICENSE ${CURRENT_PACKAGES_DIR}/share/ceres/copyright)
|