gigaTerminal text editor |
git clone git://git.dimitrijedobrota.com/giga.git |
Log | Files | Refs | README | HACKING | CONTRIBUTING | CODE_OF_CONDUCT | BUILDING | |
CMakeLists.txt (1331B)
1 cmake_minimum_required(VERSION 3.14) 2 3 include(cmake/prelude.cmake) 4 5 project( 6 giga 7 VERSION 0.1.12 8 DESCRIPTION "Terminal text editor" 9 HOMEPAGE_URL "https://git.dimitrijedobrota.com/giga.git" 10 LANGUAGES CXX 11 ) 12 13 include(cmake/project-is-top-level.cmake) 14 include(cmake/variables.cmake) 15 16 find_package(display 0.3 CONFIG REQUIRED) 17 find_package(alec 0.1.13 CONFIG REQUIRED) 18 19 # ---- Declare library ---- 20 21 add_library( 22 giga_lib OBJECT 23 source/layout_dynamic.cpp 24 ) 25 26 target_include_directories( 27 giga_lib ${warning_guard} 28 PUBLIC 29 "\$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/source>" 30 ) 31 32 target_compile_features(giga_lib PUBLIC cxx_std_20) 33 target_link_libraries(giga_lib PUBLIC display::display) 34 35 # ---- Declare executable ---- 36 37 add_executable(giga_exe source/main.cpp) 38 add_executable(giga::exe ALIAS giga_exe) 39 40 set_property(TARGET giga_exe PROPERTY OUTPUT_NAME giga) 41 42 target_compile_features(giga_exe PRIVATE cxx_std_20) 43 44 target_link_libraries(giga_exe PRIVATE giga_lib) 45 46 # ---- Install rules ---- 47 48 if(NOT CMAKE_SKIP_INSTALL_RULES) 49 include(cmake/install-rules.cmake) 50 endif() 51 52 # ---- Developer mode ---- 53 54 if(NOT giga_DEVELOPER_MODE) 55 return() 56 elseif(NOT PROJECT_IS_TOP_LEVEL) 57 message( 58 AUTHOR_WARNING 59 "Developer mode is intended for developers of giga" 60 ) 61 endif() 62 63 include(cmake/dev-mode.cmake)