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 }
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 )
set ( VORPALINE_PLATFORM Win-vs-generic )
2017-07-25 13:00:02 +08:00
else ( )
2018-12-14 09:43:20 +08:00
set ( VORPALINE_BUILD_DYNAMIC TRUE )
set ( VORPALINE_PLATFORM Win-vs-dynamic-generic )
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 ( )
vcpkg_fixup_cmake_targets ( CONFIG_PATH "share/geogram" )
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 )
# 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 )