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
2021-02-27 05:14:09 +08:00
R E F b c 0 9 1 0 f 8 b a 3 c 3 3 3 0 7 f f 2 4 7 a 2 9 d d 2 b 9 e 9 e f 1 b 2 6 9 d #v2.42.0
S H A 5 1 2 b 2 a 2 d 2 4 d f 4 b d f 4 8 5 3 d f 6 2 6 9 4 2 b 1 9 3 1 b b e 0 1 1 a 4 e 3 f a a a 4 e 3 c 4 b c b 3 f 7 6 5 0 6 a e 8 e d b 9 5 5 a 4 5 8 2 1 9 f d c 3 0 0 0 1 8 e 6 4 0 e 2 f f e 4 c d 3 4 f 4 5 9 7 8 6 b 9 0 9 c f 9 a a b 7 1 a 7 6 7 d 6 9 1 1 7 8
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
2021-06-03 10:22:16 +08:00
f i x _ c o n f i g _ o s x . 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
2021-06-03 10:22:16 +08:00
F E A T U R E S
t m 2 B U I L D _ W I T H _ T M 2
2020-04-17 04:29:32 +08:00
)
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
2021-01-20 07:28:30 +08:00
set ( PLATFORM_OPTIONS )
if ( VCPKG_TARGET_IS_ANDROID )
list ( APPEND PLATFORM_OPTIONS -DFORCE_RSUSB_BACKEND=ON )
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
2021-01-20 07:28:30 +08:00
$ { P L A T F O R M _ O P T I O N S }
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 )