From 6a2694048dc462449c2e07b53d610ffbface2254 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 4 Nov 2018 08:54:33 +0100 Subject: Only include static/dynamic lib when building cmake project --- src/CmakeModule.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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()); -- cgit v1.2.3