diff options
| author | Joshua Vandaƫle <joshua@vandaele.software> | 2026-01-26 05:32:07 +0100 |
|---|---|---|
| committer | Joshua Vandaƫle <joshua@vandaele.software> | 2026-01-26 05:32:07 +0100 |
| commit | e28cb4bd54e61306ea1f82dc68b8fdff611eb51d (patch) | |
| tree | bb87b726369862fa6e3345638a9022c2fdf11401 /Externals | |
| parent | c4c2aa8afd6f7e9a254bc56c53132dd5eb2ccc12 (diff) | |
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.
Diffstat (limited to 'Externals')
| -rw-r--r-- | Externals/implot/CMakeLists.txt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Externals/implot/CMakeLists.txt b/Externals/implot/CMakeLists.txt index c757ec48cb..6ee7a386a8 100644 --- a/Externals/implot/CMakeLists.txt +++ b/Externals/implot/CMakeLists.txt @@ -22,4 +22,7 @@ target_link_libraries(implot ) # https://github.com/epezent/implot/pull/565 -target_compile_options(implot PRIVATE -include "${CMAKE_CURRENT_SOURCE_DIR}/implot_isnan_fix.h") +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> +) |
