From 49b704f25eff79420a8d45870feaffbc5d300ff6 Mon Sep 17 00:00:00 2001 From: Gabriel Hege Date: Wed, 17 May 2023 12:22:15 +0200 Subject: [PATCH] fix static library build for MacOS (-DBUILD_SHARED_LIBS=0) --- src/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 02dcc2cc..9107626f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -125,7 +125,9 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") endif() target_link_libraries(graphite2 c) include(Graphite) - nolib_test(stdc++ $) + if (BUILD_SHARED_LIBS) + nolib_test(stdc++ $) + endif() set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "") CREATE_LIBTOOL_FILE(graphite2 "/lib${LIB_SUFFIX}") endif()