diff options
Diffstat (limited to 'src/Conf.cpp')
-rw-r--r-- | src/Conf.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/Conf.cpp b/src/Conf.cpp index 3b0e246..1697d9f 100644 --- a/src/Conf.cpp +++ b/src/Conf.cpp @@ -864,6 +864,32 @@ namespace sibs if(platforms.empty()) throw ParserException("Missing required config package.platforms. If the package supports all platforms, add:\nplatforms = [\"any\"]\nto project.conf under [package]"); + + if(useCmake) + { + switch(getPackageType()) + { + case PackageType::EXECUTABLE: + { + if(!getCmakeDir().empty()) + throw ParserException("Missing required config cmake.dir"); + break; + } + case PackageType::STATIC: + { + if(!getCmakeDirStatic().empty()) + throw ParserException("Missing required config cmake.static"); + break; + } + case PackageType::DYNAMIC: + case PackageType::LIBRARY: + { + if(!getCmakeDirDynamic().empty()) + throw ParserException("Missing required config cmake.dynamic"); + break; + } + } + } } void SibsConfig::validatePackageName() const |