summaryrefslogtreecommitdiffstats
path: root/cmake/checks.cmake
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-08-02 04:17:57 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-08-02 06:08:18 +0200
commit96a291d11f884b18356ba8ef4b12b82d658d8d04 (patch)
tree8ad328375c4b1754e69cd38ee4e2e13d60c28525 /cmake/checks.cmake
parente63fe3b8d058bed15d65728f8e9a7e4093040028 (diff)
downloadfastd-96a291d11f884b18356ba8ef4b12b82d658d8d04.tar
fastd-96a291d11f884b18356ba8ef4b12b82d658d8d04.zip
Add support for Mac OS X
Diffstat (limited to 'cmake/checks.cmake')
-rw-r--r--cmake/checks.cmake20
1 files changed, 11 insertions, 9 deletions
diff --git a/cmake/checks.cmake b/cmake/checks.cmake
index 62d10d0..64dae58 100644
--- a/cmake/checks.cmake
+++ b/cmake/checks.cmake
@@ -38,18 +38,20 @@ int main() {
check_prototype_definition("get_current_dir_name" "char *get_current_dir_name(void)" "NULL" "unistd.h" HAVE_GET_CURRENT_DIR_NAME)
-set(RT_LIBRARY "")
-check_symbol_exists("clock_gettime" "time.h" HAVE_CLOCK_GETTIME)
+if(NOT DARWIN)
+ set(RT_LIBRARY "")
+ check_symbol_exists("clock_gettime" "time.h" HAVE_CLOCK_GETTIME)
-if(NOT HAVE_CLOCK_GETTIME)
- set(RT_LIBRARY "rt")
- list(APPEND CMAKE_REQUIRED_LIBRARIES "rt")
+ if(NOT HAVE_CLOCK_GETTIME)
+ set(RT_LIBRARY "rt")
+ list(APPEND CMAKE_REQUIRED_LIBRARIES "rt")
- check_symbol_exists("clock_gettime" "time.h" HAVE_CLOCK_GETTIME_RT)
- if(NOT HAVE_CLOCK_GETTIME_RT)
+ check_symbol_exists("clock_gettime" "time.h" HAVE_CLOCK_GETTIME_RT)
+ if(NOT HAVE_CLOCK_GETTIME_RT)
message(FATAL_ERROR "clock_gettime() not found")
- endif(NOT HAVE_CLOCK_GETTIME_RT)
-endif(NOT HAVE_CLOCK_GETTIME)
+ endif(NOT HAVE_CLOCK_GETTIME_RT)
+ endif(NOT HAVE_CLOCK_GETTIME)
+endif(NOT DARWIN)
set(CMAKE_EXTRA_INCLUDE_FILES "netinet/if_ether.h")