summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Haszlakiewicz <erh+git@nimenees.com>2020-05-10 03:48:45 +0000
committerEric Haszlakiewicz <erh+git@nimenees.com>2020-05-10 03:48:45 +0000
commit4f43a077a497f94214645ce9763247ec085e2094 (patch)
treed7b942610cca9522a5b9fc2e5bcef4b08371ce05
parent519dfe1591d85432986f9762d41d1a883198c157 (diff)
downloadjson-c-4f43a077a497f94214645ce9763247ec085e2094.tar.gz
Issue #598: avoid building static libraries twice.
-rw-r--r--CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5becd74..b5dfc32 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}