Skip to content

Commit

Permalink
zlib headers are required to build example binaries in zlib, so path …
Browse files Browse the repository at this point in the history
…to the headers should be before add_subdirectory
  • Loading branch information
peter23 authored Sep 12, 2024
1 parent f3b7b66 commit b539e0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ if(UNIX OR MINGW)
include_directories(SYSTEM third_party/protobuf/src)
endif()
if(NOT ZLIB_FOUND)
add_subdirectory(third_party/zlib)
include_directories(SYSTEM third_party/zlib)
add_subdirectory(third_party/zlib)
include_directories(${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib)
endif()
else()
Expand All @@ -150,8 +150,8 @@ else()
add_subdirectory(third_party/protobuf/cmake)
include_directories(SYSTEM third_party/protobuf/src)

add_subdirectory(third_party/zlib)
include_directories(third_party/zlib)
add_subdirectory(third_party/zlib)
include_directories(${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib)
set_property(TARGET example PROPERTY FOLDER "third_party")
set_property(TARGET minigzip PROPERTY FOLDER "third_party")
Expand Down

0 comments on commit b539e0a

Please sign in to comment.