trixirt commited on
Commit
1cf1553
·
unverified ·
1 Parent(s): 1a32e6f

cmake : make libwhisper.so position independent (#1792)

Browse files

This is similar to how libllama.so is built.

Signed-off-by: Tom Rix <[email protected]>

Files changed (1) hide show
  1. 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
  )