summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Moinvaziri <nathan@nathanm.com>2023-04-24 09:04:24 -0700
committerHans Kristian Rosbach <hk-github@circlestorm.org>2023-04-25 12:10:36 +0200
commit3f06cece6be2e1bfe7b60d17e5ef823535ec9d0c (patch)
tree0ab62e1f00fe0dc582f4fcd2f6560fa4c8becae8
parent38aa5751297709fa31b1a5b7e022384b57e1724d (diff)
downloadProject-Tick-3f06cece6be2e1bfe7b60d17e5ef823535ec9d0c.tar.gz
Project-Tick-3f06cece6be2e1bfe7b60d17e5ef823535ec9d0c.zip
Use ZLIB_INCLUDE_DIRS from FindZLIB instead of ZLIB_INCLUDE_DIR.
ZLIB_INCLUDE_DIRS is set by FindZLIB if ZLIB_INCLUDE_DIR is set on the command line.
-rw-r--r--test/CMakeLists.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 007509a215..d434ec3083 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -210,7 +210,7 @@ if(WITH_GTEST)
-fsanitize-memory-track-origins)
endif()
- if(NOT ZLIB_COMPAT AND DEFINED ZLIB_LIBRARIES AND DEFINED ZLIB_INCLUDE_DIR)
+ if(NOT ZLIB_COMPAT AND DEFINED ZLIB_LIBRARIES AND DEFINED ZLIB_INCLUDE_DIRS)
if(NOT IS_ABSOLUTE ${ZLIB_LIBRARIES})
get_filename_component(ZLIB_ABSOLUTE_PATH
"${CMAKE_CURRENT_SOURCE_DIR}/${ZLIB_LIBRARIES}"
@@ -222,11 +222,11 @@ if(WITH_GTEST)
add_library(external_zlib STATIC IMPORTED)
set_property(TARGET external_zlib PROPERTY IMPORTED_LOCATION ${ZLIB_ABSOLUTE_PATH})
message(STATUS "Added dual linking tests against zlib")
- message(STATUS " Zlib include dir: ${ZLIB_INCLUDE_DIR}")
+ message(STATUS " Zlib include dirs: ${ZLIB_INCLUDE_DIRS}")
message(STATUS " Zlib libraries: ${ZLIB_ABSOLUTE_PATH}")
target_sources(gtest_zlib PRIVATE test_compress_dual.cc)
- target_include_directories(gtest_zlib PRIVATE ${ZLIB_INCLUDE_DIR})
+ target_include_directories(gtest_zlib PRIVATE ${ZLIB_INCLUDE_DIRS})
target_link_libraries(gtest_zlib external_zlib)
endif()