From 09c5ecd84fb754ac6ba1b661c6967f959a3100c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sven=20K=C3=B6hler?= Date: Wed, 3 Feb 2021 23:42:12 +0100 Subject: [PATCH] only append _static suffix for microsoft toolchains --- src/lib_json/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib_json/CMakeLists.txt b/src/lib_json/CMakeLists.txt index af26476..ae406c0 100644 --- a/src/lib_json/CMakeLists.txt +++ b/src/lib_json/CMakeLists.txt @@ -156,7 +156,11 @@ if(BUILD_STATIC_LIBS) # avoid name clashes on windows as the shared import lib is alse named jsoncpp.lib if(NOT DEFINED STATIC_SUFFIX AND BUILD_SHARED_LIBS) - set(STATIC_SUFFIX "_static") + if (MSVC) + set(STATIC_SUFFIX "_static") + else() + set(STATIC_SUFFIX "") + endif() endif() set_target_properties(${STATIC_LIB} PROPERTIES