Skip to content

Commit 2e3d86c

Browse files
tr1cksmadler
authored andcommitted
Add target include directories to CMakeLists.txt.
This enables the addition of zlib to other projects.
1 parent c06dfec commit 2e3d86c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,9 @@ if(MINGW)
150150
endif(MINGW)
151151

152152
add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
153+
target_include_directories(zlib PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
153154
add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
155+
target_include_directories(zlibstatic PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
154156
set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL)
155157
set_target_properties(zlib PROPERTIES SOVERSION 1)
156158

0 commit comments

Comments
 (0)