aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/CmakeModule.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/CmakeModule.cpp b/src/CmakeModule.cpp
index ed04e26..bffd532 100644
--- a/src/CmakeModule.cpp
+++ b/src/CmakeModule.cpp
@@ -226,7 +226,8 @@ namespace sibs
walkDirFilesRecursive(buildPath.c_str(),
[&config, &parentProjStaticLinkerFlagCallbackFunc, &parentProjDynamicLinkerFlagCallbackFunc, dynamicLibExtension](tinydir_file *file)
{
- if(_tinydir_strcmp(file->extension, dynamicLibExtension) == 0 || _tinydir_strcmp(file->extension, CONFIG_STATIC_LIB_FILE_EXTENSION) == 0)
+ bool isStatic = config.getPackageType() == PackageType::STATIC;
+ if((!isStatic && _tinydir_strcmp(file->extension, dynamicLibExtension) == 0) || (isStatic && _tinydir_strcmp(file->extension, CONFIG_STATIC_LIB_FILE_EXTENSION) == 0))
{
string libFileUtf8 = toUtf8(file->path);
nprintf("Library generated by cmake: %s\n", libFileUtf8.c_str());