aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-10-01 22:35:33 -0700
committerChris Robinson <[email protected]>2019-10-01 22:35:33 -0700
commit69eb685dbce703cd95343ebe323c3d29390e4938 (patch)
tree850c25ce685650f334f32a6d0dd74ae357c9754f /CMakeLists.txt
parentaccac7950ce8f49a9e9ccaa4be24e96347f4aca3 (diff)
Check for librt earlier
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