OpenHantek / openhantek

OpenHantek is a DSO software for Hantek (Voltcraft/Darkwire/Protek/Acetech) USB digital signal oscilloscopes
http://openhantek.org/
GNU General Public License v3.0
763 stars 199 forks source link

Failed to build with cmake < 3.11 #265

Open eagafonov opened 5 years ago

eagafonov commented 5 years ago
$ cmake --version
cmake version 3.7.2

$ cmake ..
CMake Error at CMakeLists.txt:4 (cmake_policy):
  Policy "CMP0072" is not known to this version of CMake.

Commit https://github.com/OpenHantek/openhantek/commit/9d0ebc7701d9a66934bb95ac01db6c71df87dabb forces CMake Policy 0072 which is available since CMake 3.11 so the build fails with any earlier versions.

The possible fix is to replace faulty line with equivalent version

set(OpenGL_GL_PREFERENCE GLVND)

davidgraeff commented 5 years ago

Correct. If you open a pull request, I would happily accept it.