ReGameDLL_CS/dep/cppunitlite/build.gradle

63 lines
1.2 KiB
Groovy
Raw Normal View History

2015-06-30 12:46:07 +03:00
import org.doomedsociety.gradlecpp.cfg.ToolchainConfigUtils
import org.doomedsociety.gradlecpp.msvc.MsvcToolchainConfig
import org.doomedsociety.gradlecpp.toolchain.icc.Icc
import org.doomedsociety.gradlecpp.toolchain.icc.IccCompilerPlugin
2018-10-05 10:31:40 +03:00
import org.doomedsociety.gradlecpp.gcc.GccToolchainConfig
2015-06-30 12:46:07 +03:00
import org.gradle.nativeplatform.NativeBinarySpec
import org.gradle.nativeplatform.NativeLibrarySpec
apply plugin: 'cpp'
apply plugin: IccCompilerPlugin
2018-10-05 10:31:40 +03:00
apply plugin: GccCompilerPlugin
2015-06-30 12:46:07 +03:00
void setupToolchain(NativeBinarySpec b) {
def cfg = rootProject.createToolchainConfig(b)
2015-06-30 12:46:07 +03:00
ToolchainConfigUtils.apply(project, cfg, b)
2015-06-30 12:46:07 +03:00
}
model {
buildTypes {
debug
release
}
platforms {
x86 {
architecture "x86"
}
}
toolChains {
2018-10-05 10:31:40 +03:00
visualCpp(VisualCpp)
if (project.hasProperty("useGcc")) {
gcc(Gcc)
} else {
icc(Icc)
}
}
components {
2015-06-30 12:46:07 +03:00
cppunitlite(NativeLibrarySpec) {
targetPlatform 'x86'
2015-06-30 12:46:07 +03:00
sources {
cppul_main(CppSourceSet) {
source {
srcDir "src"
include "**/*.cpp"
}
2015-06-30 12:46:07 +03:00
exportedHeaders {
srcDir "include"
}
2015-06-30 12:46:07 +03:00
}
}
binaries.all { NativeBinarySpec b ->
project.setupToolchain(b)
}
2015-06-30 12:46:07 +03:00
}
}
}