2017-11-07 15:59:02 +08:00
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
2020-01-11 07:39:20 +08:00
R E F 9 f 9 9 f a 9 a 5 0 9 5 5 5 f 8 5 b f f c 1 5 c e 2 7 5 3 1 a a a 6 d b 6 f 7 e #v2.30.0
S H A 5 1 2 7 2 d 9 e 0 b 4 8 a 6 c d 0 b 0 5 6 b 6 d 0 3 9 4 8 7 4 3 1 d 0 0 9 7 e 5 1 5 1 9 3 0 a 2 d b b 0 7 2 d 0 9 a 1 3 f c c e e 1 f 1 6 6 c a 3 3 9 f e 7 f 0 a b 4 a a e 1 e d c 5 6 6 9 d e 5 e 8 3 3 6 f 0 b 6 d 8 7 d 1 c 4 e a 0 1 e c 0 c 5 d 4 0 3 2 c 7 2 8
H E A D _ R E F m a s t e r
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 )
2020-03-17 05:56:05 +08:00
file ( GLOB RS2DRIVER ${ CURRENT_BUILDTREES_DIR } / ${ TARGET_TRIPLET } -rel/_out/rs2driver* )
if ( RS2DRIVER )
file ( COPY ${ RS2DRIVER } DESTINATION ${ CURRENT_PACKAGES_DIR } /tools/openni2/OpenNI2/Drivers )
endif ( )
2019-06-18 07:04:18 +08:00
endif ( )
2019-09-24 01:43:25 +08:00
file ( INSTALL ${ SOURCE_PATH } /LICENSE DESTINATION ${ CURRENT_PACKAGES_DIR } /share/ ${ PORT } RENAME copyright )