Moved some linkerOpts from build.sh and build.gradle to .def,
where it does not involve any complex intelligence.
This commit is contained in:
committed by
alexander-gorshenev
parent
5effdcb1d2
commit
33993236de
@@ -9,6 +9,5 @@ konanInterop {
|
||||
konanArtifacts {
|
||||
Curl {
|
||||
useInterop 'libcurl'
|
||||
linkerOpts "-L/opt/local/lib -L/usr/lib/x86_64-linux-gnu -L/usr/local/opt/curl/lib -lcurl"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,6 @@ PATH=$DIR/../../dist/bin:$DIR/../../bin:$PATH
|
||||
|
||||
CFLAGS_macbook=-I/opt/local/include
|
||||
CFLAGS_linux="-I /usr/include -I /usr/include/x86_64-linux-gnu"
|
||||
LINKER_ARGS_macbook="-L/opt/local/lib -lcurl"
|
||||
LINKER_ARGS_linux="-L/usr/lib/x86_64-linux-gnu -lcurl"
|
||||
|
||||
if [ x$TARGET == x ]; then
|
||||
case "$OSTYPE" in
|
||||
@@ -18,8 +16,6 @@ fi
|
||||
|
||||
var=CFLAGS_${TARGET}
|
||||
CFLAGS=${!var}
|
||||
var=LINKER_ARGS_${TARGET}
|
||||
LINKER_ARGS=${!var}
|
||||
var=COMPILER_ARGS_${TARGET}
|
||||
COMPILER_ARGS=${!var} # add -opt for an optimized build.
|
||||
|
||||
@@ -29,7 +25,7 @@ mkdir -p $DIR/build/bin/
|
||||
cinterop -compilerOpts "$CFLAGS" -compilerOpts -I$DIR -compilerOpts -I/usr/include -def $DIR/src/main/c_interop/libcurl.def -target $TARGET \
|
||||
-o $DIR/build/c_interop/libcurl || exit 1
|
||||
|
||||
konanc -target $TARGET $DIR/src/main/kotlin -library $DIR/build/c_interop/libcurl -linkerOpts "$LINKER_ARGS" \
|
||||
konanc -target $TARGET $DIR/src/main/kotlin -library $DIR/build/c_interop/libcurl \
|
||||
-o $DIR/build/bin/Curl || exit 1
|
||||
|
||||
echo "Artifact path is $DIR/build/bin/Curl.kexe"
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
headers = curl/curl.h
|
||||
headerFilter = curl/*
|
||||
linkerOpts.osx = -L/opt/local/lib -L/usr/local/opt/curl/lib -lcurl
|
||||
linkerOpts.linux = -L/usr/lib/x86_64-linux-gnu -lcurl
|
||||
|
||||
Reference in New Issue
Block a user