Mercurial > minori
diff dep/animia/CMakeLists.txt @ 212:6b08fbd7f206
chore: merge branches
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Sun, 07 Jan 2024 09:54:50 -0500 |
parents | 71832ffe425a |
children | 8a482049b968 |
line wrap: on
line diff
--- a/dep/animia/CMakeLists.txt Sun Jan 07 09:54:17 2024 -0500 +++ b/dep/animia/CMakeLists.txt Sun Jan 07 09:54:50 2024 -0500 @@ -72,17 +72,19 @@ list(APPEND DEFINES LIBUTIL) list(APPEND SRC_FILES src/fd/libutil.cc) endif() # LIBUTIL_GOOD - elseif(LIBKVM_LIBRARY) # BSD libkvm + elseif(LIBKVM_LIBRARY) # OpenBSD kvm + list(APPEND LIBRARIES ${LIBKVM_LIBRARY}) + list(APPEND DEFINES LIBKVM) + list(APPEND SRC_FILES src/fd/kvm.cc) + get_filename_component(LIBKVM_DIR ${LIBKVM_LIBRARY} DIRECTORY) include(CheckLibraryExists) - check_library_exists(kvm kvm_getprocs ${LIBKVM_DIR} LIBKVM_GOOD) + check_library_exists(kvm kvm_getfiles ${LIBKVM_DIR} LIBKVM_HAS_GETFILES) - if(LIBKVM_GOOD) - list(APPEND LIBRARIES ${LIBKVM_LIBRARY}) - list(APPEND DEFINES LIBKVM) - list(APPEND SRC_FILES src/fd/libkvm.cc) - endif() # LIBUTIL_GOOD + if(LIBKVM_HAS_GETFILES) + list(APPEND DEFINES HAVE_KVM_GETFILES) + endif() # LIBKVM_HAS_GETFILES endif() # LINUX # X11 @@ -108,8 +110,8 @@ pkg_check_modules(X11 x11) if(X11_FOUND) # Check for XRes the hard way - find_path(X11_XRes_HEADER "extensions/XRes.h" PATHS ${X11_INCLUDE_DIRS}) - find_library(X11_XRes_LIB XRes ${X11_LIBRARY_DIRS}) + find_path(X11_XRes_HEADER "X11/extensions/XRes.h" PATHS ${X11_INCLUDE_DIRS}) + find_library(X11_XRes_LIB XRes PATHS ${X11_LIBRARY_DIRS}) if(X11_XRes_HEADER AND X11_XRes_LIB) # TODO: We should REALLY check for XResQueryClientIds here... @@ -150,5 +152,5 @@ ) target_compile_definitions(animia PRIVATE ${DEFINES}) -target_include_directories(animia PRIVATE include PUBLIC ${INCLUDE_DIRS}) +target_include_directories(animia PUBLIC include PRIVATE ${INCLUDE_DIRS}) target_link_libraries(animia PUBLIC ${LIBRARIES})