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

Fix CMake Install Path #257

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Scriptkiddi
Copy link

building this with a custom binary output path breaks with file not found the usage of this variable fixes that.
example for a custom output path is the build system on nixos (NixOS/nixpkgs#143915)

@@ -234,7 +234,7 @@ endif()

set(BINARY_INST_DESTINATION "bin")
set(RESOURCE_INST_DESTINATION "share/shadered")
install(PROGRAMS bin/SHADERed DESTINATION "${BINARY_INST_DESTINATION}" RENAME shadered)
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/bin/SHADERed DESTINATION "${BINARY_INST_DESTINATION}" RENAME shadered)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be done to all the hard-coded paths, e.g:

install(DIRECTORY bin/data bin/templates bin/themes bin/plugins DESTINATION "${RESOURCE_INST_DESTINATION}")

if (UNIX AND NOT APPLE)
	# install XDG desktop file and icon on Linux/BSD
	install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Misc/Linux/org.shadered.SHADERed.desktop DESTINATION "share/applications" RENAME shadered.desktop)
	install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Misc/Icon/icon.svg DESTINATION "share/pixmaps" RENAME shadered.svg)
	install(FILES ${CMAKE_CURRENT_BINARY_DIR}/bin/icon_32x32.png DESTINATION "share/icons/hicolor/32x32/apps" RENAME shadered.png)
	install(FILES ${CMAKE_CURRENT_BINARY_DIR}/bin/icon_64x64.png DESTINATION "share/icons/hicolor/64x64/apps" RENAME shadered.png)
	install(FILES ${CMAKE_CURRENT_BINARY_DIR}/bin/icon_128x128.png DESTINATION "share/icons/hicolor/128x128/apps" RENAME shadered.png)
	install(FILES ${CMAKE_CURRENT_BINARY_DIR}/bin/icon_256x256.png DESTINATION "share/icons/hicolor/256x256/apps" RENAME shadered.png)
endif()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very nice bro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants