From 6638dc55268eed63b3bfd7a65f0eb9450054a586 Mon Sep 17 00:00:00 2001 From: John Date: Sat, 12 Jan 2019 14:34:46 +0100 Subject: [PATCH] build-style/cmake.sh: Use -DCMAKE_BUILD_TYPE=RelWithDebInfo when having XBPS_DEBUG_PKGS set --- common/build-style/cmake.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/common/build-style/cmake.sh b/common/build-style/cmake.sh index d7fc5ce75c..feb1e2a7a9 100644 --- a/common/build-style/cmake.sh +++ b/common/build-style/cmake.sh @@ -40,7 +40,13 @@ SET(wxWidgets_CONFIG_EXECUTABLE ${XBPS_WRAPPERDIR}/${wx_config:=wx-config}) _EOF cmake_args+=" -DCMAKE_TOOLCHAIN_FILE=cross_${XBPS_CROSS_TRIPLET}.cmake" fi - cmake_args+=" -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release" + cmake_args+=" -DCMAKE_INSTALL_PREFIX=/usr" + + if [ -n "$XBPS_DEBUG_PKGS" ]; then + cmake_args+=" -DCMAKE_BUILD_TYPE=RelWithDebInfo" + else + cmake_args+=" -DCMAKE_BUILD_TYPE=Release" + fi if [ "$XBPS_TARGET_MACHINE" = "i686" ]; then cmake_args+=" -DCMAKE_INSTALL_LIBDIR=lib32"