Files
FEX-Emu--FEX/Source/Tools/pidof/CMakeLists.txt
T
Ryan Houdek ddfd393789 Tools: Adds new FEXpidof tool
This behaves exactly like pidof but only searches for FEX applications.
This fixes a long standing annoyance of mine that pidof doesn't work for
FEX. This behaves exactly like pidof but knows how to decode the command
line options to pull out the program data.

If the Linux kernel ever accepts the patches for binfmt_misc to change
how the interpreter is handled then this will become redundant, but
until that happens here is a utility that I want.
2024-01-12 19:05:37 -08:00

26 lines
463 B
CMake

add_executable(FEXpidof pidof.cpp)
target_include_directories(FEXpidof
PRIVATE
${PROJECT_SOURCE_DIR}/Source/Common/cpp-optparse/)
target_link_libraries(FEXpidof
PRIVATE
cpp-optparse
fmt::fmt
)
if (CMAKE_BUILD_TYPE MATCHES "RELEASE")
target_link_options(FEXpidof
PRIVATE
"LINKER:--gc-sections"
"LINKER:--strip-all"
"LINKER:--as-needed"
)
endif()
install(TARGETS FEXpidof
RUNTIME
DESTINATION bin
COMPONENT runtime
)