From b23fd0adde3f186f376b4cc0b98e7825b7b39931 Mon Sep 17 00:00:00 2001 From: Brett Jia Date: Mon, 23 Dec 2024 10:46:43 -0500 Subject: [PATCH] make libgpm optional --- cmake/extensions/CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cmake/extensions/CMakeLists.txt b/cmake/extensions/CMakeLists.txt index b13aa89..dd1115b 100644 --- a/cmake/extensions/CMakeLists.txt +++ b/cmake/extensions/CMakeLists.txt @@ -817,8 +817,12 @@ add_python_extension(${bz2_${PY_VERSION_MAJOR}_NAME} set(curses_common_REQUIRES CURSES_LIBRARIES) set(curses_common_LIBRARIES ${CURSES_LIBRARIES}) if(WITH_STATIC_DEPENDENCIES) - list(APPEND curses_common_REQUIRES TINFO_LIBRARY GPM_LIBRARY) - list(APPEND curses_common_LIBRARIES ${TINFO_LIBRARY} ${GPM_LIBRARY}) + list(APPEND curses_common_REQUIRES TINFO_LIBRARY) + list(APPEND curses_common_LIBRARIES ${TINFO_LIBRARY}) + if(GPM_LIBRARY) + list(APPEND curses_common_REQUIRES GPM_LIBRARY) + list(APPEND curses_common_LIBRARIES ${GPM_LIBRARY}) + endif() endif() add_python_extension(_curses_panel REQUIRES ${curses_common_REQUIRES} PANEL_LIBRARIES "HAVE_PANEL_H OR HAVE_NCURSES_PANEL_H"