nixos/packages/sbatch-tui/CMakeLists.txt

24 lines
967 B
CMake
Raw Permalink Normal View History

2024-06-08 18:37:36 +08:00
cmake_minimum_required(VERSION 3.14)
2024-06-08 20:35:25 +08:00
project(sbatch-tui VERSION 0.0.0 LANGUAGES CXX)
2024-06-08 18:37:36 +08:00
enable_testing()
include(GNUInstallDirs)
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message("Setting build type to 'Release' as none was specified.")
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
endif()
2024-06-08 20:35:25 +08:00
find_package(ftxui REQUIRED)
find_package(biu REQUIRED)
2024-06-08 18:37:36 +08:00
2024-09-21 01:51:51 +08:00
add_executable(sbatch-tui src/main.cpp)
2024-06-08 20:35:25 +08:00
target_compile_features(sbatch-tui PUBLIC cxx_std_23)
2024-09-04 10:39:12 +08:00
target_link_libraries(sbatch-tui PRIVATE ftxui::screen ftxui::dom ftxui::component biu::biu)
2024-06-08 18:37:36 +08:00
2024-06-08 20:35:25 +08:00
install(TARGETS sbatch-tui RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
2024-06-08 18:37:36 +08:00
get_property(ImportedTargets DIRECTORY "${CMAKE_SOURCE_DIR}" PROPERTY IMPORTED_TARGETS)
message("Imported targets: ${ImportedTargets}")
message("List of compile features: ${CMAKE_CXX_COMPILE_FEATURES}")