are there any variables that I can use within a .D...
# kotlin-native
k
are there any variables that I can use within a .DEF file?
for instance to get the source root/project path
i have relative paths in my def file and that breaks when I try to include it as a subproject
d
I have had this issue too.
I ended up specifying the path in gradle instead.
o
yes, it is intended usage - .def contains whatever is stable between users, and gradle is used for dynamic computations
k
i finally figured out how to use the gradle variation. it's very finicky and there's no guidance that showed the working variation in my case.
i haven't yet figured out how to make the gradle variation work for the subproject context
d
Calculate the path using the project directory.
k
that doesn't work
trying another approach
wow, even
linkerOpts "-F${gradle.conferenceDialer_frameworkDir}"
, setting the path explicitly in settings.gradle does not work in the subproject context
it works fine building the project proper
ld: framework not found libPhoneNumber_iOS
oh man... so my assumption about the error was incorrect. the real root cause was that the parent project needed it's own linker path to link the cinterop framework dependency from the child project
n
Are there any plans for the def file format to accept relative paths?
d
It does accept relative paths.
You just can't explicitly specify what it is relative to.
k
I find it's cleaner to keep all paths in the build.gradle. makes the def file more portable.
Finally figured out how to do that :P
n
Is there a Kotlin Native example on how to dynamically manage compiler and linker paths with C lib dependencies?