cmake_minimum_required( VERSION 3.12 ) project( NCursesCpp LANGUAGES CXX ) if( CMAKE_VERSION VERSION_LESS "3.21" ) string( COMPARE EQUAL ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR} PROJECT_IS_TOP_LEVEL ) endif() if ( PROJECT_IS_TOP_LEVEL ) set( CMAKE_CXX_STANDARD 11 ) endif() option( NCURSES_CPP_SAMPLES_BUILD "Build samples" OFF ) option( NCURSES_CPP_TESTS_BUILD "Build tests" OFF ) list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake") include(Util) add_library( NCursesCpp INTERFACE ) add_library( NCurses::Cpp ALIAS NCursesCpp ) target_include_directories( NCursesCpp INTERFACE $ $) if( NCURSES_CPP_SAMPLES_BUILD ) add_subdirectory( samples ) endif() if( NCURSES_CPP_TESTS_BUILD ) add_subdirectory( tests ) endif()