summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2016-03-13 01:44:00 +0100
committerSlávek Banko <slavek.banko@axis.cz>2016-03-13 01:44:00 +0100
commit87fbdb32edf76217c9376e58f6b4c86f7bdd19d8 (patch)
tree3587df27a773bd18db95257338333795fba327bd
parent0a23f8e5d58d8a19bd36e0576415a66af45fb96f (diff)
downloadk3b-87fbdb32.tar.gz
k3b-87fbdb32.zip
cmake: Fix detection of functions lrint and lrintf in libm
Set HAVE_LRINT and HAVE_LRINTF if functions not exists Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r--ConfigureChecks.cmake8
-rw-r--r--libk3b/plugin/CMakeLists.txt2
2 files changed, 9 insertions, 1 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index 3f31313..3ffcde3 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -32,8 +32,16 @@ check_include_file ( "sys/statvfs.h" HAVE_SYS_STATVFS_H )
check_include_file ( "sys/vfs.h" HAVE_SYS_VFS_H )
check_include_file ( "byteswap.h" HAVE_BYTESWAP_H )
check_include_file ( "stdint.h" HAVE_STDINT_H )
+tde_save_and_set( CMAKE_REQUIRED_LIBRARIES "m" )
check_symbol_exists ( lrint "math.h" HAVE_LRINT )
check_symbol_exists ( lrintf "math.h" HAVE_LRINTF )
+tde_restore( CMAKE_REQUIRED_LIBRARIES )
+if( NOT HAVE_LRINT )
+ set( HAVE_LRINT 0 )
+endif( NOT HAVE_LRINT )
+if( NOT HAVE_LRINTF )
+ set( HAVE_LRINTF 0 )
+endif( NOT HAVE_LRINTF )
check_symbol_exists ( stat64 "sys/types.h;sys/stat.h;unistd.h" HAVE_STAT64 )
##### k3bsetup ##################################
diff --git a/libk3b/plugin/CMakeLists.txt b/libk3b/plugin/CMakeLists.txt
index 5c7e033..f4925ce 100644
--- a/libk3b/plugin/CMakeLists.txt
+++ b/libk3b/plugin/CMakeLists.txt
@@ -44,7 +44,7 @@ tde_moc( k3bplugin_SOURCES k3bprojectplugin.h )
tde_add_library( k3bplugin STATIC_PIC AUTOMOC
SOURCES ${k3bplugin_SOURCES}
- LINK ${LIBSAMPLERATE_LIBRARIES}
+ LINK m ${LIBSAMPLERATE_LIBRARIES}
)