2017-07-25 13:00:02 +08:00
include ( vcpkg_common_functions )
2018-12-14 09:43:20 +08:00
set ( GEOGRAM_VERSION 1.6.9 )
2017-07-25 13:00:02 +08:00
vcpkg_download_distfile ( ARCHIVE
2018-12-14 09:43:20 +08:00
U R L S " h t t p s : / / g f o r g e . i n r i a . f r / f r s / d o w n l o a d . p h p / f i l e / 3 7 7 7 9 / g e o g r a m _ $ { G E O G R A M _ V E R S I O N } . t a r . g z "
F I L E N A M E " g e o g r a m _ $ { G E O G R A M _ V E R S I O N } . t a r . g z "
S H A 5 1 2 1 b 5 c 7 5 4 0 b e f 7 3 4 c 1 9 0 8 f 2 1 3 f 2 6 7 8 0 a b a 6 3 b 4 9 1 1 a 8 0 2 2 d 5 e b 3 f 7 c 9 0 e a b e 2 c b 6 9 e f d 1 f 2 9 8 b 3 0 c d c 8 e 2 c 6 3 6 a 5 b 3 7 c 8 c 2 5 8 3 2 d d 4 a a d 0 b 7 c 2 f f 5 f 0 a 5 b 5 c a a 1 7 9 7 0 1 3 6
2017-07-25 13:00:02 +08:00
)
2018-12-14 09:43:20 +08:00
vcpkg_extract_source_archive_ex (
O U T _ S O U R C E _ P A T H S O U R C E _ P A T H
A R C H I V E $ { A R C H I V E }
R E F $ { G E O G R A M _ V E R S I O N }
[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
P A T C H E S
f i x - c m a k e - c o n f i g - a n d - i n s t a l l . p a t c h
2017-07-25 13:00:02 +08:00
)
2018-12-14 09:43:20 +08:00
file ( COPY ${ CURRENT_PORT_DIR } /Config.cmake.in DESTINATION ${ SOURCE_PATH } /cmake )
2018-07-04 12:26:54 +08:00
set ( GEOGRAM_WITH_GRAPHICS OFF )
if ( "graphics" IN_LIST FEATURES )
set ( GEOGRAM_WITH_GRAPHICS ON )
endif ( )
2018-12-14 09:43:20 +08:00
if ( VCPKG_LIBRARY_LINKAGE STREQUAL "static" )
set ( VORPALINE_BUILD_DYNAMIC FALSE )
2019-05-10 02:53:13 +08:00
if ( NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore" )
set ( VORPALINE_PLATFORM Win-vs-generic )
endif ( )
if ( VCPKG_CMAKE_SYSTEM_NAME MATCHES "Linux" )
message ( "geogram on Linux only supports dynamic library linkage. Building dynamic." )
set ( VCPKG_LIBRARY_LINKAGE dynamic )
set ( VORPALINE_PLATFORM Linux64-gcc-dynamic )
endif ( )
if ( VCPKG_CMAKE_SYSTEM_NAME MATCHES "Darwin" )
message ( "geogram on Darwin only supports dynamic library linkage. Building dynamic." )
set ( VCPKG_LIBRARY_LINKAGE dynamic )
set ( VORPALINE_PLATFORM Darwin-clang-dynamic )
endif ( )
2017-07-25 13:00:02 +08:00
else ( )
2018-12-14 09:43:20 +08:00
set ( VORPALINE_BUILD_DYNAMIC TRUE )
2019-05-10 02:53:13 +08:00
if ( NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore" )
set ( VORPALINE_PLATFORM Win-vs-generic )
endif ( )
if ( VCPKG_CMAKE_SYSTEM_NAME MATCHES "Linux" )
set ( VORPALINE_PLATFORM Linux64-gcc-dynamic )
endif ( )
if ( VCPKG_CMAKE_SYSTEM_NAME MATCHES "Darwin" )
set ( VORPALINE_PLATFORM Darwin-clang-dynamic )
endif ( )
2017-07-25 13:00:02 +08:00
endif ( )
2018-12-14 09:43:20 +08:00
vcpkg_configure_cmake (
S O U R C E _ P A T H $ { S O U R C E _ P A T H }
# Geogram cannot be built with ninja because it embeds $(Configuration) in some of the generated paths. These require MSBuild in order to be evaluated.
#PREFER_NINJA # Disable this option if project cannot be built with Ninja
O P T I O N S
- D V O R P A L I N E _ B U I L D _ D Y N A M I C = $ { V O R P A L I N E _ B U I L D _ D Y N A M I C }
- D G E O G R A M _ W I T H _ G R A P H I C S = $ { G E O G R A M _ W I T H _ G R A P H I C S }
- D G E O G R A M _ L I B _ O N L Y = O N
- D G E O G R A M _ U S E _ S Y S T E M _ G L F W 3 = O N
- D V O R P A L I N E _ P L A T F O R M = $ { V O R P A L I N E _ P L A T F O R M }
- D G E O G R A M _ W I T H _ V O R P A L I N E = O F F
)
2017-07-25 13:00:02 +08:00
vcpkg_install_cmake ( )
vcpkg_copy_pdbs ( )
[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
vcpkg_fixup_cmake_targets ( )
2017-07-25 13:00:02 +08:00
file ( MAKE_DIRECTORY ${ CURRENT_PACKAGES_DIR } /share )
file ( REMOVE_RECURSE ${ CURRENT_PACKAGES_DIR } /doc )
file ( REMOVE_RECURSE ${ CURRENT_PACKAGES_DIR } /debug/doc )
file ( REMOVE_RECURSE ${ CURRENT_PACKAGES_DIR } /debug/include )
2019-09-30 04:07:50 +08:00
file ( READ ${ CURRENT_PACKAGES_DIR } /share/geogram/GeogramTargets.cmake TARGET_CONFIG )
string ( REPLACE [[INTERFACE_INCLUDE_DIRECTORIES "/src/lib;${_IMPORT_PREFIX}/include" ]]
[ [ I N T E R F A C E _ I N C L U D E _ D I R E C T O R I E S " $ { _ I M P O R T _ P R E F I X } / i n c l u d e " ] ] T A R G E T _ C O N F I G " $ { T A R G E T _ C O N F I G } " )
file ( WRITE ${ CURRENT_PACKAGES_DIR } /share/geogram/GeogramTargets.cmake "${TARGET_CONFIG}" )
2017-07-25 13:00:02 +08:00
# Handle copyright
file ( COPY ${ SOURCE_PATH } /doc/devkit/license.dox DESTINATION ${ CURRENT_PACKAGES_DIR } /share/geogram )
file ( RENAME ${ CURRENT_PACKAGES_DIR } /share/geogram/license.dox ${ CURRENT_PACKAGES_DIR } /share/geogram/copyright )