$OpenBSD: patch-CMakeLists_txt,v 1.2 2015/06/12 09:50:42 dcoppa Exp $
--- CMakeLists.txt.orig	Tue Apr  7 12:01:12 2015
+++ CMakeLists.txt	Fri Jun 12 11:32:59 2015
@@ -57,18 +57,13 @@ elseif("${SSL}" STREQUAL "gnutls")
   endif(NETTLE_FOUND)
 endif("${SSL}" STREQUAL "openssl")
 
-check_library_exists(rt clock_gettime "time.h" HAVE_CLOCK_GETTIME_RT)
+check_function_exists(clock_gettime HAVE_CLOCK_GETTIME)
 
-if(NOT HAVE_CLOCK_GETTIME_RT)
-  check_function_exists(clock_gettime HAVE_CLOCK_GETTIME)
-  if(NOT HAVE_CLOCK_GETTIME)
-    check_library_exists(c clock_get_time "mach/time.h" HAVE_CLOCK_GET_TIME)
-    if(NOT HAVE_CLOCK_GET_TIME)
-      message(FATAL_ERROR "Didn't find clock_gettime() or clock_get_time()!")
-    endif()
+if(NOT HAVE_CLOCK_GETTIME)
+  check_library_exists(c clock_get_time "mach/time.h" HAVE_CLOCK_GET_TIME)
+  if(NOT HAVE_CLOCK_GET_TIME)
+    message(FATAL_ERROR "Didn't find clock_gettime() or clock_get_time()!")
   endif()
-else()
-  set(LIBRT rt)
 endif()
 
 if(USE_SHAREDMEMORY_API)
@@ -90,16 +85,15 @@ add_subdirectory(src)
 configure_file(src/config.h.in ${CMAKE_SOURCE_DIR}/src/config.h)
 
 include_directories(${LIBCONFIG_INCLUDE_DIR} ${PROTOBUFC_INCLUDE_DIR} ${SSLIMP_INCLUDE_DIR})
-link_directories(${LIBCONFIG_LIB_DIR} ${PROTOBUFC_LIB_DIR} ${SSLIMP_LIB_DIR})
 
 add_executable(${PROJECT_NAME} ${SOURCE})
-install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION "bin")
+install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION "sbin")
 
 find_path(OLD_CONFIG_FILE NAMES "umurmur.conf" PATHS ${CMAKE_INSTALL_PREFIX} PATH_SUFFIXES "etc")
 if(NOT OLD_CONFIG_FILE)
-  install(FILES "umurmur.conf.example" DESTINATION "etc" RENAME "umurmur.conf")
+  install(FILES "umurmur.conf.example" DESTINATION "share/examples/umurmur" RENAME "umurmur.conf")
 endif(NOT OLD_CONFIG_FILE)
 
 add_definitions(${SSLIMP_CFLAGS})
 
-target_link_libraries(${PROJECT_NAME} ${LIBCONFIG_LIBRARIES} ${PROTOBUFC_LIBRARIES} ${SSLIMP_LIBRARIES} ${LIBRT} ${CRYPTO_LIBRARIES})
+target_link_libraries(${PROJECT_NAME} ${LIBCONFIG_LIBRARIES} ${PROTOBUFC_LIBRARIES} ${SSLIMP_LIBRARIES} ${CRYPTO_LIBRARIES})
