2017-11-07 15:59:02 +08:00
include ( vcpkg_common_functions )
vcpkg_from_github (
O U T _ S O U R C E _ P A T H S O U R C E _ P A T H
R E P O I n t e l R e a l S e n s e / l i b r e a l s e n s e
2019-06-18 05:38:05 +08:00
R E F v 2 . 2 2 . 0
S H A 5 1 2 7 5 9 5 7 8 0 c 1 9 5 5 a 2 d 4 a 9 1 d f 5 b 7 0 a b 6 3 6 6 c 6 7 2 f 3 8 9 b c 3 d 2 d c b 9 f 2 e 7 8 a 2 e a 1 f c 8 7 5 c 6 5 f 8 7 8 1 0 3 d f 4 8 3 2 0 5 e 1 7 f 6 2 d f d 0 2 4 e e 5 f 7 c c b 1 5 a f c 5 d 1 8 9 7 8 d 3 c 2 5 a a 0 7 1 6 5 2 a b
2018-03-08 03:01:49 +08:00
H E A D _ R E F d e v e l o p m e n t
2019-06-18 07:04:18 +08:00
P A T C H E S
2019-09-24 01:43:25 +08:00
f i x _ o p e n n i 2 . p a t c h
f i x - d e p e n d e n c y - g l f w 3 . p a t c h
2017-11-07 15:59:02 +08:00
)
2018-04-18 01:01:22 +08:00
string ( COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" BUILD_CRT_LINKAGE )
2019-06-18 07:04:18 +08:00
set ( BUILD_TOOLS OFF )
2018-04-18 01:01:22 +08:00
if ( "tools" IN_LIST FEATURES )
2019-06-18 07:04:18 +08:00
set ( BUILD_TOOLS ON )
endif ( )
set ( BUILD_OPENNI2_BINDINGS OFF )
if ( ( "openni2" IN_LIST FEATURES ) AND ( VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic" ) )
set ( BUILD_OPENNI2_BINDINGS ON )
2018-04-18 01:01:22 +08:00
endif ( )
2017-11-07 15:59:02 +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 }
2019-06-18 05:38:05 +08:00
P R E F E R _ N I N J A
2017-11-07 15:59:02 +08:00
O P T I O N S
2017-12-24 22:46:16 +08:00
- D E N F O R C E _ M E T A D A T A = O N
2019-06-18 05:38:05 +08:00
- D B U I L D _ W I T H _ T M 2 = O F F
2018-03-08 03:01:49 +08:00
- D B U I L D _ W I T H _ O P E N M P = O F F
2019-06-18 05:38:05 +08:00
- D B U I L D _ U N I T _ T E S T S = O F F
2018-03-08 03:01:49 +08:00
- D B U I L D _ W I T H _ S T A T I C _ C R T = $ { B U I L D _ C R T _ L I N K A G E }
2019-06-18 07:04:18 +08:00
- D B U I L D _ O P E N N I 2 _ B I N D I N G S = $ { B U I L D _ O P E N N I 2 _ B I N D I N G S }
- D O P E N N I 2 _ D I R = $ { C U R R E N T _ I N S T A L L E D _ D I R } / i n c l u d e / o p e n n i 2
2019-06-18 05:38:05 +08:00
O P T I O N S _ R E L E A S E
2019-06-18 07:04:18 +08:00
- D B U I L D _ E X A M P L E S = $ { B U I L D _ T O O L S }
- D B U I L D _ G R A P H I C A L _ E X A M P L E S = $ { B U I L D _ T O O L S }
2017-11-07 15:59:02 +08:00
O P T I O N S _ D E B U G
2018-04-24 22:07:37 +08:00
- D B U I L D _ E X A M P L E S = O F F
- D B U I L D _ G R A P H I C A L _ E X A M P L E S = O F F
2017-11-07 15:59:02 +08:00
)
vcpkg_install_cmake ( )
2019-06-18 05:38:05 +08:00
2017-11-07 15:59:02 +08:00
vcpkg_fixup_cmake_targets ( CONFIG_PATH lib/cmake/realsense2 )
2019-06-18 05:38:05 +08:00
2018-04-18 01:01:22 +08:00
vcpkg_copy_pdbs ( )
2017-11-07 15:59:02 +08:00
2019-06-18 05:38:05 +08:00
2017-11-07 15:59:02 +08:00
file ( REMOVE_RECURSE ${ CURRENT_PACKAGES_DIR } /debug/include )
2018-04-18 01:01:22 +08:00
file ( REMOVE_RECURSE ${ CURRENT_PACKAGES_DIR } /debug/share )
2017-11-07 15:59:02 +08:00
2019-06-18 07:04:18 +08:00
if ( BUILD_TOOLS )
2019-06-18 05:38:05 +08:00
file ( GLOB EXEFILES_RELEASE
$ { C U R R E N T _ P A C K A G E S _ D I R } / b i n / r s - *
$ { C U R R E N T _ P A C K A G E S _ D I R } / b i n / r e a l s e n s e - *
)
2018-10-26 00:32:23 +08:00
if ( EXEFILES_RELEASE )
file ( COPY ${ EXEFILES_RELEASE } DESTINATION ${ CURRENT_PACKAGES_DIR } /tools/realsense2 )
file ( REMOVE ${ EXEFILES_RELEASE } )
endif ( )
2019-06-18 05:38:05 +08:00
2018-04-18 01:01:22 +08:00
vcpkg_copy_tool_dependencies ( ${ CURRENT_PACKAGES_DIR } /tools/realsense2 )
2018-10-26 00:32:23 +08:00
file ( GLOB BINS ${ CURRENT_PACKAGES_DIR } /bin/* )
if ( NOT BINS )
file ( REMOVE_RECURSE ${ CURRENT_PACKAGES_DIR } /bin ${ CURRENT_PACKAGES_DIR } /debug/bin )
endif ( )
2019-09-24 01:43:25 +08:00
# Issue#7109, remove mismatched dlls and libs when build with tools, this workaround should be removed when the post-build checks related feature implemented.
file ( REMOVE ${ CURRENT_PACKAGES_DIR } /lib/realsense2-gl.lib )
file ( REMOVE ${ CURRENT_PACKAGES_DIR } /bin/realsense2-gl.dll )
file ( REMOVE ${ CURRENT_PACKAGES_DIR } /bin/realsense2-gl.pdb )
2018-04-18 01:01:22 +08:00
endif ( )
2017-11-07 15:59:02 +08:00
2019-06-18 07:04:18 +08:00
if ( BUILD_OPENNI2_BINDINGS )
file ( COPY ${ CURRENT_BUILDTREES_DIR } / ${ TARGET_TRIPLET } -rel/_out/rs2driver*
D E S T I N A T I O N $ { C U R R E N T _ P A C K A G E S _ D I R } / t o o l s / o p e n n i 2 / O p e n N I 2 / D r i v e r s )
endif ( )
2019-09-24 01:43:25 +08:00
file ( INSTALL ${ SOURCE_PATH } /LICENSE DESTINATION ${ CURRENT_PACKAGES_DIR } /share/ ${ PORT } RENAME copyright )