Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[openexr,openimageio,suitesparse,theia] updates for non-win32 #6371

Merged
merged 42 commits into from
May 31, 2019
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
e984f5c
[openexr,openimageio,suitesparse,theia] updates for non-win32
cenit May 9, 2019
7b26376
Merge branch 'master' into dev/cenit/theia
cenit May 13, 2019
c574b5d
[theia] use only valid cmake symbols
cenit May 13, 2019
251f9bf
[suitesparse] Fix build
vicroms May 14, 2019
792fa3f
[lapack] still not properly integrating with other ports
cenit May 14, 2019
7c7514b
[lapack] intercept cmake module calls and substitute them with our defs
cenit May 14, 2019
d576785
[suitesparse,clapack] fixes for proper integration
cenit May 14, 2019
a5bfd81
[ceres,clapack] bump CONTROL
cenit May 14, 2019
6cd1302
[suitesparse] remove unnecessary defs
cenit May 15, 2019
55f48f5
Merge branch 'master' into dev/cenit/theia
cenit May 15, 2019
f054f78
[clapack] improve wrapper logic
cenit May 15, 2019
26132c2
[WIN32] remove wrong symbol
cenit May 15, 2019
55bb36b
[clapack] fix wrapper integration
cenit May 15, 2019
485cdeb
[Accelerate] use best framework when available
cenit May 15, 2019
e6f56b8
[clapack] separate config from wrapper
cenit May 17, 2019
0b42aed
Merge branch 'master' into dev/cenit/theia
cenit May 17, 2019
46204e1
[clapack] fix paths and filenames
cenit May 18, 2019
fdf6085
[mlpack,armadillo,clapack] improve library handling
cenit May 19, 2019
8424c9d
[mlpack] remove unnecessary cmake option
cenit May 20, 2019
92cf8d3
[clp,coinutils,osi,liblemon] dependencies of openmvg, improve compati…
cenit May 21, 2019
c6bf31b
Merge branch 'master' into dev/cenit/theia
cenit May 21, 2019
99a72c9
[openmvg] fix for case-sensitive filesystems
cenit May 21, 2019
8efcb8a
[clp,coinutils,osi] simplify CMakeLists removing many unnecessary steps
cenit May 21, 2019
d3034e6
Merge branch 'master' into dev/cenit/theia
cenit May 22, 2019
0f5893d
[sophus] Force rebuild
vicroms May 22, 2019
c0776f0
Merge branch 'master' into dev/cenit/theia
vicroms May 23, 2019
8e45123
Merge branch 'master' into dev/cenit/theia
cenit May 27, 2019
303fbbb
Merge branch 'master' into dev/cenit/theia
cenit May 29, 2019
ee9c633
[theia] fixes for linux, part1
cenit May 29, 2019
9910a6f
[io2d] remove broken sintax
cenit May 29, 2019
458022a
[fontconfig] bump version to remove CI cached failure
cenit May 29, 2019
e0e2ad4
[theia] fixes for linux, part2
cenit May 29, 2019
8816585
[theia] remove unnecessary empty folders and comments from portfile
cenit May 29, 2019
5f67148
[theia] use correct build type removing forced vars in cmakelists.txt
cenit May 30, 2019
b48941d
[openmvg] add missing suitesparse target detection
cenit May 30, 2019
1fb8b56
[sophus] fix Suitesparse dependency
cenit May 30, 2019
a366897
[sophus,openmvg] use suitesparse lowercase for module compatibility o…
cenit May 30, 2019
6b62b33
[suitesparse] fixes for case-sensitive filesystems
cenit May 30, 2019
a73955f
[openmvg] use correct Eigen3 name for case-sensitive filesystems
cenit May 30, 2019
2d32b0f
[sophus] trigger rebuild
cenit May 30, 2019
aadde60
[shogun] use modern vcpkg style
cenit May 31, 2019
76bed99
[shogun] add missing cmake system processor symbol
cenit May 31, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ports/assimp/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ file(READ ${CURRENT_PACKAGES_DIR}/share/assimp/assimp-config.cmake ASSIMP_CONFIG
string(REPLACE "get_filename_component(ASSIMP_ROOT_DIR \"\${_PREFIX}\" PATH)"
"set(ASSIMP_ROOT_DIR \${_PREFIX})" ASSIMP_CONFIG ${ASSIMP_CONFIG})

if(WIN32)
if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
string(REPLACE "set( ASSIMP_LIBRARIES \${ASSIMP_LIBRARIES})"
"set( ASSIMP_LIBRARIES optimized \${ASSIMP_LIBRARY_DIRS}/\${ASSIMP_LIBRARIES}.lib debug \${ASSIMP_LIBRARY_DIRS}/../debug/lib/\${ASSIMP_LIBRARIES}d.lib)" ASSIMP_CONFIG ${ASSIMP_CONFIG})
else()
Expand Down
2 changes: 1 addition & 1 deletion ports/blaze/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Source: blaze
Version: 3.5
Build-Depends: clapack, boost-exception
Build-Depends: clapack (!osx), boost-exception
Description: Blaze is an open-source, high-performance C++ math library for dense and sparse arithmetic.
949 changes: 0 additions & 949 deletions ports/ceres/0003_remove_unnecessary_cmake_modules.patch

This file was deleted.

5 changes: 2 additions & 3 deletions ports/ceres/CONTROL
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
Source: ceres
Version: 1.14.0-3
# eigen is always required by CMake, even if it isn't used.
Version: 1.14.0-4
Build-Depends: glog, eigen3
Description: non-linear optimization package

Feature: lapack
Build-Depends: clapack
Build-Depends: clapack (!osx)
Description: Use Lapack in Ceres

Feature: suitesparse
Expand Down
17 changes: 10 additions & 7 deletions ports/ceres/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,16 @@ vcpkg_from_github(
PATCHES
0001_add_missing_include_path.patch
0002_cmakelists_fixes.patch
0003_remove_unnecessary_cmake_modules.patch
0004_use_glog_target.patch
0005_fix_exported_ceres_config.patch
0003_use_glog_target.patch
0004_fix_exported_ceres_config.patch
)

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)

set(SUITESPARSE OFF)
if("suitesparse" IN_LIST FEATURES)
set(SUITESPARSE ON)
Expand Down Expand Up @@ -59,14 +64,12 @@ vcpkg_configure_cmake(
-DEIGENSPARSE=${EIGENSPARSE}
-DLAPACK=${LAPACK}
-DSUITESPARSE=${SUITESPARSE}
-DGFLAGS_PREFER_EXPORTED_GFLAGS_CMAKE_CONFIGURATION=ON
-DGLOG_PREFER_EXPORTED_GLOG_CMAKE_CONFIGURATION=OFF # TheiaSfm doesn't work well with this.
-DMSVC_USE_STATIC_CRT=${MSVC_USE_STATIC_CRT_VALUE}
)

vcpkg_install_cmake()

if(WIN32)
if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake")
else()
vcpkg_fixup_cmake_targets(CONFIG_PATH "lib${LIB_SUFFIX}/cmake/Ceres")
Expand All @@ -75,7 +78,7 @@ endif()
vcpkg_copy_pdbs()

# Changes target search path
if(WIN32)
if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
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}")
Expand Down
2 changes: 1 addition & 1 deletion ports/clapack/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Source: clapack
Version: 3.2.1-4
Version: 3.2.1-6
Description: CLAPACK (f2c'ed version of LAPACK)
Build-Depends: openblas (!osx)
18 changes: 0 additions & 18 deletions ports/clapack/fix-lack-library.patch

This file was deleted.

46 changes: 0 additions & 46 deletions ports/clapack/fix-linux-build.patch

This file was deleted.

186 changes: 186 additions & 0 deletions ports/clapack/lapack-config.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
#.rst:
# clapack config for vcpkg
# ------------
#
# Find the clapack includes and library.
#
# Result Variables
# ^^^^^^^^^^^^^^^^
#
# This script defines the following variables:
#
# ``CLAPACK_FOUND``
# True if clapack library found
#
# ``CLAPACK_VERSION``
# Containing the clapack version tag (manually defined)
#
# ``CLAPACK_INCLUDE_DIR``
# Location of clapack headers
#
# ``CLAPACK_LIBRARY``
# List of libraries to link with when using clapack
#
# Result Targets
# ^^^^^^^^^^^^^^
#
# This script defines the following targets:
#
# ``clapack::clapack``
# Target to use clapack
#
# Compatibility Variables
# ^^^^^^^^^^^^^^^^^^^^^^^
#
# This script defines the following variables for compatibility reasons:
#
# ``F2C_FOUND``
# True if f2c (fortran-to-c wrap layer) library found
#
# ``F2C_INCLUDE_DIR``
# Location of clapack headers
#
# ``F2C_LIBRARY``
# Library containing the fortran-to-c wrap layer, necessary for clapack and automatically included when used
#
# ``LAPACK_FOUND``
# True if clapack library found
#
# ``LAPACK_VERSION``
# Containing the clapack version tag (manually defined)
#
# ``LAPACK_INCLUDE_DIR``
# Location of clapack headers
#
# ``LAPACK_LIBRARY``
# List of libraries to link with when using clapack
#
# Compatibility Targets
# ^^^^^^^^^^^^^^
#
# This script defines the following targets for compatibility reasons:
#
# ``lapack``
# Target to use lapack

include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake)
include(${CMAKE_ROOT}/Modules/CheckSymbolExists.cmake)
include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)

set(CLAPACK_VERSION "3.2.1")

if(UNIX)
find_library(ADDITIONAL_LAPACK_LIBRARY m)
endif()

if(NOT F2C_LIBRARY)
find_library(F2C_LIBRARY_RELEASE NAMES f2c)
cenit marked this conversation as resolved.
Show resolved Hide resolved
find_library(F2C_LIBRARY_DEBUG NAMES f2cd)
select_library_configurations(F2C)
endif()

if(NOT LAPACK_LIBRARY)
find_library(LAPACK_LIBRARY_RELEASE NAMES lapack)
find_library(LAPACK_LIBRARY_DEBUG NAMES lapackd)
select_library_configurations(LAPACK)
endif()

list(APPEND LAPACK_LIBRARY ${F2C_LIBRARY})
list(APPEND LAPACK_LIBRARY ${ADDITIONAL_LAPACK_LIBRARY})

set(F2C_LIBRARIES "${F2C_LIBRARY}" CACHE STRING "" FORCE)
set(LAPACK_VERSION "${CLAPACK_VERSION}" CACHE STRING "" FORCE)
set(LAPACK_LIBRARIES "${LAPACK_LIBRARY}" CACHE STRING "" FORCE)
set(CLAPACK_LIBRARY "${LAPACK_LIBRARY}" CACHE STRING "" FORCE)
set(CLAPACK_LIBRARIES "${LAPACK_LIBRARY}" CACHE STRING "" FORCE)

if(NOT F2C_INCLUDE_DIR)
find_path(F2C_INCLUDE_DIR NAMES f2c.h)
endif()

if(NOT LAPACK_INCLUDE_DIR)
find_path(LAPACK_INCLUDE_DIR NAMES clapack.h)
endif()

list(APPEND LAPACK_INCLUDE_DIR ${F2C_INCLUDE_DIR})
set(LAPACK_INCLUDE_DIRS "${LAPACK_INCLUDE_DIR}" CACHE PATH "" FORCE)
set(CLAPACK_INCLUDE_DIR "${LAPACK_INCLUDE_DIR}" CACHE PATH "" FORCE)
set(CLAPACK_INCLUDE_DIRS "${LAPACK_INCLUDE_DIR}" CACHE PATH "" FORCE)
set(F2C_INCLUDE_DIRS "${F2C_INCLUDE_DIR}" CACHE PATH "" FORCE)

if(WIN32)
string( REPLACE ".lib" ".dll" LAPACK_LIBRARY_RELEASE_DLL "${LAPACK_LIBRARY_RELEASE}" )
string( REPLACE ".lib" ".dll" LAPACK_LIBRARY_DEBUG_DLL "${LAPACK_LIBRARY_DEBUG}" )
string( REPLACE ".lib" ".dll" F2C_LIBRARY_RELEASE_DLL "${F2C_LIBRARY_RELEASE}" )
string( REPLACE ".lib" ".dll" F2C_LIBRARY_DEBUG_DLL "${F2C_LIBRARY_DEBUG}" )
endif()

find_package_handle_standard_args(CLAPACK DEFAULT_MSG CLAPACK_LIBRARY CLAPACK_INCLUDE_DIR)
mark_as_advanced(CLAPACK_INCLUDE_DIR CLAPACK_LIBRARY)

find_package_handle_standard_args(LAPACK DEFAULT_MSG LAPACK_LIBRARY LAPACK_INCLUDE_DIR)
mark_as_advanced(LAPACK_INCLUDE_DIR LAPACK_LIBRARY)

find_package_handle_standard_args(F2C DEFAULT_MSG F2C_LIBRARY F2C_INCLUDE_DIR)
mark_as_advanced(F2C_INCLUDE_DIR F2C_LIBRARY)

#TARGETS
if( CLAPACK_FOUND AND NOT TARGET clapack::clapack )
if( EXISTS "${LAPACK_LIBRARY_RELEASE_DLL}" )
add_library( clapack::clapack SHARED IMPORTED )
set_target_properties( clapack::clapack PROPERTIES
IMPORTED_LOCATION_RELEASE "${LAPACK_LIBRARY_RELEASE_DLL}"
IMPORTED_IMPLIB "${LAPACK_LIBRARY_RELEASE}"
INTERFACE_INCLUDE_DIRECTORIES "${LAPACK_INCLUDE_DIR}"
IMPORTED_CONFIGURATIONS Release
IMPORTED_LINK_INTERFACE_LANGUAGES "C" )
if( EXISTS "${LAPACK_LIBRARY_DEBUG_DLL}" )
set_property( TARGET clapack::clapack APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug )
set_target_properties( clapack::clapack PROPERTIES
IMPORTED_LOCATION_DEBUG "${LAPACK_LIBRARY_DEBUG_DLL}"
IMPORTED_IMPLIB_DEBUG "${LAPACK_LIBRARY_DEBUG}" )
endif()
else()
add_library( clapack::clapack UNKNOWN IMPORTED )
set_target_properties( clapack::clapack PROPERTIES
IMPORTED_LOCATION_RELEASE "${LAPACK_LIBRARY_RELEASE}"
INTERFACE_INCLUDE_DIRECTORIES "${LAPACK_INCLUDE_DIR}"
IMPORTED_CONFIGURATIONS Release
IMPORTED_LINK_INTERFACE_LANGUAGES "C" )
if( EXISTS "${LAPACK_LIBRARY_DEBUG}" )
set_property( TARGET clapack::clapack APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug )
set_target_properties( clapack::clapack PROPERTIES
IMPORTED_LOCATION_DEBUG "${LAPACK_LIBRARY_DEBUG}" )
endif()
endif()
endif()

if( CLAPACK_FOUND AND NOT TARGET lapack )
if( EXISTS "${LAPACK_LIBRARY_RELEASE_DLL}" )
add_library( lapack SHARED IMPORTED )
set_target_properties( lapack PROPERTIES
IMPORTED_LOCATION_RELEASE "${LAPACK_LIBRARY_RELEASE_DLL}"
IMPORTED_IMPLIB "${LAPACK_LIBRARY_RELEASE}"
INTERFACE_INCLUDE_DIRECTORIES "${LAPACK_INCLUDE_DIR}"
IMPORTED_CONFIGURATIONS Release
IMPORTED_LINK_INTERFACE_LANGUAGES "C" )
if( EXISTS "${LAPACK_LIBRARY_DEBUG_DLL}" )
set_property( TARGET lapack APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug )
set_target_properties( lapack PROPERTIES
IMPORTED_LOCATION_DEBUG "${LAPACK_LIBRARY_DEBUG_DLL}"
IMPORTED_IMPLIB_DEBUG "${LAPACK_LIBRARY_DEBUG}" )
endif()
else()
add_library( lapack UNKNOWN IMPORTED )
set_target_properties( lapack PROPERTIES
IMPORTED_LOCATION_RELEASE "${LAPACK_LIBRARY_RELEASE}"
INTERFACE_INCLUDE_DIRECTORIES "${LAPACK_INCLUDE_DIR}"
IMPORTED_CONFIGURATIONS Release
IMPORTED_LINK_INTERFACE_LANGUAGES "C" )
if( EXISTS "${LAPACK_LIBRARY_DEBUG}" )
set_property( TARGET lapack APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug )
set_target_properties( lapack PROPERTIES
IMPORTED_LOCATION_DEBUG "${LAPACK_LIBRARY_DEBUG}" )
endif()
endif()
endif()
Loading