skip precompiled headers for 3rd party files (fixes imgui2-modern renderer interaction)

This commit is contained in:
milek7
2021-01-31 00:05:15 +01:00
parent 4e6b2ecedd
commit 41cda4a889
3 changed files with 4 additions and 3 deletions

View File

@@ -203,6 +203,7 @@ if (USE_IMGUI_GL3)
else() else()
add_definitions(-DEU07_USEIMGUIIMPLOPENGL2) add_definitions(-DEU07_USEIMGUIIMPLOPENGL2)
set(SOURCES ${SOURCES} "imgui/imgui_impl_opengl2.cpp") set(SOURCES ${SOURCES} "imgui/imgui_impl_opengl2.cpp")
set_source_files_properties("imgui/imgui_impl_opengl2.cpp" PROPERTIES SKIP_PRECOMPILE_HEADERS TRUE)
endif() endif()
if (WITH_UART) if (WITH_UART)
@@ -353,6 +354,9 @@ if(NOT ${CMAKE_VERSION} VERSION_LESS "3.16.0")
if (USE_PCH) if (USE_PCH)
target_precompile_headers(${PROJECT_NAME} PRIVATE "$<$<COMPILE_LANGUAGE:CXX>:${CMAKE_CURRENT_SOURCE_DIR}/stdafx.h>") target_precompile_headers(${PROJECT_NAME} PRIVATE "$<$<COMPILE_LANGUAGE:CXX>:${CMAKE_CURRENT_SOURCE_DIR}/stdafx.h>")
set_source_files_properties("ref/glad/src/glad.c" "ref/dds-ktx/src/dds-ktx.c" "stb/stb_image.c"
"imgui/imgui.cpp" "imgui/imgui_demo.cpp" "imgui/imgui_draw.cpp" "imgui/imgui_widgets.cpp" "imgui/imgui_impl_glfw.cpp"
PROPERTIES SKIP_PRECOMPILE_HEADERS TRUE)
endif() endif()
endif() endif()

View File

@@ -53,8 +53,6 @@ Index of this file:
*/ */
#include "stdafx.h"
#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS)
#define _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS
#endif #endif

View File

@@ -28,7 +28,6 @@ Index of this file:
*/ */
#include "stdafx.h"
#ifdef DBG_NEW #ifdef DBG_NEW
#undef new #undef new
#endif #endif