Files
archived-dolphin/Externals/implot/CMakeLists.txt
Joshua Vandaële e28cb4bd54 CMake: Apply implot fix on Windows with non-VS generators
If using CMake and Ninja or any CMake generator that isn't Visual Studio on Windows, the `-include` will be ignored and the implot fix will not be applied.
2026-01-26 05:32:07 +01:00

29 lines
669 B
CMake

if(NOT MSVC)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
endif()
set(SRCS
implot/implot.cpp
implot/implot_items.cpp
)
add_library(implot STATIC ${SRCS})
dolphin_disable_warnings(implot)
target_include_directories(implot
PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/implot"
PRIVATE imgui
)
target_link_libraries(implot
PRIVATE imgui
PRIVATE fmt::fmt
)
# https://github.com/epezent/implot/pull/565
target_compile_options(implot PRIVATE
$<$<CXX_COMPILER_ID:MSVC>:/FI${CMAKE_CURRENT_SOURCE_DIR}/implot_isnan_fix.h>
$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-include ${CMAKE_CURRENT_SOURCE_DIR}/implot_isnan_fix.h>
)