cmake: fix SDL3-x.y.z.jar installation on Windows

This commit is contained in:
Anonymous Maarten 2024-08-23 03:20:39 +02:00
parent c298d2024a
commit 8bcfdb0c92
1 changed files with 2 additions and 1 deletions

View File

@ -3602,7 +3602,8 @@ if(NOT SDL_DISABLE_INSTALL)
if(TARGET SDL3-jar)
set(SDL_INSTALL_JAVADIR "${CMAKE_INSTALL_DATAROOTDIR}/java" CACHE PATH "Path where to install java clases + java sources")
set(PROGUARD_RULES_PATH "${CMAKE_CURRENT_SOURCE_DIR}/android-project/app/proguard-rules.pro")
install(FILES $<TARGET_PROPERTY:SDL3-jar,INSTALL_FILES>
# install_jar or $<TARGET_PROPERTY:SDL3-jar,INSTALL_FILES> does not work on Windows: a SDL3.jar symlink is not generated
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/SDL3-${SDL3_VERSION}.jar"
DESTINATION "${SDL_INSTALL_JAVADIR}/SDL3")
install(FILES "${PROGUARD_RULES_PATH}" RENAME "proguard.txt"
DESTINATION "${SDL_INSTALL_JAVADIR}/SDL3")