From: Eric Haszlakiewicz Date: Sun, 10 May 2020 03:48:45 +0000 (+0000) Subject: Issue #598: avoid building static libraries twice. X-Git-Tag: json-c-0.15-20200726~56 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4f43a077a497f94214645ce9763247ec085e2094;p=thirdparty%2Fjson-c.git Issue #598: avoid building static libraries twice. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 5becd748..b5dfc325 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -402,7 +402,7 @@ target_include_directories(${PROJECT_NAME} ) # Allow to build static and shared libraries at the same time -if (BUILD_STATIC_LIBS) +if (BUILD_STATIC_LIBS AND BUILD_SHARED_LIBS) set(STATIC_LIB ${PROJECT_NAME}-static) add_library(${STATIC_LIB} STATIC ${JSON_C_SOURCES}