Florian Levis
12/25/2023, 6:18 PMval q8 by compilations.creating {
cinterops {
val libMagickNative by creating {
compilerOpts += "-DMAGICKCORE_HDRI_ENABLE=0"
// compilerOpts += "-DMAGICKCORE_QUANTUM_DEPTH=8"
// compilerOpts += "-DMAGICKCORE_CHANNEL_MASK_DEPTH=64"
compilerOpts += "-I${localInclude.absolutePath}"
compilerOpts += "-I${localInclude.absolutePath}/ImageMagick-7"
}
}
}
val q16 by compilations.creating {
cinterops {
val libMagickNative by creating {
compilerOpts += "-DMAGICKCORE_HDRI_ENABLE=0"
// compilerOpts += "-DMAGICKCORE_QUANTUM_DEPTH=8"
// compilerOpts += "-DMAGICKCORE_CHANNEL_MASK_DEPTH=64"
compilerOpts += "-I${localInclude.absolutePath}"
compilerOpts += "-I${localInclude.absolutePath}/ImageMagick-7"
}
}
}
val q16hdri by compilations.creating {
cinterops {
val libMagickNative by creating {
compilerOpts += "-DMAGICKCORE_HDRI_ENABLE=1"
// compilerOpts += "-DMAGICKCORE_QUANTUM_DEPTH=8"
// compilerOpts += "-DMAGICKCORE_CHANNEL_MASK_DEPTH=64"
compilerOpts += "-I${localInclude.absolutePath}"
compilerOpts += "-I${localInclude.absolutePath}/ImageMagick-7"
}
}
}
q8.associateWith(compilations.getByName("main"))
q16.associateWith(compilations.getByName("main"))
q16hdri.associateWith(compilations.getByName("main"))
But, problems :
• the .klib is not generated anymore
• and I didn't find the way to configure the binaries in the same way (because I need to configure to linkerOpts
to link the binary against the correct .dll version)
I'm... lost ; it's a bit too low level for me.
• Should I use the "multi gradle modules" approach instead? (I've read this somewhere, but I can't find the link at this moment)
• Should I wait Kotlin 2.x ?
• Should I wait a mature version of #amper?
Thanks for reading me.
Regards.