Created
May 22, 2015 08:43
-
-
Save Furkanzmc/3f52ed09d6f24710750b to your computer and use it in GitHub Desktop.
Cmake file to find Kinect SDK v2 library on Windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set(KinectSDK2_FOUND OFF CACHE BOOL "Kinect 2.x SDK found") | |
set(KINECTSDK20_DIR "NOT FOUND" CACHE PATH "Kinect 2.x SDK path") | |
if(WIN32) | |
if(EXISTS $ENV{KINECTSDK20_DIR}) | |
message(KINECT_FOUND) | |
set(KinectSDK2_FOUND ON CACHE BOOL "Kinect 2.x SDK found" FORCE) | |
set(KinectSDK2_DIR $ENV{KinectSDK2_DIR} CACHE PATH "Kinect 2.x SDK path" FORCE) | |
if(EXISTS $ENV{KINECTSDK20_DIR}/inc) | |
set(KinectSDK2_INCLUDE_DIRS $ENV{KINECTSDK20_DIR}/inc) | |
message(KINECT_INC_FOUND) | |
endif() | |
if(EXISTS $ENV{KINECTSDK20_DIR}/lib/x86/) | |
set(KinectSDK2_LIBRARY_DIRS $ENV{KINECTSDK20_DIR}/lib/x86/) | |
message(KINECT_LIB_DIR_FOUND) | |
endif() | |
if(EXISTS $ENV{KINECTSDK20_DIR}/lib/x86/Kinect20.lib) | |
set(KinectSDK2_LIBRARIES $ENV{KINECTSDK20_DIR}/lib/x86/Kinect20.lib) | |
message(KINECT_LIB_FOUND) | |
endif() | |
endif() | |
else() | |
endif() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment