mirror of https://github.com/WerWolv/ImHex.git
build: Fix usage of CMAKE_INSTALL_PREFIX on Linux (#401)
* build: Fix usage of CMAKE_INSTALL_PREFIX * build: Use /usr prefix in Linux CI builds * ci: Delete DEBIAN folder after .deb packaging step
This commit is contained in:
parent
89b9d21eaa
commit
3e9493f3e7
|
@ -194,7 +194,7 @@ jobs:
|
||||||
cd build
|
cd build
|
||||||
CC=gcc-10 CXX=g++-10 cmake \
|
CC=gcc-10 CXX=g++-10 cmake \
|
||||||
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
|
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
|
||||||
-DCMAKE_INSTALL_PREFIX="$PWD/install" \
|
-DCMAKE_INSTALL_PREFIX="$PWD/install/usr" \
|
||||||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||||
-DCMAKE_C_FLAGS="-fuse-ld=lld" \
|
-DCMAKE_C_FLAGS="-fuse-ld=lld" \
|
||||||
|
@ -214,8 +214,10 @@ jobs:
|
||||||
|
|
||||||
- name: 📦 Bundle DEB
|
- name: 📦 Bundle DEB
|
||||||
run: |
|
run: |
|
||||||
|
cp -r build/DEBIAN build/install
|
||||||
dpkg-deb --build build/install
|
dpkg-deb --build build/install
|
||||||
mv build/install.deb imhex.deb
|
mv build/install.deb imhex.deb
|
||||||
|
rm -rf build/install/DEBIAN
|
||||||
|
|
||||||
- name: 📦 Bundle AppImage
|
- name: 📦 Bundle AppImage
|
||||||
run: |
|
run: |
|
||||||
|
@ -249,3 +251,4 @@ jobs:
|
||||||
name: Linux AppImage
|
name: Linux AppImage
|
||||||
path: |
|
path: |
|
||||||
imhex.AppImage
|
imhex.AppImage
|
||||||
|
|
||||||
|
|
|
@ -68,10 +68,10 @@ macro(detectOS)
|
||||||
set(MAGIC_INSTALL_LOCATION "magic")
|
set(MAGIC_INSTALL_LOCATION "magic")
|
||||||
elseif(UNIX AND NOT APPLE)
|
elseif(UNIX AND NOT APPLE)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DOS_LINUX")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DOS_LINUX")
|
||||||
set(CMAKE_INSTALL_BINDIR "usr/bin")
|
set(CMAKE_INSTALL_BINDIR "bin")
|
||||||
set(CMAKE_INSTALL_LIBDIR "usr/lib")
|
set(CMAKE_INSTALL_LIBDIR "lib")
|
||||||
set(PLUGINS_INSTALL_LOCATION "usr/share/imhex/plugins")
|
set(PLUGINS_INSTALL_LOCATION "share/imhex/plugins")
|
||||||
set(MAGIC_INSTALL_LOCATION "usr/share/imhex/magic")
|
set(MAGIC_INSTALL_LOCATION "share/imhex/magic")
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Unknown / unsupported system!")
|
message(FATAL_ERROR "Unknown / unsupported system!")
|
||||||
endif()
|
endif()
|
||||||
|
@ -209,9 +209,8 @@ macro(createPackage)
|
||||||
]])
|
]])
|
||||||
elseif(UNIX AND NOT APPLE)
|
elseif(UNIX AND NOT APPLE)
|
||||||
configure_file(${CMAKE_SOURCE_DIR}/dist/DEBIAN/control.in ${CMAKE_BINARY_DIR}/DEBIAN/control)
|
configure_file(${CMAKE_SOURCE_DIR}/dist/DEBIAN/control.in ${CMAKE_BINARY_DIR}/DEBIAN/control)
|
||||||
install(FILES ${CMAKE_BINARY_DIR}/DEBIAN/control DESTINATION ${CMAKE_INSTALL_PREFIX}/DEBIAN)
|
install(FILES ${CMAKE_SOURCE_DIR}/dist/imhex.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications)
|
||||||
install(FILES ${CMAKE_SOURCE_DIR}/dist/imhex.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/usr/share/applications)
|
install(FILES ${CMAKE_SOURCE_DIR}/resources/icon.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/pixmaps RENAME imhex.png)
|
||||||
install(FILES ${CMAKE_SOURCE_DIR}/resources/icon.png DESTINATION ${CMAKE_INSTALL_PREFIX}/usr/share/pixmaps RENAME imhex.png)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (CREATE_BUNDLE)
|
if (CREATE_BUNDLE)
|
||||||
|
|
Loading…
Reference in New Issue