forked from compAIR/libcreate
cmake: do not install to opt
This commit is contained in:
parent
f3cafc241d
commit
78424d187c
3 changed files with 7 additions and 11 deletions
|
@ -2,7 +2,7 @@ FROM debian:bookworm
|
||||||
|
|
||||||
RUN apt update && \
|
RUN apt update && \
|
||||||
apt install -y \
|
apt install -y \
|
||||||
build-essential cmake git file \
|
build-essential cmake git file tree \
|
||||||
libboost-system-dev libboost-thread-dev \
|
libboost-system-dev libboost-thread-dev \
|
||||||
libgtest-dev googletest && \
|
libgtest-dev googletest && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
|
@ -7,4 +7,9 @@ set -o pipefail
|
||||||
cmake -B /libcreate/build -S /libcreate -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS='-Werror'
|
cmake -B /libcreate/build -S /libcreate -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS='-Werror'
|
||||||
cmake --build /libcreate/build --config Release
|
cmake --build /libcreate/build --config Release
|
||||||
ctest -C Release --output-on-failure
|
ctest -C Release --output-on-failure
|
||||||
cpack --build /libcreate/build -G DEB
|
cpack --build /libcreate/build -G DEB
|
||||||
|
|
||||||
|
debs=(/libcreate/_packages/*.deb)
|
||||||
|
cp "${debs[0]}" /tmp/libcreate.deb
|
||||||
|
dpkg-deb -R /tmp/libcreate.deb /tmp/libcreate
|
||||||
|
tree /tmp/libcreate
|
|
@ -13,9 +13,6 @@ set(CPACK_VERBATIM_VARIABLES YES)
|
||||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY ${CPACK_PACKAGE_NAME})
|
set(CPACK_PACKAGE_INSTALL_DIRECTORY ${CPACK_PACKAGE_NAME})
|
||||||
SET(CPACK_OUTPUT_FILE_PREFIX "${CMAKE_SOURCE_DIR}/_packages")
|
SET(CPACK_OUTPUT_FILE_PREFIX "${CMAKE_SOURCE_DIR}/_packages")
|
||||||
|
|
||||||
# https://unix.stackexchange.com/a/11552/254512
|
|
||||||
set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/some")#/${CMAKE_PROJECT_VERSION}")
|
|
||||||
|
|
||||||
set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
|
set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
|
||||||
set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
|
set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
|
||||||
set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
|
set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
|
||||||
|
@ -40,11 +37,5 @@ set(
|
||||||
# package name for deb. If set, then instead of some-application-0.9.2-Linux.deb
|
# package name for deb. If set, then instead of some-application-0.9.2-Linux.deb
|
||||||
# you'll get some-application_0.9.2_amd64.deb (note the underscores too)
|
# you'll get some-application_0.9.2_amd64.deb (note the underscores too)
|
||||||
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
|
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
|
||||||
# that is if you want every group to have its own package,
|
|
||||||
# although the same will happen if this is not set (so it defaults to ONE_PER_GROUP)
|
|
||||||
# and CPACK_DEB_COMPONENT_INSTALL is set to YES
|
|
||||||
set(CPACK_COMPONENTS_GROUPING ALL_COMPONENTS_IN_ONE)#ONE_PER_GROUP)
|
|
||||||
# without this you won't be able to pack only specified component
|
|
||||||
set(CPACK_DEB_COMPONENT_INSTALL YES)
|
|
||||||
|
|
||||||
include(CPack)
|
include(CPack)
|
Loading…
Add table
Add a link
Reference in a new issue