CMake: private includes before public includes

This way, build-in headers (for example png headers) will always be included
before system headers.
This commit is contained in:
Maarten Bent
2019-11-27 20:40:11 +01:00
parent 4d72739714
commit 38c38e2274
2 changed files with 11 additions and 3 deletions

View File

@@ -86,7 +86,11 @@ if(wxBUILD_MONOLITHIC)
target_link_libraries(mono ${vis} ${wxMONO_LIBS_${vis}})
endif()
if(wxMONO_INCLUDE_DIRS_${vis})
target_include_directories(mono ${vis} ${wxMONO_INCLUDE_DIRS_${vis}})
set(INCLUDE_POS)
if (vis STREQUAL PRIVATE)
set(INCLUDE_POS BEFORE)
endif()
target_include_directories(mono ${INCLUDE_POS} ${vis} ${wxMONO_INCLUDE_DIRS_${vis}})
endif()
if(wxMONO_DEFINITIONS_${vis})
target_compile_definitions(mono ${vis} ${wxMONO_DEFINITIONS_${vis}})