Skip to content
Snippets Groups Projects
Commit f164c281 authored by Evy Storozhenko's avatar Evy Storozhenko
Browse files

install through cmake

parent 6f70003f
No related branches found
No related tags found
No related merge requests found
cmake_minimum_required(VERSION 3.0) cmake_minimum_required(VERSION 3.20)
set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD 20)
...@@ -7,3 +7,7 @@ project(day01 LANGUAGES CXX VERSION 1.0.0) ...@@ -7,3 +7,7 @@ project(day01 LANGUAGES CXX VERSION 1.0.0)
add_executable(main add_executable(main
${PROJECT_SOURCE_DIR}/main.cpp ${PROJECT_SOURCE_DIR}/main.cpp
) )
install(TARGETS main
DESTINATION bin
)
\ No newline at end of file
...@@ -22,12 +22,6 @@ ...@@ -22,12 +22,6 @@
name = "main"; name = "main";
inherit buildInputs; inherit buildInputs;
src = ./.; src = ./.;
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp ./main $out/bin/
runHook postInstall
'';
}; };
devShell = with pkgs; mkShell { devShell = with pkgs; mkShell {
buildInputs = buildInputs ++ [ clang-tools lldb ]; buildInputs = buildInputs ++ [ clang-tools lldb ];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment