Implement PR suggestions

This commit is contained in:
txtsd
2022-02-15 00:42:14 +05:30
parent 1e3b896fda
commit 69d01204e0
5 changed files with 11 additions and 12 deletions

View File

@ -147,7 +147,7 @@ add_subdirectory(program_info)
####################################### Install layout #######################################
# Install the build results according to platform
set(LAUNCHER_PORTABLE 1 CACHE BOOL "The type of installation (Portable or System)")
set(Launcher_PORTABLE 1 CACHE BOOL "The type of installation (Portable or System)")
if(UNIX AND APPLE)
@ -183,13 +183,13 @@ if(UNIX AND APPLE)
elseif(UNIX)
set(BINARY_DEST_DIR "bin")
if(LAUNCHER_PORTABLE)
if(Launcher_PORTABLE)
set(LIBRARY_DEST_DIR "bin")
set(BUNDLE_DEST_DIR ".")
set(JARS_DEST_DIR "bin/jars")
# launcher/Application.cpp will use this value
set(Launcher_APP_BINARY_DEFS "-DLAUNCHER_PORTABLE=1")
set(Launcher_APP_BINARY_DEFS "-DLauncher_PORTABLE=1")
# Install basic runner script
configure_file(launcher/Launcher.in "${CMAKE_CURRENT_BINARY_DIR}/LauncherScript" @ONLY)
@ -201,7 +201,7 @@ elseif(UNIX)
set(LAUNCHER_METAINFO_DEST_DIR "share/metainfo" CACHE STRING "Path to the metainfo directory")
set(LAUNCHER_ICON_DEST_DIR "share/icons/hicolor/scalable/apps" CACHE STRING "Path to the scalable icon directory")
set(Launcher_APP_BINARY_DEFS "-DMULTIMC_JARS_LOCATION=${CMAKE_INSTALL_PREFIX}/${JARS_DEST_DIR}" "-DLAUNCHER_PORTABLE=0")
set(Launcher_APP_BINARY_DEFS "-DMULTIMC_JARS_LOCATION=${CMAKE_INSTALL_PREFIX}/${JARS_DEST_DIR}" "-DLauncher_PORTABLE=0")
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${Launcher_Desktop} DESTINATION ${LAUNCHER_DESKTOP_DEST_DIR})
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${Launcher_MetaInfo} DESTINATION ${LAUNCHER_METAINFO_DEST_DIR})