launcher_project_windows.cmake 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #
  2. # Copyright (c) Contributors to the Open 3D Engine Project.
  3. # For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. #
  5. # SPDX-License-Identifier: Apache-2.0 OR MIT
  6. #
  7. #
  8. set(ICON_FILE ${project_real_path}/Gem/Resources/GameSDK.ico)
  9. if(NOT EXISTS ${ICON_FILE})
  10. # Try another project-relative path
  11. set(ICON_FILE ${project_real_path}/Resources/GameSDK.ico)
  12. endif()
  13. if(NOT EXISTS ${ICON_FILE})
  14. # Try the common LauncherUnified icon instead
  15. set(ICON_FILE Resources/GameSDK.ico)
  16. endif()
  17. set(SPLASH_FILE ${project_real_path}/Resources/Splash.bmp)
  18. if(NOT EXISTS ${SPLASH_FILE})
  19. # Try in project Gem
  20. set(SPLASH_FILE ${project_real_path}/Gem/Resources/Splash.bmp)
  21. endif()
  22. if(NOT EXISTS ${SPLASH_FILE})
  23. # Try legacy splash
  24. set(SPLASH_FILE ${project_real_path}/Resources/LegacyLogoLauncher.bmp)
  25. endif()
  26. if(NOT EXISTS ${SPLASH_FILE})
  27. # Try in Gem
  28. set(SPLASH_FILE ${project_real_path}/Gem/Resources/LegacyLogoLauncher.bmp)
  29. endif()
  30. if(EXISTS ${ICON_FILE} OR EXISTS ${SPLASH_FILE})
  31. set(target_file ${CMAKE_CURRENT_BINARY_DIR}/${project_name}.GameLauncher.rc)
  32. configure_file(${CMAKE_CURRENT_LIST_DIR}/Launcher.rc.in
  33. ${target_file}
  34. @ONLY
  35. )
  36. set(LY_FILES ${target_file})
  37. endif()