Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use relative paths so CMAKE_INSTALL_PREFIX works #133

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
cmake_minimum_required(VERSION 3.13)
project(joycond)

# default CMAKE INSTALL PREFIX so install can use relative paths
if(NOT CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_PREFIX /)
endif()

set(CMAKE_CXX_STANDARD 17)

# Generate compile_commands.json
Expand All @@ -25,15 +30,15 @@ target_link_libraries(

add_subdirectory(src)

install(TARGETS joycond DESTINATION /usr/bin/
install(TARGETS joycond DESTINATION usr/bin/
PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
install(FILES udev/89-joycond.rules udev/72-joycond.rules DESTINATION /lib/udev/rules.d/
install(FILES udev/89-joycond.rules udev/72-joycond.rules DESTINATION lib/udev/rules.d/
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ
)
install(FILES systemd/joycond.service DESTINATION /etc/systemd/system
install(FILES systemd/joycond.service DESTINATION etc/systemd/system
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ
)
install(FILES systemd/joycond.conf DESTINATION /etc/modules-load.d
install(FILES systemd/joycond.conf DESTINATION etc/modules-load.d
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ
)