]> git.ipfire.org Git - thirdparty/json-c.git/commitdiff
Issue #598: avoid building static libraries twice.
authorEric Haszlakiewicz <erh+git@nimenees.com>
Sun, 10 May 2020 03:48:45 +0000 (03:48 +0000)
committerEric Haszlakiewicz <erh+git@nimenees.com>
Sun, 10 May 2020 03:48:45 +0000 (03:48 +0000)
CMakeLists.txt

index 5becd7482cc16ff5681382d599637a88affb04e4..b5dfc32554809c4760c1a3c5c001369f5db4c7f2 100644 (file)
@@ -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}