2012-06-22 21:04:03 +02:00
|
|
|
# Try to find the PHYSFS library
|
|
|
|
# PHYSFS_FOUND - system has PHYSFS
|
|
|
|
# PHYSFS_INCLUDE_DIR - the PHYSFS include directory
|
|
|
|
# PHYSFS_LIBRARY - the PHYSFS library
|
2011-05-15 21:19:41 +02:00
|
|
|
|
|
|
|
FIND_PATH(PHYSFS_INCLUDE_DIR physfs.h PATH_SUFFIXES physfs)
|
2012-06-22 21:04:03 +02:00
|
|
|
SET(_PHYSFS_STATIC_LIBS libphysfs.a)
|
|
|
|
SET(_PHYSFS_SHARED_LIBS physfs.dll physfs)
|
|
|
|
IF(USE_STATIC_LIBS)
|
|
|
|
FIND_LIBRARY(PHYSFS_LIBRARY NAMES ${_PHYSFS_STATIC_LIBS} ${_PHYSFS_SHARED_LIBS})
|
|
|
|
ELSE()
|
|
|
|
FIND_LIBRARY(PHYSFS_LIBRARY NAMES ${_PHYSFS_SHARED_LIBS} ${_PHYSFS_STATIC_LIBS})
|
|
|
|
ENDIF()
|
2011-05-15 21:19:41 +02:00
|
|
|
INCLUDE(FindPackageHandleStandardArgs)
|
2012-06-22 21:04:03 +02:00
|
|
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PHYSFS DEFAULT_MSG PHYSFS_LIBRARY PHYSFS_INCLUDE_DIR)
|
|
|
|
MARK_AS_ADVANCED(PHYSFS_LIBRARY PHYSFS_INCLUDE_DIR)
|