Mercurial > minori
comparison dep/animia/CMakeLists.txt @ 166:54c5d80a737e
dep/animia: add libutil method
I changed the "linux" method to be "proc", because it isn't exactly Linux specific
this commit also has some changes to the x11 stuff:
instead of enumerating over only top-level windows, we iterate over ALL of them
this is because many X11 apps actually use multiple windows
for some reason, I still can't get it to work with VLC, but it picks up Firefox...
author | paper@DavesDouble.local |
---|---|
date | Sun, 19 Nov 2023 04:21:56 -0500 |
parents | 44c5e6dd9488 |
children | e44b7c428d7c |
comparison
equal
deleted
inserted
replaced
165:8937fb7f2d66 | 166:54c5d80a737e |
---|---|
55 ) | 55 ) |
56 else() # NOT WIN32 AND NOT APPLE | 56 else() # NOT WIN32 AND NOT APPLE |
57 if(LINUX) | 57 if(LINUX) |
58 list(APPEND DEFINES LINUX) | 58 list(APPEND DEFINES LINUX) |
59 list(APPEND SRC_FILES | 59 list(APPEND SRC_FILES |
60 # linux | 60 src/fd/proc.cc |
61 src/fd/linux.cc | |
62 ) | 61 ) |
63 endif() # LINUX | 62 endif() # LINUX |
63 | |
64 # FreeBSD | |
65 find_library(LIBUTIL_LIBRARY util) | |
66 if(LIBUTIL_LIBRARY) | |
67 get_filename_component(LIBUTIL_DIR ${LIBUTIL_LIBRARY} DIRECTORY) | |
68 | |
69 include(CheckLibraryExists) | |
70 check_library_exists(util kinfo_getfile ${LIBUTIL_DIR} LIBUTIL_GOOD) | |
71 | |
72 if(LIBUTIL_GOOD) | |
73 list(APPEND LIBRARIES ${LIBUTIL_LIBRARY}) | |
74 list(APPEND DEFINES LIBUTIL) | |
75 list(APPEND SRC_FILES src/fd/libutil.cc) | |
76 endif() # LIBUTIL_GOOD | |
77 endif() # LIBUTIL_LIBRARY | |
64 | 78 |
65 # X11 | 79 # X11 |
66 find_package(X11 COMPONENTS X11) | 80 find_package(X11 COMPONENTS X11) |
67 if(X11_FOUND) | 81 if(X11_FOUND) |
68 list(APPEND DEFINES X11) | 82 list(APPEND DEFINES X11) |
88 ) | 102 ) |
89 list(APPEND INCLUDE_DIRS | 103 list(APPEND INCLUDE_DIRS |
90 ${X11_INCLUDE_DIRS} | 104 ${X11_INCLUDE_DIRS} |
91 ) | 105 ) |
92 list(APPEND LIBRARIES | 106 list(APPEND LIBRARIES |
93 ${X11_LIBRARIES} | 107 ${X11_LINK_LIBRARIES} |
94 ) | 108 ) |
95 endif() # X11_FOUND | 109 endif() # X11_FOUND |
96 endif() # PKG_CONFIG_FOUND | 110 endif() # PKG_CONFIG_FOUND |
97 endif() # X11_FOUND | 111 endif() # X11_FOUND |
98 endif() # WIN32 AND APPLE | 112 endif() # WIN32 AND APPLE |