I also had to place cmake_minimum_required(VERSION 2.4) at the top of CMakeLists.txt.
kobra@pc:~/.builds/dub/build$ cmake ..
-- The C compiler identification is GNU 4.8.2
-- The CXX compiler identification is GNU 4.8.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
CMake Error at CMakeLists.txt:14 (install):
install DIRECTORY given no DESTINATION!
-- Configuring incomplete, errors occurred!
See also "/home/kobra/.builds/dub/build/CMakeFiles/CMakeOutput.log".
kobra@pc:~/.builds/dub/build$ cmake --version
cmake version 2.8.12.1
I also had to place
cmake_minimum_required(VERSION 2.4)
at the top ofCMakeLists.txt
.