From 4a9ce6e2555dfaf9155fa279f25667350377f688 Mon Sep 17 00:00:00 2001 From: Daniil Rozanov Date: Sat, 15 Mar 2025 18:03:23 +0400 Subject: feat: chtype wrap --- CMakeLists.txt | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 CMakeLists.txt (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..f1fcc39 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,32 @@ +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() -- cgit v1.2.3