Skip to content

Commit

Permalink
Update CMakeLists.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
constarg authored Dec 18, 2023
1 parent 93c06dd commit f322dc1
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
cmake_minimum_required(VERSION 3.19)
project(File_Sorter_Core C)
project(Sushi_Shuffle C)

set(CMAKE_C_STANDARD 17)

set(SOURCE_FILES main.c ./src/config.c ./src/sorter.c ./src/logger.c ./src/tool/actions.c)
set(HEADER_FILES ./include/config.h ./include/sorter.h ./include/logger.h ./include/tool/actions.h)
set(TO_INCLUDE ./include/)

add_executable(file-sorter ${SOURCE_FILES} ${HEADER_FILES})
add_executable(sushi-shuffle ${SOURCE_FILES} ${HEADER_FILES})

include_directories(${TO_INCLUDE})

set(GCC_COVERAGE_COMPILE_FLAGS "-pthread")

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}")

file(MAKE_DIRECTORY /home/$ENV{USER}/.local/share/file_sorter/)
file(MAKE_DIRECTORY /home/$ENV{USER}/.local/share/sushi_shuffle/)


file(MAKE_DIRECTORY /home/$ENV{USER}/.local/share/file_sorter/config/)
file(MAKE_DIRECTORY /home/$ENV{USER}/.local/share/sushi_shuffle/config/)

file(MAKE_DIRECTORY /home/$ENV{USER}/default_sorter_path/)

Expand Down Expand Up @@ -56,29 +56,29 @@ file(WRITE config/config.conf
[exclude]\n
[done])

file(WRITE service/file-sorter.service
file(WRITE service/sushi-shuffle.service
[Unit]\n
Description=File\ sorter\ helps\ you\ to\ organize\ your\ files.\n
Description=Sushi\ Shuffle\ helps\ you\ to\ organize\ your\ files.\n
\n
[Service]\n
Type=simple\n
ExecStart=/bin/bash\ -c\ "/home/$ENV{USER}/.local/bin/file-sorter\ --start-sorter"\n
ExecStart=/bin/bash\ -c\ "/home/$ENV{USER}/.local/bin/sushi-shuffle\ --start-sorter"\n
Restart=on-failure\n
Group=$ENV{USER}\n
\n
[Install]\n
WantedBy=multi-user.target\n)

file(WRITE autostart/file-sorter.desktop
file(WRITE autostart/sushi-shuffle.desktop
[Desktop\ Entry]\n
Version=1.0\n
Type=Application\n
Name=File\ Sorter\n
Comment=File\ sorter\ helps\ you\ to\ organize\ your\ files.\n
Exec=systemctl\ --user\ start\ file-sorter\n
Comment=Sushi\ Shuffle\ helps\ you\ to\ organize\ your\ files.\n
Exec=systemctl\ --user\ start\ sushi-shuffle\n
Terminal=false)

install(FILES config/config.conf PERMISSIONS OWNER_WRITE OWNER_READ GROUP_WRITE GROUP_READ WORLD_WRITE WORLD_READ DESTINATION /home/$ENV{USER}/.local/share/file_sorter/config/)
install(FILES service/file-sorter.service PERMISSIONS OWNER_EXECUTE OWNER_READ WORLD_EXECUTE WORLD_READ DESTINATION /home/$ENV{USER}/.config/systemd/user/)
install(FILES autostart/file-sorter.desktop PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE GROUP_EXECUTE GROUP_READ GROUP_WRITE WORLD_EXECUTE WORLD_READ WORLD_WRITE DESTINATION /home/$ENV{USER}/.config/autostart/)
install(FILES build/file-sorter PERMISSIONS OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE DESTINATION ~/.local/bin/)
install(FILES config/config.conf PERMISSIONS OWNER_WRITE OWNER_READ GROUP_WRITE GROUP_READ WORLD_WRITE WORLD_READ DESTINATION /home/$ENV{USER}/.local/share/sushi_shuffle/config/)
install(FILES service/sushi-shuffle.service PERMISSIONS OWNER_EXECUTE OWNER_READ WORLD_EXECUTE WORLD_READ DESTINATION /home/$ENV{USER}/.config/systemd/user/)
install(FILES autostart/sushi-shuffle.desktop PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE GROUP_EXECUTE GROUP_READ GROUP_WRITE WORLD_EXECUTE WORLD_READ WORLD_WRITE DESTINATION /home/$ENV{USER}/.config/autostart/)
install(FILES build/sushi-shuffle PERMISSIONS OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE DESTINATION ~/.local/bin/)

0 comments on commit f322dc1

Please sign in to comment.