Browse Source

Generate love.desktop using CMake too

Since I cannot easily change the variable used there, update the autotools codepath to insert the CMake variable.
Bart van Strien 1 year ago
parent
commit
84982ff4ef
3 changed files with 6 additions and 2 deletions
  1. 4 0
      CMakeLists.txt
  2. 1 1
      platform/unix/Makefile.am
  3. 1 1
      platform/unix/love.desktop.in

+ 4 - 0
CMakeLists.txt

@@ -2179,8 +2179,12 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
 
 	include(CPack)
 elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
+	include(GNUInstallDirs)
+
 	file(COPY platform/unix/debian/ DESTINATION debian PATTERN "*.in" EXCLUDE)
 	configure_file(platform/unix/debian/control.in debian/control @ONLY)
 	configure_file(platform/unix/debian/changelog.in debian/changelog @ONLY)
 	configure_file(platform/unix/debian/rules.in debian/rules @ONLY)
+
+	configure_file(platform/unix/love.desktop.in love.desktop @ONLY)
 endif()

+ 1 - 1
platform/unix/Makefile.am

@@ -18,7 +18,7 @@ platform/unix/love.desktop: platform/unix/love.desktop.in
 	$(MKDIR_P) platform/unix
 	rm -f $@ [email protected]
 	$(SED) \
-		-e "s|@bindir[@]|$(bindir)|" \
+		-e "s|@CMAKE_INSTALL_FULL_BINDIR[@]|$(bindir)|" \
 		${srcdir}/[email protected] > [email protected]
 	chmod a-w [email protected]
 	mv [email protected] $@

+ 1 - 1
platform/unix/love.desktop.in

@@ -2,7 +2,7 @@
 Name=LÖVE
 Comment=The unquestionably awesome 2D game engine
 MimeType=application/x-love-game;
-Exec=@bindir@/love %f
+Exec=@CMAKE_INSTALL_FULL_BINDIR@/love %f
 Type=Application
 Categories=Development;Game;
 Terminal=false