-
-
Notifications
You must be signed in to change notification settings - Fork 489
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
install target on Linux does not follow CMAKE_INSTALL_PREFIX #1224
Comments
Did you use |
Yes (it is in the title), the cmake command I used was |
Seems |
I use CMAKE_INSTALL_PREFIX because I don't want files to be installed outside of this prefix.
Desktop files may be installed in any XDG_DATA_DIRS (e.g. I've looked at |
Just fixed |
In other words, I have to read one path from |
For installation, no. XDG_DATA_DIRS will be used by the desktop shell to find desktop files. cmake should simply install in CMAKE_INSTALL_PREFIX. I think simply using relative path should be enough. diff --git a/CMakeLists.txt b/CMakeLists.txt
index be05eaf..a117566 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -892,8 +892,8 @@ if(BUILD_SDL)
install(TARGETS ${TIC80_OUTPUT} DESTINATION bin)
- SET(TIC80_DESKTOP_DIR "/usr/share/applications/")
- SET(TIC80_PIXMAPS_DIR "/usr/share/icons/")
+ SET(TIC80_DESKTOP_DIR "share/applications/")
+ SET(TIC80_PIXMAPS_DIR "share/icons/")
install (FILES ${PROJECT_SOURCE_DIR}/build/linux/tic80.desktop DESTINATION ${TIC80_DESKTOP_DIR})
install (FILES ${PROJECT_SOURCE_DIR}/build/linux/tic80.xml DESTINATION ${TIC80_DESKTOP_DIR})
In the same manner, don't use absolute paths there. If the desktop file is somewhere standard and is found by the desktop shell, I think we can assume then tic80 is in the PATH. That how most desktop files seems work anyway. Who made the debian package? Maybe they should comment on that. I don't know the debian package creation process very well. |
Removed all the absolute paths, could you please check the latest version? |
Works for me. I also tested installing in ~/.local to make sure tic80.desktop worked and it does (TIC-80 starts and the icon is displayed correctly). |
Awesome, thank you. |
I configured cmake using a custom install prefix, but installation fails because it tries to copy file into /usr instead of the expected prefix.
The text was updated successfully, but these errors were encountered: