Skip to content

Commit c4edc1f

Browse files
committedDec 7, 2015
Some more fixes in FindNITE.cmake. Added readme.
1 parent 14d6b4b commit c4edc1f

File tree

2 files changed

+13
-21
lines changed

2 files changed

+13
-21
lines changed
 

‎README.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Kinect menu
2+
3+
## Installation
4+
* Clone the repository: `git clone https://github.com/dagophil/sfml_openni`
5+
* Switch to the source directory: `cd sfml_openni`
6+
* Create a build directory: `mkdir build`
7+
* Switch to the build directory: `cd build`
8+
* Run cmake: `cmake ../`
9+
* Compile the project: `make`

‎config/FindNITE.cmake

+4-21
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,14 @@ ELSE(WIN32)
2525
set(NITE_LIB_SEARCH_PATHS "${NITE_LIB_SEARCH_PATHS}" "/usr/local/lib" "/usr/lib")
2626
ENDIF(WIN32)
2727

28-
MESSAGE(STATUS "Try to look here: ${NITE_INCLUDE_SEARCH_PATHS}")
29-
3028
# Include dir
3129
find_path(NITE_INCLUDE_DIR
3230
NAMES XnVNite.h
3331
HINTS ${NITE_INCLUDE_SEARCH_PATHS}
3432
PATH_SUFFIXES "nite"
3533
)
36-
3734
if(NITE_INCLUDE_DIR STREQUAL "NITE_INCLUDE_DIR-NOTFOUND")
38-
message(STATUS "Looking for NITE in default dirs")
35+
message(STATUS "Looking for NITE in default dirs.")
3936
find_path(NITE_INCLUDE_DIR NAMES XnVNite.h
4037
PATH_SUFFIXES "nite"
4138
)
@@ -48,26 +45,12 @@ find_library(NITE_LIBRARY
4845
)
4946

5047
if(NITE_LIBRARY STREQUAL "NITE_LIBRARY-NOTFOUND")
51-
message(STATUS "can't find NITE library, looking more aggressively")
48+
message(STATUS "Could not find NITE library, looking more aggressively.")
5249
foreach(NITE_LOOKUP_PATH ${NITE_LIB_SEARCH_PATHS})
5350
file(GLOB NITE_LIBRARY "${NITE_LOOKUP_PATH}/*XnV*")
54-
message(STATUS "looking in ${NITE_LOOKUP_PATH} resulted in ${NITE_LIBRARY}")
55-
if(NITE_LIBRARY)
56-
# #found NITE library
57-
# #but there may be many files found..
58-
if(WIN32)
59-
foreach(NITE_LIBRARY_FOUND ${NITE_LIBRARY})
60-
message(STATUS "checking ${NITE_LIBRARY_FOUND}")
61-
string(REGEX MATCH "lib" FOUND_LIB_IN_FILE ${NITE_LIBRARY_FOUND})
62-
if(FOUND_LIB_IN_FILE)
63-
set(NITE_LIBRARY_TMP ${NITE_LIBRARY_TMP} ${NITE_LIBRARY_FOUND})
64-
endif()
65-
endforeach()
66-
set(NITE_LIBRARY ${NITE_LIBRARY_TMP})
67-
endif(WIN32)
68-
break()
69-
endif()
51+
message(STATUS "Looking in ${NITE_LOOKUP_PATH} resulted in ${NITE_LIBRARY}.")
7052
endforeach()
53+
message(FATAL_ERROR "Cannot decide which NITE libraries to use. Please set NITE_LIBRARY manually.")
7154
endif()
7255

7356
# Set the include dir variables and the libraries and let libfind_process do the rest.

0 commit comments

Comments
 (0)
Please sign in to comment.