mirror of
https://github.com/pound-emu/pound.git
synced 2025-12-11 07:36:57 +00:00
This new architecture decomposes the project into several distict static libraries: common, host, kvm, and frontend. By using static libraries, changes within one module will only require that library to be re-linked, rather than recompiling and re-linking the entire executable. The third party library ImGui is now built as a static library target. Signed-off-by: Ronald Caesar <github43132@proton.me>
36 lines
831 B
CMake
36 lines
831 B
CMake
set(BUILD_SHARED_LIBS OFF)
|
|
set(BUILD_TESTING OFF)
|
|
set_directory_properties(PROPERTIES EXCLUDE_FROM_ALL ON SYSTEM ON)
|
|
|
|
# Set CMP0069 policy to "NEW" for building external targets with LTO enabled
|
|
set(CMAKE_POLICY_DEFAULT_CMP0069 NEW)
|
|
|
|
# fmt
|
|
if (NOT TARGET fmt::fmt)
|
|
add_subdirectory(fmt)
|
|
endif()
|
|
|
|
# SDL3
|
|
if (NOT TARGET SDL3::SDL3)
|
|
set(SDL_DISKAUDIO OFF)
|
|
set(SDL_TEST_LIBRARY OFF)
|
|
set(SDL_PIPEWIRE OFF)
|
|
add_subdirectory(SDL3)
|
|
endif()
|
|
|
|
# ImGui
|
|
set(IMGUI_SRC
|
|
imgui/imgui.cpp
|
|
imgui/imgui_demo.cpp
|
|
imgui/imgui_draw.cpp
|
|
imgui/imgui_tables.cpp
|
|
imgui/imgui_widgets.cpp
|
|
imgui/backends/imgui_impl_sdl3.cpp
|
|
imgui/backends/imgui_impl_opengl3.cpp
|
|
)
|
|
add_library(imgui STATIC ${IMGUI_SRC})
|
|
target_link_libraries(imgui PRIVATE SDL3::SDL3)
|
|
target_include_directories(imgui PUBLIC
|
|
imgui
|
|
imgui/backends
|
|
)
|