mirror of
https://github.com/rehlds/rehlds.git
synced 2025-01-01 09:35:37 +03:00
Remove leading lib prefix on all projects
This commit is contained in:
parent
d86c9ce39e
commit
3317627359
@ -1,11 +1,12 @@
|
|||||||
import org.doomedsociety.gradlecpp.cfg.ToolchainConfigUtils
|
import org.doomedsociety.gradlecpp.cfg.ToolchainConfigUtils
|
||||||
import org.doomedsociety.gradlecpp.msvc.MsvcToolchainConfig
|
import org.doomedsociety.gradlecpp.msvc.MsvcToolchainConfig
|
||||||
import org.doomedsociety.gradlecpp.gcc.GccToolchainConfig
|
|
||||||
import org.doomedsociety.gradlecpp.toolchain.icc.Icc
|
import org.doomedsociety.gradlecpp.toolchain.icc.Icc
|
||||||
import org.doomedsociety.gradlecpp.toolchain.icc.IccCompilerPlugin
|
import org.doomedsociety.gradlecpp.toolchain.icc.IccCompilerPlugin
|
||||||
|
import org.doomedsociety.gradlecpp.gcc.GccToolchainConfig
|
||||||
import org.doomedsociety.gradlecpp.GradleCppUtils
|
import org.doomedsociety.gradlecpp.GradleCppUtils
|
||||||
import org.gradle.nativeplatform.NativeExecutableSpec
|
import org.gradle.nativeplatform.NativeExecutableSpec
|
||||||
import org.gradle.nativeplatform.NativeExecutableBinarySpec
|
import org.gradle.nativeplatform.NativeExecutableBinarySpec
|
||||||
|
import org.gradle.nativeplatform.toolchain.VisualCpp
|
||||||
|
|
||||||
apply plugin: 'cpp'
|
apply plugin: 'cpp'
|
||||||
apply plugin: 'windows-resources'
|
apply plugin: 'windows-resources'
|
||||||
|
@ -3,6 +3,7 @@ import org.doomedsociety.gradlecpp.msvc.MsvcToolchainConfig
|
|||||||
import org.doomedsociety.gradlecpp.toolchain.icc.Icc
|
import org.doomedsociety.gradlecpp.toolchain.icc.Icc
|
||||||
import org.doomedsociety.gradlecpp.toolchain.icc.IccCompilerPlugin
|
import org.doomedsociety.gradlecpp.toolchain.icc.IccCompilerPlugin
|
||||||
import org.doomedsociety.gradlecpp.gcc.GccToolchainConfig
|
import org.doomedsociety.gradlecpp.gcc.GccToolchainConfig
|
||||||
|
import org.doomedsociety.gradlecpp.GradleCppUtils
|
||||||
import org.gradle.nativeplatform.NativeBinarySpec
|
import org.gradle.nativeplatform.NativeBinarySpec
|
||||||
import org.gradle.nativeplatform.NativeLibrarySpec
|
import org.gradle.nativeplatform.NativeLibrarySpec
|
||||||
import org.gradle.nativeplatform.toolchain.VisualCpp
|
import org.gradle.nativeplatform.toolchain.VisualCpp
|
||||||
@ -150,6 +151,19 @@ model {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
task buildFinalize << {
|
||||||
|
if (GradleCppUtils.windows) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
binaries.withType(SharedLibraryBinarySpec) {
|
||||||
|
def sharedBinary = it.getSharedLibraryFile();
|
||||||
|
if (sharedBinary.exists()) {
|
||||||
|
sharedBinary.renameTo(new File(sharedBinary.getParent() + "/" + sharedBinary.getName().replaceFirst("^lib", "")));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
task buildFixes {
|
task buildFixes {
|
||||||
dependsOn binaries.withType(SharedLibraryBinarySpec).matching { SharedLibraryBinarySpec blib ->
|
dependsOn binaries.withType(SharedLibraryBinarySpec).matching { SharedLibraryBinarySpec blib ->
|
||||||
blib.buildable && blib.buildType.name == 'release'
|
blib.buildable && blib.buildType.name == 'release'
|
||||||
@ -162,6 +176,10 @@ task buildRelease {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
build.finalizedBy(buildFinalize);
|
||||||
|
buildFixes.finalizedBy(buildFinalize);
|
||||||
|
buildRelease.finalizedBy(buildFinalize);
|
||||||
|
|
||||||
// prevent static lib building
|
// prevent static lib building
|
||||||
binaries.withType(StaticLibraryBinarySpec) { binary ->
|
binaries.withType(StaticLibraryBinarySpec) { binary ->
|
||||||
buildable = false
|
buildable = false
|
||||||
|
@ -3,6 +3,7 @@ import org.doomedsociety.gradlecpp.msvc.MsvcToolchainConfig
|
|||||||
import org.doomedsociety.gradlecpp.toolchain.icc.Icc
|
import org.doomedsociety.gradlecpp.toolchain.icc.Icc
|
||||||
import org.doomedsociety.gradlecpp.toolchain.icc.IccCompilerPlugin
|
import org.doomedsociety.gradlecpp.toolchain.icc.IccCompilerPlugin
|
||||||
import org.doomedsociety.gradlecpp.gcc.GccToolchainConfig
|
import org.doomedsociety.gradlecpp.gcc.GccToolchainConfig
|
||||||
|
import org.doomedsociety.gradlecpp.GradleCppUtils
|
||||||
import org.gradle.nativeplatform.NativeBinarySpec
|
import org.gradle.nativeplatform.NativeBinarySpec
|
||||||
import org.gradle.nativeplatform.NativeLibrarySpec
|
import org.gradle.nativeplatform.NativeLibrarySpec
|
||||||
import org.gradle.nativeplatform.toolchain.VisualCpp
|
import org.gradle.nativeplatform.toolchain.VisualCpp
|
||||||
@ -135,6 +136,19 @@ model {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
task buildFinalize << {
|
||||||
|
if (GradleCppUtils.windows) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
binaries.withType(SharedLibraryBinarySpec) {
|
||||||
|
def sharedBinary = it.getSharedLibraryFile();
|
||||||
|
if (sharedBinary.exists()) {
|
||||||
|
sharedBinary.renameTo(new File(sharedBinary.getParent() + "/" + sharedBinary.getName().replaceFirst("^lib", "")));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
task buildFixes {
|
task buildFixes {
|
||||||
dependsOn binaries.withType(SharedLibraryBinarySpec).matching { SharedLibraryBinarySpec blib ->
|
dependsOn binaries.withType(SharedLibraryBinarySpec).matching { SharedLibraryBinarySpec blib ->
|
||||||
blib.buildable && blib.buildType.name == 'release'
|
blib.buildable && blib.buildType.name == 'release'
|
||||||
@ -147,6 +161,10 @@ task buildRelease {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
build.finalizedBy(buildFinalize);
|
||||||
|
buildFixes.finalizedBy(buildFinalize);
|
||||||
|
buildRelease.finalizedBy(buildFinalize);
|
||||||
|
|
||||||
// prevent static lib building
|
// prevent static lib building
|
||||||
binaries.withType(StaticLibraryBinarySpec) { binary ->
|
binaries.withType(StaticLibraryBinarySpec) { binary ->
|
||||||
buildable = false
|
buildable = false
|
||||||
|
@ -3,6 +3,7 @@ import org.doomedsociety.gradlecpp.msvc.MsvcToolchainConfig
|
|||||||
import org.doomedsociety.gradlecpp.toolchain.icc.Icc
|
import org.doomedsociety.gradlecpp.toolchain.icc.Icc
|
||||||
import org.doomedsociety.gradlecpp.toolchain.icc.IccCompilerPlugin
|
import org.doomedsociety.gradlecpp.toolchain.icc.IccCompilerPlugin
|
||||||
import org.doomedsociety.gradlecpp.gcc.GccToolchainConfig
|
import org.doomedsociety.gradlecpp.gcc.GccToolchainConfig
|
||||||
|
import org.doomedsociety.gradlecpp.GradleCppUtils
|
||||||
import org.gradle.nativeplatform.NativeBinarySpec
|
import org.gradle.nativeplatform.NativeBinarySpec
|
||||||
import org.gradle.nativeplatform.NativeLibrarySpec
|
import org.gradle.nativeplatform.NativeLibrarySpec
|
||||||
import org.gradle.nativeplatform.toolchain.VisualCpp
|
import org.gradle.nativeplatform.toolchain.VisualCpp
|
||||||
@ -135,6 +136,19 @@ model {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
task buildFinalize << {
|
||||||
|
if (GradleCppUtils.windows) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
binaries.withType(SharedLibraryBinarySpec) {
|
||||||
|
def sharedBinary = it.getSharedLibraryFile();
|
||||||
|
if (sharedBinary.exists()) {
|
||||||
|
sharedBinary.renameTo(new File(sharedBinary.getParent() + "/" + sharedBinary.getName().replaceFirst("^lib", "")));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
task buildFixes {
|
task buildFixes {
|
||||||
dependsOn binaries.withType(SharedLibraryBinarySpec).matching { SharedLibraryBinarySpec blib ->
|
dependsOn binaries.withType(SharedLibraryBinarySpec).matching { SharedLibraryBinarySpec blib ->
|
||||||
blib.buildable && blib.buildType.name == 'release'
|
blib.buildable && blib.buildType.name == 'release'
|
||||||
@ -147,6 +161,10 @@ task buildRelease {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
build.finalizedBy(buildFinalize);
|
||||||
|
buildFixes.finalizedBy(buildFinalize);
|
||||||
|
buildRelease.finalizedBy(buildFinalize);
|
||||||
|
|
||||||
// prevent static lib building
|
// prevent static lib building
|
||||||
binaries.withType(StaticLibraryBinarySpec) { binary ->
|
binaries.withType(StaticLibraryBinarySpec) { binary ->
|
||||||
buildable = false
|
buildable = false
|
||||||
|
@ -3,6 +3,7 @@ import org.doomedsociety.gradlecpp.msvc.MsvcToolchainConfig
|
|||||||
import org.doomedsociety.gradlecpp.toolchain.icc.Icc
|
import org.doomedsociety.gradlecpp.toolchain.icc.Icc
|
||||||
import org.doomedsociety.gradlecpp.toolchain.icc.IccCompilerPlugin
|
import org.doomedsociety.gradlecpp.toolchain.icc.IccCompilerPlugin
|
||||||
import org.doomedsociety.gradlecpp.gcc.GccToolchainConfig
|
import org.doomedsociety.gradlecpp.gcc.GccToolchainConfig
|
||||||
|
import org.doomedsociety.gradlecpp.GradleCppUtils
|
||||||
import org.gradle.nativeplatform.NativeBinarySpec
|
import org.gradle.nativeplatform.NativeBinarySpec
|
||||||
import org.gradle.nativeplatform.NativeLibrarySpec
|
import org.gradle.nativeplatform.NativeLibrarySpec
|
||||||
import org.gradle.nativeplatform.toolchain.VisualCpp
|
import org.gradle.nativeplatform.toolchain.VisualCpp
|
||||||
@ -161,6 +162,19 @@ model {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
task buildFinalize << {
|
||||||
|
if (GradleCppUtils.windows) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
binaries.withType(SharedLibraryBinarySpec) {
|
||||||
|
def sharedBinary = it.getSharedLibraryFile();
|
||||||
|
if (sharedBinary.exists()) {
|
||||||
|
sharedBinary.renameTo(new File(sharedBinary.getParent() + "/" + sharedBinary.getName().replaceFirst("^lib", "")));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
task buildFixes {
|
task buildFixes {
|
||||||
dependsOn binaries.withType(SharedLibraryBinarySpec).matching { SharedLibraryBinarySpec blib ->
|
dependsOn binaries.withType(SharedLibraryBinarySpec).matching { SharedLibraryBinarySpec blib ->
|
||||||
blib.buildable && blib.buildType.name == 'release'
|
blib.buildable && blib.buildType.name == 'release'
|
||||||
@ -173,6 +187,10 @@ task buildRelease {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
build.finalizedBy(buildFinalize);
|
||||||
|
buildFixes.finalizedBy(buildFinalize);
|
||||||
|
buildRelease.finalizedBy(buildFinalize);
|
||||||
|
|
||||||
// prevent static lib building
|
// prevent static lib building
|
||||||
binaries.withType(StaticLibraryBinarySpec) { binary ->
|
binaries.withType(StaticLibraryBinarySpec) { binary ->
|
||||||
buildable = false
|
buildable = false
|
||||||
|
@ -355,6 +355,19 @@ model {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
task buildFinalize << {
|
||||||
|
if (GradleCppUtils.windows) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
binaries.withType(SharedLibraryBinarySpec) {
|
||||||
|
def sharedBinary = it.getSharedLibraryFile();
|
||||||
|
if (sharedBinary.exists()) {
|
||||||
|
sharedBinary.renameTo(new File(sharedBinary.getParent() + "/" + sharedBinary.getName().replaceFirst("^lib", "")));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
task buildRelease {
|
task buildRelease {
|
||||||
dependsOn binaries.withType(SharedLibraryBinarySpec).matching { SharedLibraryBinarySpec blib ->
|
dependsOn binaries.withType(SharedLibraryBinarySpec).matching { SharedLibraryBinarySpec blib ->
|
||||||
blib.buildable && blib.buildType.name == 'release' && !blib.name.contains('Rehlds_hooker_engine')
|
blib.buildable && blib.buildType.name == 'release' && !blib.name.contains('Rehlds_hooker_engine')
|
||||||
@ -373,6 +386,10 @@ task buildEngine {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
buildFixes.finalizedBy(buildFinalize);
|
||||||
|
buildEngine.finalizedBy(buildFinalize);
|
||||||
|
buildRelease.finalizedBy(buildFinalize);
|
||||||
|
|
||||||
gradle.taskGraph.whenReady { graph ->
|
gradle.taskGraph.whenReady { graph ->
|
||||||
if (!graph.hasTask(buildFixes) && !graph.hasTask(buildEngine)) {
|
if (!graph.hasTask(buildFixes) && !graph.hasTask(buildEngine)) {
|
||||||
return;
|
return;
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
import org.doomedsociety.gradlecpp.cfg.ToolchainConfigUtils
|
import org.doomedsociety.gradlecpp.cfg.ToolchainConfigUtils
|
||||||
import org.doomedsociety.gradlecpp.msvc.MsvcToolchainConfig
|
import org.doomedsociety.gradlecpp.msvc.MsvcToolchainConfig
|
||||||
import org.doomedsociety.gradlecpp.gcc.GccToolchainConfig
|
|
||||||
import org.doomedsociety.gradlecpp.toolchain.icc.Icc
|
import org.doomedsociety.gradlecpp.toolchain.icc.Icc
|
||||||
import org.doomedsociety.gradlecpp.toolchain.icc.IccCompilerPlugin
|
import org.doomedsociety.gradlecpp.toolchain.icc.IccCompilerPlugin
|
||||||
|
import org.doomedsociety.gradlecpp.gcc.GccToolchainConfig
|
||||||
import org.doomedsociety.gradlecpp.GradleCppUtils
|
import org.doomedsociety.gradlecpp.GradleCppUtils
|
||||||
import org.gradle.nativeplatform.NativeExecutableSpec
|
import org.gradle.nativeplatform.NativeExecutableSpec
|
||||||
import org.gradle.nativeplatform.NativeExecutableBinarySpec
|
import org.gradle.nativeplatform.NativeExecutableBinarySpec
|
||||||
|
import org.gradle.nativeplatform.toolchain.VisualCpp
|
||||||
|
|
||||||
apply plugin: 'cpp'
|
apply plugin: 'cpp'
|
||||||
apply plugin: 'windows-resources'
|
apply plugin: 'windows-resources'
|
||||||
|
Loading…
Reference in New Issue
Block a user