mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-31 05:03:22 +08:00
93b38546e2
* [kinectsdk1, kinectsdk2] Add Config.cmake.in * change version-string to version * x-add-version * update supports * x-add-version * [kinectsdk1][kinectsdk2] Switch to lessmsi Co-authored-by: Lily Wang <v-lilywang@microsoft.com> Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
34 lines
1.3 KiB
CMake
34 lines
1.3 KiB
CMake
|
|
get_filename_component(_kinectsdk2_root "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
|
get_filename_component(_kinectsdk2_root "${_kinectsdk2_root}" PATH)
|
|
get_filename_component(_kinectsdk2_root "${_kinectsdk2_root}" PATH)
|
|
|
|
set(_kinectsdk2_rel_lib "${_kinectsdk2_root}/lib/Kinect20.lib")
|
|
set(_kinectsdk2_dbg_lib "${_kinectsdk2_root}/debug/lib/Kinect20.lib")
|
|
if (EXISTS "${_kinectsdk2_rel_lib}" OR EXISTS "${_kinectsdk2_dbg_lib}")
|
|
|
|
add_library(unofficial::kinectsdk2::kinectsdk2 INTERFACE IMPORTED)
|
|
set_target_properties(unofficial::kinectsdk2::kinectsdk2 PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${_kinectsdk2_root}/include")
|
|
|
|
if (EXISTS "${_kinectsdk2_rel_lib}")
|
|
set_target_properties(unofficial::kinectsdk2::kinectsdk2
|
|
PROPERTIES IMPORTED_LOCATION_RELEASE "${_kinectsdk2_rel_lib}")
|
|
set_property(TARGET unofficial::kinectsdk2::kinectsdk2 APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
|
|
endif()
|
|
if (EXISTS "${_kinectsdk2_dbg_lib}")
|
|
set_target_properties(unofficial::kinectsdk2::kinectsdk2
|
|
PROPERTIES IMPORTED_LOCATION_DEBUG "${_kinectsdk2_dbg_lib}")
|
|
set_property(TARGET unofficial::kinectsdk2::kinectsdk2 APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
|
|
endif()
|
|
|
|
else()
|
|
|
|
set(kinectsdk2_FOUND FALSE)
|
|
|
|
endif()
|
|
|
|
unset(_kinectsdk2_rel_lib)
|
|
unset(_kinectsdk2_dbg_lib)
|
|
|
|
unset(_kinectsdk2_root)
|