aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-11-22 19:31:53 +0000
committersaturneric <[email protected]>2024-11-22 19:31:53 +0000
commit2537b845a1a14f063275822b64e7819f2e256c04 (patch)
tree2bc4399722f17cfa1cc2ed9556371f35bc09d0d4
parentfix: solve a build issue (diff)
downloadGpgFrontend-2537b845a1a14f063275822b64e7819f2e256c04.tar.gz
GpgFrontend-2537b845a1a14f063275822b64e7819f2e256c04.zip
fix: correct the path to the executable of app image mode
-rw-r--r--src/CMakeLists.txt18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index c1d3d326..ba92ef27 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -355,14 +355,6 @@ if(BUILD_APPLICATION)
if(${CMAKE_BUILD_TYPE} STREQUAL "Release")
if(MINGW)
add_executable(${AppName} WIN32 ${BASE_SOURCE} ${RESOURCE_FILES})
- elseif(BUILD_APP_IMAGE)
- add_executable(${AppName} ${BASE_SOURCE} ${RESOURCE_FILES})
-
- add_custom_command(TARGET ${AppName} POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/AppDir/usr/bin"
- COMMAND ${CMAKE_COMMAND} -E rename "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${AppName}" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/AppDir/usr/bin/${AppName}"
- COMMENT "Copying Binary into App Image"
- )
# app bundle packing using xcode
elseif(APPLE AND XCODE_BUILD)
@@ -403,7 +395,7 @@ if(BUILD_APPLICATION)
XCODE_ATTRIBUTE_ENABLE_APP_SANDBOX "${CUSTOM_ATTRIBUTE_ENABLE_APP_SANDBOX}"
XCODE_ATTRIBUTE_ENABLE_HARDENED_RUNTIME "Yes"
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "${GPGFRONTEND_XOCDE_CODE_SIGN_IDENTITY}")
- elseif(LINUX AND LINUX_INSTALL_SOFTWARE)
+ elseif(LINUX)
add_executable(${AppName} ${BASE_SOURCE} ${RESOURCE_FILES})
else()
message(FATAL_ERROR "cannot find a defined method to release application.")
@@ -431,6 +423,14 @@ if(BUILD_APPLICATION)
target_compile_features(${AppName} PUBLIC cxx_std_17)
endif()
+if(BUILD_APP_IMAGE)
+ add_custom_command(TARGET ${AppName} POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/AppDir/usr/bin"
+ COMMAND ${CMAKE_COMMAND} -E rename "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${AppName}" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/AppDir/usr/bin/${AppName}"
+ COMMENT "Copying Binary into App Image"
+ )
+endif()
+
if(STABLE_BUILD_ONLY_APPLICATION)
message(STATUS "Application Headers Search Path: ${CMAKE_INSTALL_PREFIX}/include/gpgfrontend")
target_include_directories(${AppName} PUBLIC "${CMAKE_INSTALL_PREFIX}/include/gpgfrontend")