diff --git a/OpenNI2-FreenectDriver/CMakeLists.txt b/OpenNI2-FreenectDriver/CMakeLists.txt index 483c3529..d35b4366 100644 --- a/OpenNI2-FreenectDriver/CMakeLists.txt +++ b/OpenNI2-FreenectDriver/CMakeLists.txt @@ -2,7 +2,7 @@ # OpenNI2-FreenectDriver ###################################################################################### -cmake_minimum_required(VERSION 3.1.0) +cmake_minimum_required(VERSION 3.8.2) file(GLOB HEADERS src/*.hpp src/*.h) file(GLOB SOURCES src/*.cpp) @@ -15,14 +15,14 @@ set_target_properties(FreenectDriver PROPERTIES VERSION ${PROJECT_VER} SOVERSION ${PROJECT_APIVER} OUTPUT_NAME FreenectDriver) - + add_definitions(-DPROJECT_VER="${PROJECT_VER}") include_directories(extern/OpenNI-Linux-x64-2.2.0.33/Include) include_directories(${PROJECT_SOURCE_DIR}/src) include_directories(${PROJECT_SOURCE_DIR}/wrappers/cpp) -target_compile_features(FreenectDriver PUBLIC cxx_constexpr) +target_compile_features(FreenectDriver PUBLIC cxx_std_11 cxx_constexpr) target_link_libraries(FreenectDriver freenectstatic ${MATH_LIB}) diff --git a/README.md b/README.md index 3ae98ffe..4ee7a6cd 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Notice: If you have the newer Kinect v2 (XBox One), use [OpenKinect/libfreenect2 To build libfreenect, you'll need - [libusb](http://libusb.info) >= 1.0.18 (Windows needs >= 1.0.22) -- [CMake](http://cmake.org) >= 3.1.0 +- [CMake](http://cmake.org) >= 3.8.2 - [python](http://python.org) >= 2.7 or >= 3.3 (only if BUILD_PYTHON=ON or BUILD_PYTHON2=ON or BUILD_PYTHON3=ON or BUILD_REDIST_PACKAGE=OFF) For the examples, you'll need diff --git a/wrappers/cpp/CMakeLists.txt b/wrappers/cpp/CMakeLists.txt index 6a47d121..6d179243 100644 --- a/wrappers/cpp/CMakeLists.txt +++ b/wrappers/cpp/CMakeLists.txt @@ -1,5 +1,4 @@ -cmake_minimum_required(VERSION 3.1.0) -set_property(DIRECTORY PROPERTY CXX_STANDARD 11) +cmake_minimum_required(VERSION 3.8.2) install(FILES libfreenect.hpp DESTINATION ${PROJECT_INCLUDE_INSTALL_DIR}) @@ -16,6 +15,9 @@ if (BUILD_EXAMPLES) add_executable(freenect-cppview cppview.cpp) add_executable(freenect-cpp_pcview cpp_pc_view.cpp) + target_compile_features(freenect-cppview PUBLIC cxx_std_11) + target_compile_features(freenect-cpp_pcview PUBLIC cxx_std_11) + target_link_libraries(freenect-cppview freenect ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB}) target_link_libraries(freenect-cpp_pcview freenect ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIB})