From: Nathan Moinvaziri Date: Thu, 1 Jul 2021 21:06:06 +0000 (-0700) Subject: Include win directory in pigz even if not using threads. X-Git-Tag: 2.1.0-beta1~516 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=96290ad9177865558e47d00576aed82df5197522;p=thirdparty%2Fzlib-ng.git Include win directory in pigz even if not using threads. --- diff --git a/test/pigz/CMakeLists.txt b/test/pigz/CMakeLists.txt index 6038e6cb5..43082cf26 100644 --- a/test/pigz/CMakeLists.txt +++ b/test/pigz/CMakeLists.txt @@ -6,6 +6,9 @@ # By default pigz will be linked against the system zlib and # pthread libraries if installed. +# For compilation on Windows download and use shim: +# https://github.com/zlib-ng/pigzbench/tree/master/pigz/win + # Optional Variables # WITH_CODE_COVERAGE - Enable code coverage reporting # WITH_THREADS - Enable threading support @@ -69,6 +72,9 @@ set(PIGZ_HDRS add_executable(${PROJECT_NAME} ${PIGZ_SRCS} ${PIGZ_HDRS}) add_definitions(-DNOZOPFLI) +if(WIN32) + target_include_directories(${PROJECT_NAME} PRIVATE win) +endif() # Find and link against pthreads or pthreads4w if(WITH_THREADS) @@ -79,7 +85,7 @@ if(WITH_THREADS) add_subdirectory(${PTHREADS4W_ROOT} ${PTHREADS4W_ROOT} EXCLUDE_FROM_ALL) target_link_libraries(${PROJECT_NAME} pthreadVC3) - target_include_directories(${PROJECT_NAME} PRIVATE win ${PTHREADS4W_ROOT}) + target_include_directories(${PROJECT_NAME} PRIVATE ${PTHREADS4W_ROOT}) else() message(WARNING "Missing pthreads4w root directory") set(WITH_THREADS OFF)