]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Add missing checks to CMakeLists;closes #1023 1053/head
authorVarunram <vrg2009@ymail.com>
Sun, 18 Mar 2018 10:18:58 +0000 (15:48 +0530)
committerVarunram <vrg2009@ymail.com>
Sun, 18 Mar 2018 10:18:58 +0000 (15:48 +0530)
build/cmake/lib/CMakeLists.txt

index 945fdb9221b44ad6972f400bcb154202a5fda69b..2b11226d88e23ac08cc188aba1b826f4a0b4d6eb 100644 (file)
@@ -122,14 +122,14 @@ ENDIF (MSVC)
 
 # Add multi-threading support definitions
 
-IF (ZSTD_MULTITHREAD_SUPPORT)
+IF (ZSTD_MULTITHREAD_SUPPORT AND ZSTD_BUILD_SHARED AND ZSTD_BUILD_STATIC)
     SET_PROPERTY(TARGET libzstd_shared libzstd_static APPEND PROPERTY COMPILE_DEFINITIONS "ZSTD_MULTITHREAD")
 
     IF (UNIX)
         TARGET_LINK_LIBRARIES(libzstd_shared ${THREADS_LIBS})
         TARGET_LINK_LIBRARIES(libzstd_static ${THREADS_LIBS})
     ENDIF ()
-ENDIF (ZSTD_MULTITHREAD_SUPPORT)
+ENDIF (ZSTD_MULTITHREAD_SUPPORT AND ZSTD_BUILD_SHARED AND ZSTD_BUILD_STATIC)
 
 # With MSVC static library needs to be renamed to avoid conflict with import library
 IF (MSVC)