summaryrefslogtreecommitdiff
path: root/Modules/FindPhysFS.cmake
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-07-19 09:00:51 -0400
committerAlexander Neundorf <neundorf@kde.org>2007-07-19 09:00:51 -0400
commitc7770b8edbff442267563bd3036cef8fdb0cc4a9 (patch)
tree1c73f377e04981e72043a9ac5fff8fef0eca343b /Modules/FindPhysFS.cmake
parentb6b1ebe2950e2437fffd4eecbe3f1992fc63e812 (diff)
downloadcmake-c7770b8edbff442267563bd3036cef8fdb0cc4a9.tar.gz
ENH: use the new FIND_PACKAGE_HANDLE_STANDARD_ARGS() macro in most of the
not-too-complicated modules -remove unnecessary default search paths used in the FIND_XXX() calls Alex
Diffstat (limited to 'Modules/FindPhysFS.cmake')
-rw-r--r--Modules/FindPhysFS.cmake34
1 files changed, 10 insertions, 24 deletions
diff --git a/Modules/FindPhysFS.cmake b/Modules/FindPhysFS.cmake
index 5912234afa..93750c22d4 100644
--- a/Modules/FindPhysFS.cmake
+++ b/Modules/FindPhysFS.cmake
@@ -14,23 +14,15 @@
# On OSX, this will prefer the Framework version (if found) over others.
# People will have to manually change the cache values of
# PHYSFS_LIBRARY to override this selection.
-FIND_PATH(PHYSFS_INCLUDE_DIR physfs.h
+
+FIND_PATH(PHYSFS_INCLUDE_DIR NAMES physfs.h
+ PATH_SUFFIXES physfs
+ PATHS
$ENV{PHYSFSDIR}/include
~/Library/Frameworks/PhysFS.framework/Headers
/Library/Frameworks/PhysFS.framework/Headers
- /usr/local/include/physfs
- /usr/local/include
- /usr/include/physfs
- /usr/include
- /sw/include/physfs # Fink
- /sw/include
- /opt/local/include/physfs # DarwinPorts
- /opt/local/include
- /opt/csw/include/physfs # Blastwave
- /opt/csw/include
- /opt/include/physfs
- /opt/include
)
+
# I'm not sure if I should do a special casing for Apple. It is
# unlikely that other Unix systems will find the framework path.
# But if they do ([Next|Open|GNU]Step?),
@@ -58,17 +50,11 @@ ELSE(${PHYSFS_INCLUDE_DIR} MATCHES ".framework")
NAMES physfs PhysFS
PATHS
$ENV{PHYSFSDIR}/lib
- /usr/local/lib
- /usr/lib
- /sw/lib
- /opt/local/lib
- /opt/csw/lib
- /opt/lib
)
-ENDIF(${PHYSFS_INCLUDE_DIR} MATCHES ".framework")
-SET(PHYSFS_FOUND "NO")
-IF(PHYSFS_LIBRARY)
- SET(PHYSFS_FOUND "YES")
-ENDIF(PHYSFS_LIBRARY)
+ENDIF(${PHYSFS_INCLUDE_DIR} MATCHES ".framework")
+# handle the QUIETLY and REQUIRED arguments and set PHYSFS_FOUND to TRUE if
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(PhysFS PHYSFS_LIBRARY PHYSFS_INCLUDE_DIR)