This is an automated email from the ASF dual-hosted git repository.

dongjoon pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/orc.git


The following commit(s) were added to refs/heads/main by this push:
     new 1afc31d6c ORC-1188: Fix `ORC_PREFER_STATIC_ZLIB`
1afc31d6c is described below

commit 1afc31d6c04729d7e194a6423c690af4519aab33
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Tue May 24 21:12:23 2022 -0700

    ORC-1188: Fix `ORC_PREFER_STATIC_ZLIB`
    
    ### What changes were proposed in this pull request?
    
    This PR aims to fix
    
    ### Why are the changes needed?
    
    To be consistent with the definition.
    
https://github.com/apache/orc/blob/8f038a068c61cdac72c4c58ad023ad3c4ab10e38/cmake_modules/ThirdpartyToolchain.cmake#L147-L151
    
    ### How was this patch tested?
    
    Closes #1138
    
    Closes #1140 from dongjoon-hyun/ORC-1188.
    
    Authored-by: Dongjoon Hyun <[email protected]>
    Signed-off-by: Dongjoon Hyun <[email protected]>
---
 cmake_modules/ThirdpartyToolchain.cmake | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cmake_modules/ThirdpartyToolchain.cmake 
b/cmake_modules/ThirdpartyToolchain.cmake
index bf601968a..070abe525 100644
--- a/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cmake_modules/ThirdpartyToolchain.cmake
@@ -145,9 +145,9 @@ endif ()
 add_library (orc_zlib INTERFACE)
 add_library (orc::zlib ALIAS orc_zlib)
 if (ORC_PREFER_STATIC_ZLIB AND ${ZLIB_STATIC_LIB})
-  target_link_libraries (orc_zlib INTERFACE ${ZLIB_LIBRARY})
-else ()
   target_link_libraries (orc_zlib INTERFACE ${ZLIB_STATIC_LIB})
+else ()
+  target_link_libraries (orc_zlib INTERFACE ${ZLIB_LIBRARY})
 endif ()
 target_include_directories (orc_zlib SYSTEM INTERFACE ${ZLIB_INCLUDE_DIR})
 

Reply via email to