Skip to content

Commit

Permalink
CMake: Include parent directory of libxml2 headers as well
Browse files Browse the repository at this point in the history
Else we aren't able to find it if it isn't in any of the default locations
because of the way we are including headers

For example:
LIBXML2_INCLUDE_DIR contains /usr/local/include/libxml2
... and the way we include libxml2 is ...
... which means that if /usr/local/include isn't already in our default paths, we get an error.
  • Loading branch information
sedmicha authored and Lukas955 committed Aug 5, 2024
1 parent 1ae05e6 commit 8077170
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ include_directories(
"${PROJECT_BINARY_DIR}/include/" # for api.h
"${PROJECT_BINARY_DIR}/src/" # for build_config.h
"${LIBXML2_INCLUDE_DIR}"
"${LIBXML2_INCLUDE_DIR}/../"
)

set(CMAKE_POSITION_INDEPENDENT_CODE ON)
Expand Down

0 comments on commit 8077170

Please sign in to comment.