build: Improve names of packaging cmake options (#1398)
This PR is simply a refactor, to clarify these flags that shouldn't impact anything
This commit is contained in:
parent
c7c01c1f24
commit
c839ee7d13
5
.github/workflows/build.yml
vendored
5
.github/workflows/build.yml
vendored
@ -78,7 +78,7 @@ jobs:
|
|||||||
cmake -G "Ninja" \
|
cmake -G "Ninja" \
|
||||||
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
|
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
|
||||||
-DCMAKE_INSTALL_PREFIX="$PWD/install" \
|
-DCMAKE_INSTALL_PREFIX="$PWD/install" \
|
||||||
-DCREATE_PACKAGE=ON \
|
-DIMHEX_GENERATE_PACKAGE=ON \
|
||||||
-DIMHEX_USE_DEFAULT_BUILD_SETTINGS=ON \
|
-DIMHEX_USE_DEFAULT_BUILD_SETTINGS=ON \
|
||||||
-DIMHEX_PATTERNS_PULL_MASTER=ON \
|
-DIMHEX_PATTERNS_PULL_MASTER=ON \
|
||||||
-DIMHEX_COMMIT_HASH_SHORT="${GITHUB_SHA::7}" \
|
-DIMHEX_COMMIT_HASH_SHORT="${GITHUB_SHA::7}" \
|
||||||
@ -214,8 +214,7 @@ jobs:
|
|||||||
PKG_CONFIG_PATH="$(brew --prefix openssl)/lib/pkgconfig":"$(brew --prefix)/lib/pkgconfig" \
|
PKG_CONFIG_PATH="$(brew --prefix openssl)/lib/pkgconfig":"$(brew --prefix)/lib/pkgconfig" \
|
||||||
cmake -G "Ninja" \
|
cmake -G "Ninja" \
|
||||||
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
|
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
|
||||||
-DCREATE_BUNDLE=ON \
|
-DIMHEX_GENERATE_PACKAGE=ON \
|
||||||
-DCREATE_PACKAGE=ON \
|
|
||||||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||||
-DCMAKE_OBJC_COMPILER_LAUNCHER=ccache \
|
-DCMAKE_OBJC_COMPILER_LAUNCHER=ccache \
|
||||||
|
@ -14,6 +14,7 @@ option(IMHEX_ENABLE_LTO "Enables Link Time Optimizations if possible" OFF)
|
|||||||
option(IMHEX_USE_DEFAULT_BUILD_SETTINGS "Use default build settings" OFF)
|
option(IMHEX_USE_DEFAULT_BUILD_SETTINGS "Use default build settings" OFF)
|
||||||
option(IMHEX_STRICT_WARNINGS "Enable most available warnings and treat them as errors" ON)
|
option(IMHEX_STRICT_WARNINGS "Enable most available warnings and treat them as errors" ON)
|
||||||
option(IMHEX_STATIC_LINK_PLUGINS "Statically link all plugins into the main executable" OFF)
|
option(IMHEX_STATIC_LINK_PLUGINS "Statically link all plugins into the main executable" OFF)
|
||||||
|
option(IMHEX_GENERATE_PACKAGE "Specify if a native package should be built. Only usable on Windows and MacOS" OFF)
|
||||||
|
|
||||||
# Basic compiler and cmake configurations
|
# Basic compiler and cmake configurations
|
||||||
set(CMAKE_CXX_STANDARD 23)
|
set(CMAKE_CXX_STANDARD 23)
|
||||||
|
@ -89,14 +89,6 @@ endmacro()
|
|||||||
|
|
||||||
|
|
||||||
macro(configurePackingResources)
|
macro(configurePackingResources)
|
||||||
set(IMHEX_FORCE_LINK_PLUGINS "")
|
|
||||||
|
|
||||||
option (CREATE_PACKAGE "Create a package with CPack" OFF)
|
|
||||||
|
|
||||||
if (APPLE)
|
|
||||||
option (CREATE_BUNDLE "Create a bundle on macOS" OFF)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
if (NOT (CMAKE_BUILD_TYPE STREQUAL "Debug"))
|
if (NOT (CMAKE_BUILD_TYPE STREQUAL "Debug"))
|
||||||
set(APPLICATION_TYPE WIN32)
|
set(APPLICATION_TYPE WIN32)
|
||||||
@ -104,7 +96,7 @@ macro(configurePackingResources)
|
|||||||
|
|
||||||
set(IMHEX_ICON "${IMHEX_BASE_FOLDER}/resources/resource.rc")
|
set(IMHEX_ICON "${IMHEX_BASE_FOLDER}/resources/resource.rc")
|
||||||
|
|
||||||
if (CREATE_PACKAGE)
|
if (IMHEX_GENERATE_PACKAGE)
|
||||||
set(CPACK_GENERATOR "WIX")
|
set(CPACK_GENERATOR "WIX")
|
||||||
set(CPACK_PACKAGE_NAME "ImHex")
|
set(CPACK_PACKAGE_NAME "ImHex")
|
||||||
set(CPACK_PACKAGE_VENDOR "WerWolv")
|
set(CPACK_PACKAGE_VENDOR "WerWolv")
|
||||||
@ -122,7 +114,7 @@ macro(configurePackingResources)
|
|||||||
elseif (APPLE)
|
elseif (APPLE)
|
||||||
set (IMHEX_ICON "${IMHEX_BASE_FOLDER}/resources/dist/macos/AppIcon.icns")
|
set (IMHEX_ICON "${IMHEX_BASE_FOLDER}/resources/dist/macos/AppIcon.icns")
|
||||||
|
|
||||||
if (CREATE_BUNDLE)
|
if (IMHEX_GENERATE_PACKAGE)
|
||||||
set(APPLICATION_TYPE MACOSX_BUNDLE)
|
set(APPLICATION_TYPE MACOSX_BUNDLE)
|
||||||
set_source_files_properties(${IMHEX_ICON} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
|
set_source_files_properties(${IMHEX_ICON} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
|
||||||
set(MACOSX_BUNDLE_ICON_FILE "AppIcon.icns")
|
set(MACOSX_BUNDLE_ICON_FILE "AppIcon.icns")
|
||||||
@ -170,7 +162,7 @@ macro(createPackage)
|
|||||||
if (WIN32)
|
if (WIN32)
|
||||||
install(TARGETS ${plugin} RUNTIME DESTINATION ${PLUGINS_INSTALL_LOCATION})
|
install(TARGETS ${plugin} RUNTIME DESTINATION ${PLUGINS_INSTALL_LOCATION})
|
||||||
elseif (APPLE)
|
elseif (APPLE)
|
||||||
if (CREATE_BUNDLE)
|
if (IMHEX_GENERATE_PACKAGE)
|
||||||
set_target_properties(${plugin} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PLUGINS_INSTALL_LOCATION})
|
set_target_properties(${plugin} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PLUGINS_INSTALL_LOCATION})
|
||||||
else ()
|
else ()
|
||||||
set_target_properties(${plugin} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/plugins)
|
set_target_properties(${plugin} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/plugins)
|
||||||
@ -240,7 +232,7 @@ macro(createPackage)
|
|||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (CREATE_BUNDLE)
|
if (IMHEX_GENERATE_PACKAGE AND APPLE)
|
||||||
include(PostprocessBundle)
|
include(PostprocessBundle)
|
||||||
|
|
||||||
set_target_properties(libimhex PROPERTIES SOVERSION ${IMHEX_VERSION})
|
set_target_properties(libimhex PROPERTIES SOVERSION ${IMHEX_VERSION})
|
||||||
@ -272,7 +264,7 @@ macro(createPackage)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (CREATE_PACKAGE)
|
if (IMHEX_GENERATE_PACKAGE AND WIN32)
|
||||||
set (CPACK_BUNDLE_NAME "ImHex")
|
set (CPACK_BUNDLE_NAME "ImHex")
|
||||||
set (CPACK_BUNDLE_ICON "${CMAKE_SOURCE_DIR}/resources/dist/macos/AppIcon.icns" )
|
set (CPACK_BUNDLE_ICON "${CMAKE_SOURCE_DIR}/resources/dist/macos/AppIcon.icns" )
|
||||||
set (CPACK_BUNDLE_PLIST "${CMAKE_BINARY_DIR}/ImHex.app/Contents/Info.plist")
|
set (CPACK_BUNDLE_PLIST "${CMAKE_BINARY_DIR}/ImHex.app/Contents/Info.plist")
|
||||||
|
3
dist/compiling/macos.md
vendored
3
dist/compiling/macos.md
vendored
@ -17,8 +17,7 @@ PKG_CONFIG_PATH="$(brew --prefix openssl)/lib/pkgconfig":"$(brew --prefix)/lib/p
|
|||||||
MACOSX_DEPLOYMENT_TARGET="10.15" \
|
MACOSX_DEPLOYMENT_TARGET="10.15" \
|
||||||
cmake \
|
cmake \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
-DCREATE_BUNDLE=ON \
|
-DIMHEX_GENERATE_PACKAGE=ON \
|
||||||
-DCREATE_PACKAGE=ON \
|
|
||||||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||||
-DCMAKE_OBJC_COMPILER_LAUNCHER=ccache \
|
-DCMAKE_OBJC_COMPILER_LAUNCHER=ccache \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user