aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-11-04 08:54:33 +0100
committerdec05eba <dec05eba@protonmail.com>2020-07-06 07:39:33 +0200
commit6a2694048dc462449c2e07b53d610ffbface2254 (patch)
tree21db5219b4266e8605e0d7b184aac11cb77da2b5
parent9f9507d75ccdff561a390c441d45c000382c42fc (diff)
Only include static/dynamic lib when building cmake project
-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());