aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt16
1 files changed, 8 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9bf09a3f..5180504f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -390,6 +390,14 @@ IF(HAVE_LIBM)
SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} m)
ENDIF()
+# Some systems need to link with -lrt for clock_gettime as used by the common
+# eaxmple functions.
+SET(RT_LIB )
+CHECK_LIBRARY_EXISTS(rt clock_gettime "" HAVE_LIBRT)
+IF(HAVE_LIBRT)
+ SET(RT_LIB rt)
+ENDIF()
+
# Check for the dlopen API (for dynamicly loading backend libs)
IF(ALSOFT_DLOPEN)
CHECK_INCLUDE_FILE(dlfcn.h HAVE_DLFCN_H)
@@ -1423,14 +1431,6 @@ IF(ALSOFT_UTILS)
ENDIF()
-# Some systems need to link with -lrt for clock_gettime as used by the common
-# eaxmple functions.
-SET(RT_LIB )
-CHECK_LIBRARY_EXISTS(rt clock_gettime "" HAVE_LIBRT)
-IF(HAVE_LIBRT)
- SET(RT_LIB rt)
-ENDIF()
-
# Add a static library with common functions used by multiple example targets
ADD_LIBRARY(ex-common STATIC EXCLUDE_FROM_ALL
examples/common/alhelpers.c