mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-25 17:00:46 +01:00
Splits out the few required dependencies to a FEXCore_Base static library. FEXCore then links to this directly. Then make it so the FEX Common code links to FEXCore_Base so the jemalloc dependency doesn't get pulled in.
41 lines
1.2 KiB
CMake
41 lines
1.2 KiB
CMake
set(NAME FEXConfig)
|
|
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})
|
|
|
|
target_include_directories(${NAME} PRIVATE ${LLVM_INCLUDE_DIRS})
|
|
|
|
target_include_directories(${NAME} PRIVATE ${CMAKE_SOURCE_DIR}/Source/)
|
|
target_include_directories(${NAME} PRIVATE ${CMAKE_SOURCE_DIR}/Source/Tools/Debugger/)
|
|
|
|
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()
|
|
target_link_libraries(${NAME} PRIVATE Common pthread epoxy X11 EGL imgui json-maker)
|
|
|
|
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)
|