message(FATAL_ERROR"This module can only be used if you are using the 3DS toolchain file. Please erase this build directory or create another one, and then use -DCMAKE_TOOLCHAIN_FILE=DevkitArm3DS.cmake when calling cmake for the 1st time. For more information, see the Readme.md for more information.")
endif()
if(ZLIB_INCLUDE_DIR)
# Already in cache, be silent
set(ZLIB_FIND_QUIETLYTRUE)
endif(ZLIB_INCLUDE_DIR)
include(LibFindMacros)
include(try_add_imported_target)
set(_ZLIB_SEARCHES)
# Search ZLIB_ROOT first if it is set.
if(ZLIB_ROOT)
set(_ZLIB_SEARCH_ROOT
PATHS${ZLIB_ROOT}
NO_DEFAULT_PATH
NO_CMAKE_FIND_ROOT_PATH)
list(APPEND_ZLIB_SEARCHES_ZLIB_SEARCH_ROOT)
endif()
# Search below ${DEVKITPRO}, ${DEVKITARM}, portlibs (if enabled) etc.