Am 21.07.2015 um 16:43 schrieb Brad King:
> On 07/21/2015 10:32 AM, Ralf Habacker wrote:
>> Changed to use CheckSymbolExists, see append patch.
> Thanks.  We'll also need to set CMAKE_REQUIRED_INCLUDES to ensure
> the correct bzlib.h header can be found when it is not in a system
> default location.
Thanks for pointing out. I did not had that in mind; updated patch appended

Regards
Ralf

--- a/Modules/FindBZip2.cmake	2015-07-21 15:53:01.529240144 +0200
+++ b/Modules/FindBZip2.cmake	2015-07-21 16:23:19.789187460 +0200
@@ -56,11 +56,13 @@
                                   VERSION_VAR BZIP2_VERSION_STRING)
 
 if (BZIP2_FOUND)
-   include(${CMAKE_CURRENT_LIST_DIR}/CheckLibraryExists.cmake)
+   include(${CMAKE_CURRENT_LIST_DIR}/CheckSymbolExists.cmake)
    include(${CMAKE_CURRENT_LIST_DIR}/CMakePushCheckState.cmake)
    cmake_push_check_state()
    set(CMAKE_REQUIRED_QUIET ${BZip2_FIND_QUIETLY})
-   CHECK_LIBRARY_EXISTS("${BZIP2_LIBRARIES}" BZ2_bzCompressInit "" BZIP2_NEED_PREFIX)
+   set(CMAKE_REQUIRED_INCLUDES ${BZIP2_INCLUDE_DIR})
+   set(CMAKE_REQUIRED_LIBRARIES ${BZIP2_LIBRARIES})
+   CHECK_SYMBOL_EXISTS(BZ2_bzCompressInit "bzlib.h" BZIP2_NEED_PREFIX)
    cmake_pop_check_state()
 endif ()
 
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to