Skip to content

Commit 68831e7

Browse files
committed
src_base: cmake: Link libm for the shared library
Otherwise it fails to link with errors like so: /usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/15/../../../../lib64/libxeveb.so: undefined reference to 'log2' /usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/15/../../../../lib64/libxeveb.so: undefined reference to 'pow'
1 parent e271c7a commit 68831e7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src_base/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ elseif( UNIX OR MINGW )
8989
endif()
9090
set_target_properties(${LIB_NAME_BASE}_dynamic PROPERTIES FOLDER lib
9191
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
92+
target_link_libraries(${LIB_NAME_BASE}_dynamic m)
9293
target_compile_definitions( ${LIB_NAME_BASE} PUBLIC ANY LINUX )
9394
target_link_libraries(${LIB_NAME_BASE} m)
9495
endif()

0 commit comments

Comments
 (0)