Ensure local headers are used over system headers to avoid breakage
types.h was being picked up from webp rather than locally due to the `include_directories` call for GTK (and therefore its -I arguments) coming before the same call for the local sources. webp can be pulled in via GTK -> gdk-pixbuf -> tiff -> webp. This can be avoided by specifying `SYSTEM` or `BEFORE` as appropriate when calling `include_directories`. I have done both for good measure.
This commit is contained in:
parent
98f4beabe8
commit
b95dbaf914
2 changed files with 11 additions and 9 deletions
|
|
@ -1,7 +1,7 @@
|
|||
cmake_minimum_required( VERSION 3.1.0 )
|
||||
|
||||
if( NOT CMAKE_CROSSCOMPILING )
|
||||
include_directories( "${ZLIB_INCLUDE_DIR}" "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIR}" )
|
||||
include_directories( SYSTEM "${ZLIB_INCLUDE_DIR}" "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIR}" )
|
||||
add_executable( zipdir
|
||||
zipdir.c )
|
||||
target_link_libraries( zipdir ${ZLIB_LIBRARIES} ${BZIP2_LIBRARIES} lzma )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue