aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Carlier <devnexen@gmail.com>2016-06-19 08:48:12 +0100
committerest31 <MTest31@outlook.com>2016-07-03 13:01:49 +0200
commitb6eef1c0c2e76e56f148bf296a42fb3a4bae4a55 (patch)
tree19cb4403b796ce27566d1f03a7df3c6997f8931e
parent80cebdc23c29ed778958ba3a35662cbc5f5e2f09 (diff)
downloadminetest-b6eef1c0c2e76e56f148bf296a42fb3a4bae4a55.tar.gz
minetest-b6eef1c0c2e76e56f148bf296a42fb3a4bae4a55.tar.bz2
minetest-b6eef1c0c2e76e56f148bf296a42fb3a4bae4a55.zip
openbsd's port fix for non Linux systems w/o libRT
X11 headers are not always in expected locations, add them to include list. Modifications by est31: indentation fixes, commit message improved
-rw-r--r--src/CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index f02812415..bffc1f7eb 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -336,7 +336,10 @@ else()
if(APPLE)
set(PLATFORM_LIBS "-framework CoreFoundation" ${PLATFORM_LIBS})
else()
- set(PLATFORM_LIBS -lrt ${PLATFORM_LIBS})
+ check_library_exists(rt clock_gettime "" HAVE_LIBRT)
+ if (HAVE_LIBRT)
+ set(PLATFORM_LIBS -lrt ${PLATFORM_LIBS})
+ endif(HAVE_LIBRT)
endif(APPLE)
# This way Xxf86vm is found on OpenBSD too
@@ -555,6 +558,7 @@ include_directories(
${LUA_INCLUDE_DIR}
${GMP_INCLUDE_DIR}
${JSON_INCLUDE_DIR}
+ ${X11_INCLUDE_DIR}
${PROJECT_SOURCE_DIR}/script
)