diff --git a/CMakeLists.txt b/CMakeLists.txt index ff1b025..53ecd0e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,7 +13,6 @@ SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build/cmake") if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${libarchive_BINARY_DIR}/bin) endif() -# # Set the Build type for make based generators. # You can choose following types: # Debug : Debug build @@ -445,14 +444,14 @@ IF(ZLIB_FOUND) INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) LIST(APPEND ADDITIONAL_LIBS ${ZLIB_LIBRARIES}) IF(WIN32 AND NOT CYGWIN) - # - # Test if ZLIB_WINAPI macro is needed to use. - # - TRY_MACRO_FOR_LIBRARY( - "${ZLIB_INCLUDE_DIR}" "${ZLIB_LIBRARIES}" - RUNS - "#include \nint main() {uLong f = zlibCompileFlags(); return (f&(1U<<10))?0:-1; }" - ZLIB_WINAPI) + + + + + + + + SET(ZLIB_WINAPI yes) IF(ZLIB_WINAPI) ADD_DEFINITIONS(-DZLIB_WINAPI) ELSE(ZLIB_WINAPI)