45 lines
951 B
CMake
45 lines
951 B
CMake
cmake_minimum_required(VERSION 3.21)
|
|
|
|
project(
|
|
nixos-workstations-setup
|
|
VERSION 1.2.0
|
|
LANGUAGES CXX
|
|
)
|
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
set(CMAKE_AUTOMOC ON)
|
|
|
|
find_package(Qt6 REQUIRED COMPONENTS
|
|
Core
|
|
Gui
|
|
Qml
|
|
Quick
|
|
QuickControls2
|
|
)
|
|
|
|
qt_standard_project_setup(REQUIRES 6.6)
|
|
|
|
if(NOT DEFINED PASSWORD_HELPER_PATH)
|
|
message(FATAL_ERROR "PASSWORD_HELPER_PATH is required")
|
|
endif()
|
|
|
|
if(NOT DEFINED PIN_HELPER_PATH)
|
|
message(FATAL_ERROR "PIN_HELPER_PATH is required")
|
|
endif()
|
|
|
|
# Les chemins Nix sont générés dans un header au lieu d'être injectés avec
|
|
# -D...=\"...\". Cela supprime toute ambiguïté d'échappement CMake/compilateur.
|
|
configure_file(
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/Config.h.in
|
|
${CMAKE_CURRENT_BINARY_DIR}/generated/Config.h
|
|
@ONLY
|
|
)
|
|
|
|
add_subdirectory(src)
|
|
|
|
install(
|
|
FILES org.raspot.nixosworkstations.setup.desktop
|
|
DESTINATION share/applications
|
|
)
|