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-05-20 06:15:33 +08:00
R E F 0 2 5 f c c f 7 6 8 0 3 e e 6 a 6 e 6 0 d e 9 f 1 8 a c 6 1 9 3 b 7 f f 8 5 9 7 #v2.34.0
S H A 5 1 2 c 5 0 2 f b a 6 b 3 d b b 3 4 b 0 a c 0 0 9 4 d e e f 9 f f c e 3 3 0 f a f 4 3 5 b b c 7 6 1 2 1 4 8 f d 8 b a 3 d 5 b 3 8 0 f 7 9 9 0 6 0 4 a 6 7 2 3 6 e 7 d a 8 1 5 c 8 e 6 9 8 8 a e 5 8 c 1 7 f a 5 9 7 5 7 1 a 2 4 6 2 f 7 5 c 8 f 5 0 0 0 0 0 7 c c 0 a
2020-01-11 07:39:20 +08:00
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
)
2020-03-28 10:13:40 +08:00
file ( COPY ${ SOURCE_PATH } /src/win7/drivers/IntelRealSense_D400_series_win7.inf DESTINATION ${ SOURCE_PATH } )
2018-04-18 01:01:22 +08:00
string ( COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" BUILD_CRT_LINKAGE )
2020-04-17 04:29:32 +08:00
vcpkg_check_features ( OUT_FEATURE_OPTIONS FEATURE_OPTIONS
t m 2 B U I L D _ W I T H _ T M 2
)
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
2020-04-17 04:29:32 +08:00
O P T I O N S $ { F E A T U R E _ 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
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
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 )