Skip to content

Commit b6eef1c

Browse files
devnexenest31
authored andcommittedJul 3, 2016
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
1 parent 80cebdc commit b6eef1c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎src/CMakeLists.txt

+5-1
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,10 @@ else()
336336
if(APPLE)
337337
set(PLATFORM_LIBS "-framework CoreFoundation" ${PLATFORM_LIBS})
338338
else()
339-
set(PLATFORM_LIBS -lrt ${PLATFORM_LIBS})
339+
check_library_exists(rt clock_gettime "" HAVE_LIBRT)
340+
if (HAVE_LIBRT)
341+
set(PLATFORM_LIBS -lrt ${PLATFORM_LIBS})
342+
endif(HAVE_LIBRT)
340343
endif(APPLE)
341344

342345
# This way Xxf86vm is found on OpenBSD too
@@ -555,6 +558,7 @@ include_directories(
555558
${LUA_INCLUDE_DIR}
556559
${GMP_INCLUDE_DIR}
557560
${JSON_INCLUDE_DIR}
561+
${X11_INCLUDE_DIR}
558562
${PROJECT_SOURCE_DIR}/script
559563
)
560564

0 commit comments

Comments
 (0)
Please sign in to comment.