mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-13 23:00:50 +02:00
This tool works in both gui-less and gui modes. FEXLogServer executed alone will open a socket on `localhost:8087` and pass log output to stderr. If passed the `-g` argument then it will open the IMGui UI which has some more options. It's fairly basic right now but eventually should allow filtering by PIDs, TIDs, and log level type
42 lines
1.1 KiB
CMake
42 lines
1.1 KiB
CMake
set(NAME FEXLogServer)
|
|
set(SRCS Main.cpp
|
|
${CMAKE_SOURCE_DIR}/External/imgui/examples/imgui_impl_sdl.cpp
|
|
${CMAKE_SOURCE_DIR}/External/imgui/examples/imgui_impl_opengl3.cpp)
|
|
|
|
find_library(EPOXY_LIBRARY epoxy)
|
|
find_package(SDL2 REQUIRED)
|
|
|
|
add_definitions(-DIMGUI_IMPL_OPENGL_LOADER_CUSTOM=<epoxy/gl.h>)
|
|
|
|
add_executable(${NAME} ${SRCS})
|
|
|
|
list(APPEND LIBS FEXCore Common CommonCore epoxy X11 EGL imgui)
|
|
|
|
target_include_directories(${NAME} PRIVATE ${CMAKE_SOURCE_DIR}/Source/)
|
|
target_include_directories(${NAME} PRIVATE ${CMAKE_SOURCE_DIR}/External/imgui/examples/)
|
|
|
|
if (TARGET SDL2::SDL2)
|
|
target_link_libraries(${NAME} PRIVATE SDL2::SDL2)
|
|
else()
|
|
target_include_directories(${NAME} PRIVATE ${SDL2_INCLUDE_DIRS})
|
|
target_link_libraries(${NAME} PRIVATE ${SDL2_LIBRARIES})
|
|
endif()
|
|
|
|
|
|
if (CMAKE_BUILD_TYPE MATCHES "RELEASE")
|
|
target_link_options(${NAME}
|
|
PRIVATE
|
|
"LINKER:--gc-sections"
|
|
"LINKER:--strip-all"
|
|
"LINKER:--as-needed"
|
|
)
|
|
endif()
|
|
|
|
install(TARGETS ${NAME}
|
|
RUNTIME
|
|
DESTINATION bin
|
|
COMPONENT runtime)
|
|
|
|
target_link_libraries(${NAME} PRIVATE ${LIBS} ${STATIC_PIE_OPTIONS} ${PTHREAD_LIB})
|
|
|