From bf6fa6bce404279332dcf157fa1025b10d2ea591 Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Sat, 19 Mar 2022 15:59:38 +0100 Subject: [PATCH] Merge pull request #295 from Scrumplex/fix-portable Make Launcher_PORTABLE work on all platforms --- CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c087e95f9..12ff771ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -155,6 +155,10 @@ add_subdirectory(program_info) # Install the build results according to platform set(Launcher_PORTABLE 1 CACHE BOOL "The type of installation (Portable or System)") +if (Launcher_PORTABLE) + # launcher/Application.cpp will use this value + set(Launcher_APP_BINARY_DEFS "-DLAUNCHER_PORTABLE") +endif() if(UNIX AND APPLE) set(BINARY_DEST_DIR "${Launcher_Name}.app/Contents/MacOS") @@ -194,9 +198,6 @@ elseif(UNIX) set(BUNDLE_DEST_DIR ".") set(JARS_DEST_DIR "bin/jars") - # launcher/Application.cpp will use this value - set(Launcher_APP_BINARY_DEFS "-DLAUNCHER_PORTABLE") - # Install basic runner script configure_file(launcher/Launcher.in "${CMAKE_CURRENT_BINARY_DIR}/LauncherScript" @ONLY) install(PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/LauncherScript" DESTINATION ${BUNDLE_DEST_DIR} RENAME ${Launcher_Name})