Mercurial > minori
comparison dep/animia/CMakeLists.txt @ 169:e44b7c428d7c
dep/animia: add libkvm method (UNTESTED)
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Sun, 19 Nov 2023 17:30:38 -0500 |
parents | 54c5d80a737e |
children | c413e475f496 8f6f8dd2eb23 |
comparison
equal
deleted
inserted
replaced
168:79a2a24453fa | 169:e44b7c428d7c |
---|---|
52 src/fd/win32.cc | 52 src/fd/win32.cc |
53 src/win/win32.cc | 53 src/win/win32.cc |
54 src/util/win32.cc | 54 src/util/win32.cc |
55 ) | 55 ) |
56 else() # NOT WIN32 AND NOT APPLE | 56 else() # NOT WIN32 AND NOT APPLE |
57 find_library(LIBUTIL_LIBRARY util) | |
58 find_library(LIBKVM_LIBRARY kvm) | |
59 | |
57 if(LINUX) | 60 if(LINUX) |
58 list(APPEND DEFINES LINUX) | 61 list(APPEND DEFINES LINUX) |
59 list(APPEND SRC_FILES | 62 list(APPEND SRC_FILES |
60 src/fd/proc.cc | 63 src/fd/proc.cc |
61 ) | 64 ) |
62 endif() # LINUX | 65 elseif(LIBUTIL_LIBRARY) # FreeBSD's libutil |
63 | |
64 # FreeBSD | |
65 find_library(LIBUTIL_LIBRARY util) | |
66 if(LIBUTIL_LIBRARY) | |
67 get_filename_component(LIBUTIL_DIR ${LIBUTIL_LIBRARY} DIRECTORY) | 66 get_filename_component(LIBUTIL_DIR ${LIBUTIL_LIBRARY} DIRECTORY) |
68 | 67 |
69 include(CheckLibraryExists) | 68 include(CheckLibraryExists) |
70 check_library_exists(util kinfo_getfile ${LIBUTIL_DIR} LIBUTIL_GOOD) | 69 check_library_exists(util kinfo_getfile ${LIBUTIL_DIR} LIBUTIL_GOOD) |
71 | 70 |
72 if(LIBUTIL_GOOD) | 71 if(LIBUTIL_GOOD) |
73 list(APPEND LIBRARIES ${LIBUTIL_LIBRARY}) | 72 list(APPEND LIBRARIES ${LIBUTIL_LIBRARY}) |
74 list(APPEND DEFINES LIBUTIL) | 73 list(APPEND DEFINES LIBUTIL) |
75 list(APPEND SRC_FILES src/fd/libutil.cc) | 74 list(APPEND SRC_FILES src/fd/libutil.cc) |
76 endif() # LIBUTIL_GOOD | 75 endif() # LIBUTIL_GOOD |
77 endif() # LIBUTIL_LIBRARY | 76 elseif(LIBKVM_LIBRARY) # BSD libkvm |
77 get_filename_component(LIBKVM_DIR ${LIBKVM_LIBRARY} DIRECTORY) | |
78 | |
79 include(CheckLibraryExists) | |
80 check_library_exists(kvm kvm_getprocs ${LIBKVM_DIR} LIBKVM_GOOD) | |
81 | |
82 if(LIBKVM_GOOD) | |
83 list(APPEND LIBRARIES ${LIBKVM_LIBRARY}) | |
84 list(APPEND DEFINES LIBKVM) | |
85 list(APPEND SRC_FILES src/fd/libkvm.cc) | |
86 endif() # LIBUTIL_GOOD | |
87 endif() # LINUX | |
78 | 88 |
79 # X11 | 89 # X11 |
80 find_package(X11 COMPONENTS X11) | 90 find_package(X11 COMPONENTS X11) |
81 if(X11_FOUND) | 91 if(X11_FOUND) |
82 list(APPEND DEFINES X11) | 92 list(APPEND DEFINES X11) |