Skip to content

Commit 2eb254c

Browse files
committed
packaging: build dhtnet as a shared library
You need to use cmake -DBUILD_SHARED_LIBS=On Change-Id: Iea5bdc1e66c4308590890901cf2a3ab06ec33d53
1 parent cfe512b commit 2eb254c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

dependencies/build.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ def build_and_install_opendht():
6868
"-DCMAKE_INSTALL_PREFIX=" + install_dir,
6969
"-DCMAKE_PREFIX_PATH=" + install_dir, # For finding restinio
7070
"-DCMAKE_BUILD_TYPE=Release",
71+
"-DCMAKE_POSITION_INDEPENDENT_CODE=ON",
7172
"-DBUILD_SHARED_LIBS=OFF",
7273
"-DBUILD_TESTING=OFF",
7374
"-DOPENDHT_PYTHON=OFF",
@@ -110,7 +111,8 @@ def build_and_install_pjproject():
110111
"--disable-openh264",
111112
"--disable-resample",
112113
"--disable-libwebrtc",
113-
f"--with-gnutls={install_dir}"
114+
f"--with-gnutls={install_dir}",
115+
'CFLAGS=-fPIC',
114116
]
115117
subprocess.run(configure_command, cwd=pjproject_dir, check=True)
116118
subprocess.run(["make"], cwd=pjproject_dir, check=True)
@@ -130,6 +132,7 @@ def build_and_install_msgpack():
130132
"cmake", "..",
131133
"-DCMAKE_INSTALL_PREFIX=" + install_dir,
132134
"-DCMAKE_BUILD_TYPE=Release",
135+
"-DCMAKE_POSITION_INDEPENDENT_CODE=ON",
133136
"-DMSGPACK_CXX17=ON",
134137
"-DMSGPACK_USE_BOOST=OFF",
135138
"-DMSGPACK_BUILD_EXAMPLES=OFF",

0 commit comments

Comments
 (0)