diff --git a/CMakeLists.txt b/CMakeLists.txt index f4cd51b..08b652c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,6 +31,7 @@ endif(NOT GLEW_FOUND) ######################################################### # FIND OPENGL ######################################################### +set(OpenGL_GL_PREFERENCE "GLVND") find_package(OpenGL REQUIRED) include_directories(${OpenGL_INCLUDE_DIRS}) link_directories(${OpenGL_LIBRARY_DIRS}) @@ -45,12 +46,15 @@ find_package(PCL 1.3 REQUIRED COMPONENTS common io features segmentation) include_directories(${PCL_INCLUDE_DIRS}) link_directories(${PCL_LIBRARY_DIRS}) add_definitions(${PCL_DEFINITIONS}) - - - +######################################################### +# FIND BOOST (used by PCL) +######################################################### +find_package(Boost REQUIRED COMPONENTS system) +link_directories(${BOOST_LIBRARY_DIRS}) +add_definitions(${BOOST_DEFINITIONS}) if(CMAKE_COMPILER_IS_GNUCXX) - set(CMAKE_CXX_FLAGS "-Wall -std=gnu++0x") + set(CMAKE_CXX_FLAGS "-Wall -std=gnu++14") endif() add_subdirectory(src) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f93334b..d49846d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -14,7 +14,7 @@ add_executable(cube main.cpp globals.h globals.cpp file.h file.cpp vao.h vao.cpp ######################################################### # create the program -target_link_libraries(cube ${OPENGL_LIBRARIES} ${GLEW_LIBRARY} ${GLFW_LIBRARIES} ${PCL_COMMON_LIBRARIES} ${PCL_IO_LIBRARIES} ${PCL_FEATURES_LIBRARIES} ${PCL_SEGMENTATION_LIBRARIES}) +target_link_libraries(cube ${OPENGL_LIBRARIES} ${GLEW_LIBRARIES} ${GLFW_LIBRARIES} ${PCL_COMMON_LIBRARIES} ${PCL_IO_LIBRARIES} ${PCL_FEATURES_LIBRARIES} ${PCL_SEGMENTATION_LIBRARIES} ${Boost_LIBRARIES}) if(CMAKE_GENERATOR STREQUAL Xcode) set_target_properties( cube PROPERTIES