From b6f71f4bec72d8d0781705056eab65dd7117b999 Mon Sep 17 00:00:00 2001 From: Clifford Yapp <238416+starseeker@users.noreply.github.com> Date: Wed, 26 Jul 2023 12:55:52 -0400 Subject: [PATCH] Add a way to suppress the PNG use of 'd' suffix Grr. If build type gets set to Debug, instead of being left empty, Linux is also throwing in the 'd' suffix on debug build libs from png. Add a way to specify at configure time not to do that - it really messes with our build logic. Should probably try to upstream this or something like it. --- src/other/ext/png.cmake | 1 + src/other/ext/png/CMakeLists.txt | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/other/ext/png.cmake b/src/other/ext/png.cmake index 9d521209297..2885101b43b 100644 --- a/src/other/ext/png.cmake +++ b/src/other/ext/png.cmake @@ -89,6 +89,7 @@ if (BRLCAD_PNG_BUILD) -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=${CMAKE_INSTALL_RPATH_USE_LINK_PATH} -DCMAKE_SKIP_BUILD_RPATH=${CMAKE_SKIP_BUILD_RPATH} -DPNG_LIB_NAME=${PNG_LIB_NAME} + -DPNG_NO_DEBUG_POSTFIX=ON -DPNG_PREFIX=brl_ -DPNG_STATIC=${BUILD_STATIC_LIBS} -DPNG_TESTS=OFF diff --git a/src/other/ext/png/CMakeLists.txt b/src/other/ext/png/CMakeLists.txt index 2db77f65262..8fbe2223fbb 100644 --- a/src/other/ext/png/CMakeLists.txt +++ b/src/other/ext/png/CMakeLists.txt @@ -224,7 +224,9 @@ endif(PNG_HARDWARE_OPTIMIZATIONS) set(PNG_LIB_NAME png${PNGLIB_MAJOR}${PNGLIB_MINOR}) # Distinguish between debug and release builds. -set(CMAKE_DEBUG_POSTFIX "d") +if(NOT PNG_NO_DEBUG_POSTFIX) + set(CMAKE_DEBUG_POSTFIX "d") +endif(NOT PNG_NO_DEBUG_POSTFIX) include(CheckCSourceCompiles) option(ld-version-script "Enable linker version script" ON)