diff options
author | Daniil Rozanov <dev@rozanov.info> | 2025-03-15 18:03:23 +0400 |
---|---|---|
committer | Daniil Rozanov <dev@rozanov.info> | 2025-03-15 18:03:23 +0400 |
commit | 4a9ce6e2555dfaf9155fa279f25667350377f688 (patch) | |
tree | 11bc0ea3a7b1c0be2c47419b7058d46d16e5f9f4 /CMakeLists.txt |
feat: chtype wrap
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 32 |
1 files changed, 32 insertions, 0 deletions
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 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> + $<INSTALL_INTERFACE:include>) + + +if( NCURSES_CPP_SAMPLES_BUILD ) + add_subdirectory( samples ) +endif() + +if( NCURSES_CPP_TESTS_BUILD ) + add_subdirectory( tests ) +endif() |