Spaces:
Running
Running
trixirt
commited on
cmake : make libwhisper.so position independent (#1792)
Browse filesThis is similar to how libllama.so is built.
Signed-off-by: Tom Rix <[email protected]>
- CMakeLists.txt +1 -0
CMakeLists.txt
CHANGED
|
@@ -505,6 +505,7 @@ else()
|
|
| 505 |
endif()
|
| 506 |
|
| 507 |
if (BUILD_SHARED_LIBS)
|
|
|
|
| 508 |
target_link_libraries(${TARGET} PUBLIC
|
| 509 |
${CMAKE_DL_LIBS}
|
| 510 |
)
|
|
|
|
| 505 |
endif()
|
| 506 |
|
| 507 |
if (BUILD_SHARED_LIBS)
|
| 508 |
+
set_target_properties(${TARGET} PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
| 509 |
target_link_libraries(${TARGET} PUBLIC
|
| 510 |
${CMAKE_DL_LIBS}
|
| 511 |
)
|