]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Include win directory in pigz even if not using threads.
authorNathan Moinvaziri <nathan@nathanm.com>
Thu, 1 Jul 2021 21:06:06 +0000 (14:06 -0700)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Fri, 3 Sep 2021 09:21:57 +0000 (11:21 +0200)
test/pigz/CMakeLists.txt

index 6038e6cb5362e31e5fca409e7f32ba90093f1711..43082cf263d3f77a79b4e3ebc19979bdb93845ea 100644 (file)
@@ -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)