Skip to content

Instantly share code, notes, and snippets.

@romildo
Created February 20, 2017 22:53
Show Gist options
  • Save romildo/3b36e2f7873dcd19a423281666aac6dd to your computer and use it in GitHub Desktop.
Save romildo/3b36e2f7873dcd19a423281666aac6dd to your computer and use it in GitHub Desktop.
CMake cannot find ncurses in NixOS: CMakeLists.txt
cmake_minimum_required(VERSION 3.6)
project(eplan-c++)
find_package(Curses REQUIRED)
@romildo
Copy link
Author

romildo commented Feb 20, 2017

Output:

$ nix-shell -p ncurses.all

$ mkdir -p /alt/projects/eplan-c++/build

$ cd /alt/projects/eplan-c++/build/

$ cmake ..
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /run/current-system/sw/bin/cc
-- Check for working C compiler: /run/current-system/sw/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /run/current-system/sw/bin/c++
-- Check for working CXX compiler: /run/current-system/sw/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at /nix/store/bys9rpjlg0jq98kzzsa8ldbswlhxnf9f-cmake-3.7.1/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:138 (message):
  Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH)
Call Stack (most recent call first):
  /nix/store/bys9rpjlg0jq98kzzsa8ldbswlhxnf9f-cmake-3.7.1/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /nix/store/bys9rpjlg0jq98kzzsa8ldbswlhxnf9f-cmake-3.7.1/share/cmake-3.7/Modules/FindCurses.cmake:196 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:5 (find_package)


-- Configuring incomplete, errors occurred!
See also "/alt/projects/eplan-c++/build/CMakeFiles/CMakeOutput.log".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment