mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-14 14:00:42 +02:00
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.
26 lines
463 B
CMake
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
|
|
)
|