Skip to content

Commit 4087f63

Browse files
Conan-Kudodariusz-f
authored andcommitted
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/libxevdb.so: undefined reference to 'log2' /usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/15/../../../../lib64/libxevdb.so: undefined reference to 'pow'
1 parent d4331b7 commit 4087f63

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src_base/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ elseif( UNIX OR MINGW )
9292
endif()
9393
set_target_properties(${LIB_NAME_BASE}_dynamic PROPERTIES FOLDER lib
9494
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
95+
target_link_libraries(${LIB_NAME_BASE}_dynamic m)
9596
target_compile_definitions( ${LIB_NAME_BASE} PUBLIC ANY LINUX )
9697
target_link_libraries(${LIB_NAME_BASE} m)
9798
endif()

0 commit comments

Comments
 (0)