Commit c7770b8e authored by Alexander Neundorf's avatar Alexander Neundorf

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
parent b6b1ebe2
......@@ -21,20 +21,10 @@ FIND_PATH(ASPELL_INCLUDE_DIR aspell.h )
FIND_LIBRARY(ASPELL_LIBRARIES NAMES aspell aspell-15)
IF (ASPELL_INCLUDE_DIR AND ASPELL_LIBRARIES)
SET(ASPELL_FOUND TRUE)
ELSE (ASPELL_INCLUDE_DIR AND ASPELL_LIBRARIES)
SET(ASPELL_FOUND FALSE)
ENDIF (ASPELL_INCLUDE_DIR AND ASPELL_LIBRARIES)
# handle the QUIETLY and REQUIRED arguments and set ASPELL_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ASPELL ASPELL_LIBRARIES ASPELL_INCLUDE_DIR)
IF (ASPELL_FOUND)
IF (NOT ASPELL_FIND_QUIETLY)
MESSAGE(STATUS "Found ASPELL: ${ASPELL_LIBRARIES}")
ENDIF (NOT ASPELL_FIND_QUIETLY)
ELSE (ASPELL_FOUND)
IF (ASPELL_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could NOT find ASPELL")
ENDIF (ASPELL_FIND_REQUIRED)
ENDIF (ASPELL_FOUND)
MARK_AS_ADVANCED(ASPELL_INCLUDE_DIR ASPELL_LIBRARIES)
......@@ -13,30 +13,15 @@ MARK_AS_ADVANCED(CURL_INCLUDE_DIR)
FIND_LIBRARY(CURL_LIBRARY NAMES curl)
MARK_AS_ADVANCED(CURL_LIBRARY)
# Copy the results to the output variables.
IF(CURL_INCLUDE_DIR AND CURL_LIBRARY)
SET(CURL_FOUND 1)
# handle the QUIETLY and REQUIRED arguments and set CURL_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CURL CURL_LIBRARY CURL_INCLUDE_DIR)
IF(CURL_FOUND)
SET(CURL_LIBRARIES ${CURL_LIBRARY})
SET(CURL_INCLUDE_DIRS ${CURL_INCLUDE_DIR})
ELSE(CURL_INCLUDE_DIR AND CURL_LIBRARY)
SET(CURL_FOUND 0)
ELSE(CURL_FOUND)
SET(CURL_LIBRARIES)
SET(CURL_INCLUDE_DIRS)
ENDIF(CURL_INCLUDE_DIR AND CURL_LIBRARY)
# Report the results.
IF(CURL_FOUND)
IF(NOT CURL_FIND_QUIETLY)
MESSAGE(STATUS "CURL found: ${CURL_LIBRARIES}")
ENDIF(NOT CURL_FIND_QUIETLY)
ELSE(CURL_FOUND)
SET(CURL_DIR_MESSAGE
"CURL was not found. Make sure CURL_LIBRARY and CURL_INCLUDE_DIR are set.")
IF(CURL_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "${CURL_DIR_MESSAGE}")
ELSE(CURL_FIND_REQUIRED)
IF(NOT CURL_FIND_QUIETLY)
MESSAGE(STATUS "${CURL_DIR_MESSAGE}")
ENDIF(NOT CURL_FIND_QUIETLY)
ENDIF(CURL_FIND_REQUIRED)
ENDIF(CURL_FOUND)
# - Find the curses include file and library
#
FIND_PATH(CURSES_INCLUDE_PATH
curses.h
/usr/local/include
/usr/include
)
FIND_LIBRARY(CURSES_LIBRARY
NAMES curses ncurses
PATHS
/usr/local/lib
/usr/lib
/lib
)
FIND_LIBRARY(CURSES_EXTRA_LIBRARY
cur_colr
PATHS
/usr/local/lib
/usr/lib
/lib
)
FIND_LIBRARY(FORM_LIBRARY
form
PATHS
/usr/local/lib
/usr/lib
/lib
)
FIND_PATH(CURSES_INCLUDE_PATH curses.h )
FIND_LIBRARY(CURSES_LIBRARY NAMES curses ncurses )
FIND_LIBRARY(CURSES_EXTRA_LIBRARY cur_colr )
FIND_LIBRARY(FORM_LIBRARY form )
# Need to provide the *_LIBRARIES
SET(CURSES_LIBRARIES ${CURSES_LIBRARY})
......@@ -45,6 +23,12 @@ ENDIF(FORM_LIBRARY)
# Proper name is *_INCLUDE_DIR
SET(CURSES_INCLUDE_DIR ${CURSES_INCLUDE_PATH})
# handle the QUIETLY and REQUIRED arguments and set CURSES_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Curses CURSES_LIBRARY CURSES_INCLUDE_PATH)
MARK_AS_ADVANCED(
CURSES_INCLUDE_PATH
CURSES_LIBRARY
......
......@@ -74,13 +74,13 @@ ${DCMTK_DIR}/dcmnet/libsrc/
)
IF( DCMTK_config_INCLUDE_DIR )
IF( DCMTK_ofstd_INCLUDE_DIR )
IF( DCMTK_ofstd_LIBRARY )
IF( DCMTK_dcmdata_INCLUDE_DIR )
IF( DCMTK_dcmdata_LIBRARY )
IF( DCMTK_dcmimgle_INCLUDE_DIR )
IF( DCMTK_dcmimgle_LIBRARY )
IF( DCMTK_config_INCLUDE_DIR
AND DCMTK_ofstd_INCLUDE_DIR
AND DCMTK_ofstd_LIBRARY
AND DCMTK_dcmdata_INCLUDE_DIR
AND DCMTK_dcmdata_LIBRARY
AND DCMTK_dcmimgle_INCLUDE_DIR
AND DCMTK_dcmimgle_LIBRARY )
SET( DCMTK_FOUND "YES" )
SET( DCMTK_INCLUDE_DIR
......@@ -115,13 +115,13 @@ IF( DCMTK_dcmimgle_LIBRARY )
SET( DCMTK_LIBRARIES ${DCMTK_LIBRARIES} netapi32 )
ENDIF( WIN32 )
ENDIF( DCMTK_dcmimgle_LIBRARY )
ENDIF( DCMTK_dcmimgle_INCLUDE_DIR )
ENDIF( DCMTK_dcmdata_LIBRARY )
ENDIF( DCMTK_dcmdata_INCLUDE_DIR )
ENDIF( DCMTK_ofstd_LIBRARY )
ENDIF( DCMTK_ofstd_INCLUDE_DIR )
ENDIF( DCMTK_config_INCLUDE_DIR )
ENDIF( DCMTK_config_INCLUDE_DIR
AND DCMTK_ofstd_INCLUDE_DIR
AND DCMTK_ofstd_LIBRARY
AND DCMTK_dcmdata_INCLUDE_DIR
AND DCMTK_dcmdata_LIBRARY
AND DCMTK_dcmimgle_INCLUDE_DIR
AND DCMTK_dcmimgle_LIBRARY )
IF( NOT DCMTK_FOUND )
SET( DCMTK_DIR "" CACHE PATH "Root of DCMTK source tree (optional)." )
......
......@@ -7,32 +7,22 @@
# Look for the header file.
FIND_PATH(EXPAT_INCLUDE_DIR NAMES expat.h)
MARK_AS_ADVANCED(EXPAT_INCLUDE_DIR)
# Look for the library.
FIND_LIBRARY(EXPAT_LIBRARY NAMES expat)
MARK_AS_ADVANCED(EXPAT_LIBRARY)
# handle the QUIETLY and REQUIRED arguments and set EXPAT_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(EXPAT EXPAT_LIBRARY EXPAT_INCLUDE_PATH)
# Copy the results to the output variables.
IF(EXPAT_INCLUDE_DIR AND EXPAT_LIBRARY)
SET(EXPAT_FOUND 1)
IF(EXPAT_FOUND)
SET(EXPAT_LIBRARIES ${EXPAT_LIBRARY})
SET(EXPAT_INCLUDE_DIRS ${EXPAT_INCLUDE_DIR})
ELSE(EXPAT_INCLUDE_DIR AND EXPAT_LIBRARY)
SET(EXPAT_FOUND 0)
ELSE(EXPAT_FOUND)
SET(EXPAT_LIBRARIES)
SET(EXPAT_INCLUDE_DIRS)
ENDIF(EXPAT_INCLUDE_DIR AND EXPAT_LIBRARY)
ENDIF(EXPAT_FOUND)
# Report the results.
IF(NOT EXPAT_FOUND)
SET(EXPAT_DIR_MESSAGE
"EXPAT was not found. Make sure EXPAT_LIBRARY and EXPAT_INCLUDE_DIR are set.")
IF(NOT EXPAT_FIND_QUIETLY)
MESSAGE(STATUS "${EXPAT_DIR_MESSAGE}")
ELSE(NOT EXPAT_FIND_QUIETLY)
IF(EXPAT_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "${EXPAT_DIR_MESSAGE}")
ENDIF(EXPAT_FIND_REQUIRED)
ENDIF(NOT EXPAT_FIND_QUIETLY)
ENDIF(NOT EXPAT_FOUND)
MARK_AS_ADVANCED(EXPAT_INCLUDE_DIR EXPAT_LIBRARY)
......@@ -11,16 +11,10 @@ IF (WIN32)
IF(CYGWIN)
FIND_PATH( GLUT_INCLUDE_DIR GL/glut.h
/usr/include
)
FIND_PATH( GLUT_INCLUDE_DIR GL/glut.h )
FIND_LIBRARY( GLUT_glut_LIBRARY glut32
${OPENGL_LIBRARY_DIR}
/usr/lib
/usr/lib/w32api
/usr/local/lib
/usr/X11R6/lib
)
......@@ -50,36 +44,23 @@ ELSE (WIN32)
ELSE (APPLE)
FIND_PATH( GLUT_INCLUDE_DIR GL/glut.h
/usr/include
/usr/include/GL
/usr/local/include
/usr/openwin/share/include
/usr/openwin/include
/usr/X11R6/include
/usr/include/X11
/opt/graphics/OpenGL/include
/opt/graphics/OpenGL/contrib/libglut
)
FIND_LIBRARY( GLUT_glut_LIBRARY glut
/usr/lib
/usr/local/lib
/usr/openwin/lib
/usr/X11R6/lib
)
FIND_LIBRARY( GLUT_Xi_LIBRARY Xi
/usr/lib
/usr/local/lib
/usr/openwin/lib
/usr/X11R6/lib
)
FIND_LIBRARY( GLUT_Xmu_LIBRARY Xmu
/usr/lib
/usr/local/lib
/usr/openwin/lib
/usr/X11R6/lib
)
ENDIF (APPLE)
......
......@@ -7,16 +7,11 @@
# don't even bother under WIN32
IF(UNIX)
FIND_PATH( GTK_gtk_INCLUDE_PATH gtk/gtk.h
/usr/include
/usr/local/include
FIND_PATH( GTK_gtk_INCLUDE_PATH NAMES gtk/gtk.h
PATH_SUFFIXES gtk-1.2 gtk12
PATHS
/usr/openwin/share/include
/usr/openwin/include
/usr/X11R6/include
/usr/include/X11
/usr/X11R6/include/gtk12
/usr/include/gtk-1.2
/usr/local/include/gtk-1.2
/opt/gnome/include
)
......@@ -25,9 +20,8 @@ IF(UNIX)
# for both.
# - Atanas Georgiev <atanas@cs.columbia.edu>
FIND_PATH( GTK_glibconfig_INCLUDE_PATH glibconfig.h
/usr/include
/usr/local/include
FIND_PATH( GTK_glibconfig_INCLUDE_PATH NAMES glibconfig.h
PATHS
/usr/openwin/share/include
/usr/local/include/glib12
/usr/lib/glib/include
......@@ -36,31 +30,21 @@ IF(UNIX)
/opt/gnome/lib/glib/include
)
FIND_PATH( GTK_glib_INCLUDE_PATH glib.h
/usr/include
/usr/local/include
FIND_PATH( GTK_glib_INCLUDE_PATH NAMES glib.h
PATH_SUFFIXES gtk-1.2 glib-1.2 glib12
PATHS
/usr/openwin/share/include
/usr/include/gtk-1.2
/usr/local/include/glib12
/usr/lib/glib/include
/usr/include/glib-1.2
/usr/local/include/glib-1.2
/opt/gnome/include
/opt/gnome/include/glib-1.2
)
FIND_PATH( GTK_gtkgl_INCLUDE_PATH gtkgl/gtkglarea.h
/usr/include
/usr/local/include
/usr/openwin/share/include
/opt/gnome/include
FIND_PATH( GTK_gtkgl_INCLUDE_PATH NAMES gtkgl/gtkglarea.h
PATHS /usr/openwin/share/include
/opt/gnome/include
)
FIND_LIBRARY( GTK_gtkgl_LIBRARY gtkgl
/usr/lib
/usr/local/lib
/usr/openwin/lib
/usr/X11R6/lib
/opt/gnome/lib
)
......@@ -70,63 +54,45 @@ IF(UNIX)
FIND_LIBRARY( GTK_gtk_LIBRARY
NAMES gtk gtk12
PATHS /usr/lib
/usr/local/lib
/usr/openwin/lib
/usr/X11R6/lib
PATHS /usr/openwin/lib
/opt/gnome/lib
)
FIND_LIBRARY( GTK_gdk_LIBRARY
NAMES gdk gdk12
PATHS /usr/lib
/usr/local/lib
/usr/openwin/lib
/usr/X11R6/lib
PATHS /usr/openwin/lib
/opt/gnome/lib
)
FIND_LIBRARY( GTK_gmodule_LIBRARY
NAMES gmodule gmodule12
PATHS /usr/lib
/usr/local/lib
/usr/openwin/lib
/usr/X11R6/lib
PATHS /usr/openwin/lib
/opt/gnome/lib
)
FIND_LIBRARY( GTK_glib_LIBRARY
NAMES glib glib12
PATHS /usr/lib
/usr/local/lib
/usr/openwin/lib
/usr/X11R6/lib
PATHS /usr/openwin/lib
/opt/gnome/lib
)
FIND_LIBRARY( GTK_Xi_LIBRARY
NAMES Xi
PATHS /usr/lib
/usr/local/lib
/usr/openwin/lib
/usr/X11R6/lib
/opt/gnome/lib
PATHS /usr/openwin/lib
/opt/gnome/lib
)
FIND_LIBRARY( GTK_gthread_LIBRARY
NAMES gthread gthread12
PATHS /usr/lib
/usr/local/lib
/usr/openwin/lib
/usr/X11R6/lib
PATHS /usr/openwin/lib
/opt/gnome/lib
)
IF(GTK_gtk_INCLUDE_PATH)
IF(GTK_glibconfig_INCLUDE_PATH)
IF(GTK_glib_INCLUDE_PATH)
IF(GTK_gtk_LIBRARY)
IF(GTK_glib_LIBRARY)
IF(GTK_gtk_INCLUDE_PATH
AND GTK_glibconfig_INCLUDE_PATH
AND GTK_glib_INCLUDE_PATH
AND GTK_gtk_LIBRARY
AND GTK_glib_LIBRARY)
# Assume that if gtk and glib were found, the other
# supporting libraries have also been found.
......@@ -149,24 +115,22 @@ IF(UNIX)
SET(GTK_LIBRARIES ${GTK_LIBRARIES} ${GTK_Xi_LIBRARY})
ENDIF(GTK_Xi_LIBRARY)
IF(GTK_gtkgl_INCLUDE_PATH)
IF(GTK_gtkgl_LIBRARY)
SET( GTK_GL_FOUND "YES" )
SET( GTK_INCLUDE_DIR ${GTK_INCLUDE_DIR}
${GTK_gtkgl_INCLUDE_PATH} )
SET( GTK_LIBRARIES ${GTK_gtkgl_LIBRARY} ${GTK_LIBRARIES} )
MARK_AS_ADVANCED(
GTK_gtkgl_LIBRARY
GTK_gtkgl_INCLUDE_PATH
)
ENDIF(GTK_gtkgl_LIBRARY)
ENDIF(GTK_gtkgl_INCLUDE_PATH)
ENDIF(GTK_glib_LIBRARY)
ENDIF(GTK_gtk_LIBRARY)
ENDIF(GTK_glib_INCLUDE_PATH)
ENDIF(GTK_glibconfig_INCLUDE_PATH)
ENDIF(GTK_gtk_INCLUDE_PATH)
IF(GTK_gtkgl_INCLUDE_PATH AND GTK_gtkgl_LIBRARY)
SET( GTK_GL_FOUND "YES" )
SET( GTK_INCLUDE_DIR ${GTK_INCLUDE_DIR}
${GTK_gtkgl_INCLUDE_PATH} )
SET( GTK_LIBRARIES ${GTK_gtkgl_LIBRARY} ${GTK_LIBRARIES} )
MARK_AS_ADVANCED(
GTK_gtkgl_LIBRARY
GTK_gtkgl_INCLUDE_PATH
)
ENDIF(GTK_gtkgl_INCLUDE_PATH AND GTK_gtkgl_LIBRARY)
ENDIF(GTK_gtk_INCLUDE_PATH
AND GTK_glibconfig_INCLUDE_PATH
AND GTK_glib_INCLUDE_PATH
AND GTK_gtk_LIBRARY
AND GTK_glib_LIBRARY)
MARK_AS_ADVANCED(
GTK_gdk_LIBRARY
......@@ -184,3 +148,5 @@ IF(UNIX)
ENDIF(UNIX)
# - this module looks for gnuplot
#
# Once done this will define
#
# GNUPLOT_FOUND - system has Gnuplot
# GNUPLOT_EXECUTABLE - the Gnuplot executable
INCLUDE(FindCygwin)
FIND_PROGRAM(GNUPLOT
FIND_PROGRAM(GNUPLOT_EXECUTABLE
NAMES
gnuplot
pgnuplot
wgnupl32
PATH
PATHS
${CYGWIN_INSTALL_PATH}/bin
/bin
/usr/bin
/usr/local/bin
/sbin
)
MARK_AS_ADVANCED(
GNUPLOT
)
# for compatibility
SET(GNUPLOT ${GNUPLOT_EXECUTABLE})
# handle the QUIETLY and REQUIRED arguments and set GNUPLOT_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Gnuplot GNUPLOT_EXECUTABLE)
MARK_AS_ADVANCED( GNUPLOT_EXECUTABLE )
......@@ -22,21 +22,11 @@ FIND_PATH(HSPELL_INCLUDE_DIR hspell.h )
FIND_LIBRARY(HSPELL_LIBRARIES NAMES hspell )
IF (HSPELL_INCLUDE_DIR AND HSPELL_LIBRARIES)
SET(HSPELL_FOUND TRUE)
ELSE (HSPELL_INCLUDE_DIR AND HSPELL_LIBRARIES)
SET(HSPELL_FOUND FALSE)
ENDIF (HSPELL_INCLUDE_DIR AND HSPELL_LIBRARIES)
# handle the QUIETLY and REQUIRED arguments and set HSPELL_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(HSPELL HSPELL_LIBRARIES HSPELL_INCLUDE_DIR)
IF (HSPELL_FOUND)
IF (NOT HSPELL_FIND_QUIETLY)
MESSAGE(STATUS "Found HSPELL: ${HSPELL_LIBRARIES}")
ENDIF (NOT HSPELL_FIND_QUIETLY)
ELSE (HSPELL_FOUND)
IF (HSPELL_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could NOT find HSPELL")
ENDIF (HSPELL_FIND_REQUIRED)
ENDIF (HSPELL_FOUND)
MARK_AS_ADVANCED(HSPELL_INCLUDE_DIR HSPELL_LIBRARIES)
......@@ -8,28 +8,22 @@
# MPEG_vo_LIBRARY, where to find the vo library.
FIND_PATH(MPEG_INCLUDE_DIR mpeg2dec/include/video_out.h
/usr/local/include
/usr/include
/usr/local/livid
)
FIND_LIBRARY(MPEG_mpeg2_LIBRARY mpeg2
/usr/local/lib
/usr/lib
/usr/local/livid/mpeg2dec/libmpeg2/.libs
)
FIND_LIBRARY( MPEG_vo_LIBRARY vo
/usr/local/lib
/usr/lib
/usr/local/livid/mpeg2dec/libvo/.libs
)
SET( MPEG_FOUND "NO" )
IF(MPEG_INCLUDE_DIR)
IF(MPEG_mpeg2_LIBRARY)
SET( MPEG_FOUND "YES" )
SET( MPEG_LIBRARIES ${MPEG_mpeg2_LIBRARY} ${MPEG_vo_LIBRARY} )
ENDIF(MPEG_mpeg2_LIBRARY)
ENDIF(MPEG_INCLUDE_DIR)
# handle the QUIETLY and REQUIRED arguments and set MPEG2_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(MPEG MPEG_INCLUDE_DIR MPEG_mpeg2_LIBRARY)
IF(MPEG_FOUND)
SET( MPEG_LIBRARIES ${MPEG_mpeg2_LIBRARY} ${MPEG_vo_LIBRARY} )
ENDIF(MPEG_FOUND)
......@@ -8,36 +8,32 @@
# MPEG2_vo_LIBRARY, where to find the vo library.
FIND_PATH(MPEG2_INCLUDE_DIR mpeg2.h
/usr/local/include
/usr/include
/usr/local/livid
)
FIND_LIBRARY(MPEG2_mpeg2_LIBRARY mpeg2
/usr/local/lib
/usr/lib
/usr/local/livid/mpeg2dec/libmpeg2/.libs
)
FIND_LIBRARY( MPEG2_vo_LIBRARY vo
/usr/local/lib
/usr/lib
/usr/local/livid/mpeg2dec/libvo/.libs
)
SET( MPEG2_FOUND "NO" )
IF(MPEG2_INCLUDE_DIR)
IF(MPEG2_mpeg2_LIBRARY)
SET( MPEG2_FOUND "YES" )
SET( MPEG2_LIBRARIES ${MPEG2_mpeg2_LIBRARY}
${MPEG2_vo_LIBRARY})
#some native mpeg2 installations will depend
#on libSDL, if found, add it in.
INCLUDE( ${MODULE_PATH}/NewCMake/FindSDL.cmake )
IF(SDL_FOUND)
SET( MPEG2_LIBRARIES ${MPEG2_LIBRARIES} ${SDL_LIBRARY})
ENDIF(SDL_FOUND)
ENDIF(MPEG2_mpeg2_LIBRARY)
ENDIF(MPEG2_INCLUDE_DIR)
# handle the QUIETLY and REQUIRED arguments and set MPEG2_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(MPEG2 MPEG2_mpeg2_LIBRARY MPEG2_INCLUDE_DIR)
IF(MPEG2_FOUND)
SET( MPEG2_LIBRARIES ${MPEG2_mpeg2_LIBRARY}
${MPEG2_vo_LIBRARY})
#some native mpeg2 installations will depend
#on libSDL, if found, add it in.
INCLUDE( FindSDL.cmake )
IF(SDL_FOUND)
SET( MPEG2_LIBRARIES ${MPEG2_LIBRARIES} ${SDL_LIBRARY})
ENDIF(SDL_FOUND)
ENDIF(MPEG2_FOUND)
......@@ -5,28 +5,26 @@
# MOTIF_LIBRARIES - Link these to use Motif
SET(MOTIF_FOUND 0)
IF(UNIX)
FIND_PATH(MOTIF_INCLUDE_DIR
Xm/Xm.h
/usr/X11R6/include
/usr/local/include
/usr/openwin/include
/usr/include
)
FIND_LIBRARY(MOTIF_LIBRARIES
Xm
/usr/X11R6/lib
/usr/local/lib
/usr/openwin/lib
/usr/lib
)
IF(MOTIF_LIBRARIES AND MOTIF_INCLUDE_DIR)
SET(MOTIF_FOUND 1)
ENDIF(MOTIF_LIBRARIES AND MOTIF_INCLUDE_DIR)
ENDIF(UNIX)
# handle the QUIETLY and REQUIRED arguments and set MOTIF_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Motif MOTIF_LIBRARIES MOTIF_INCLUDE_DIR)
MARK_AS_ADVANCED(
MOTIF_INCLUDE_DIR
MOTIF_LIBRARIES
......
......@@ -14,20 +14,13 @@ FIND_PROGRAM(PERL_EXECUTABLE
${CYGWIN_INSTALL_PATH}/bin
)
MARK_AS_ADVANCED(
PERL_EXECUTABLE
)
IF (NOT PERL_EXECUTABLE)
SET(PERL_FOUND "NO")
ELSE (NOT PERL_EXECUTABLE)
SET(PERL_FOUND "YES")
# Deprecated settings for compatibility with CMake1.4
SET (PERL ${PERL_EXECUTABLE})
ENDIF (NOT PERL_EXECUTABLE)
# Deprecated settings for compatibility with CMake1.4
SET (PERL ${PERL_EXECUTABLE})
# handle the QUIETLY and REQUIRED arguments and set PERL_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Perl PERL_EXECUTABLE)
IF (NOT PERL_FOUND AND Perl_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find Perl")
ENDIF (NOT PERL_FOUND AND Perl_FIND_REQUIRED)
MARK_AS_ADVANCED( PERL_EXECUTABLE )
......@@ -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)
......@@ -16,9 +16,6 @@ FIND_PATH(PIKE_INCLUDE_PATH program.h
FIND_PROGRAM(PIKE_EXECUTABLE
NAMES pike7.4
PATHS
/usr/bin
/usr/local/bin
)
MARK_AS_ADVANCED(
......
......@@ -10,110 +10,53 @@
#
INCLUDE(CMakeFindFrameworks)
# Search for the python framework on Apple.
CMAKE_FIND_FRAMEWORKS(Python)
FOREACH(_CURRENT_VERSION 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5)
STRING(REPLACE "." "" _CURRENT_VERSION_NO_DOTS ${_CURRENT_VERSION})
IF(WIN32)
FIND_LIBRARY(PYTHON_DEBUG_LIBRARY
NAMES python${_CURRENT_VERSION_NO_DOTS}_d python
PATHS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs/Debug
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs )
ENDIF(WIN32)
IF(WIN32)
FIND_LIBRARY(PYTHON_DEBUG_LIBRARY
NAMES python25_d python24_d python23_d python22_d python21_d python20_d python
FIND_LIBRARY(PYTHON_LIBRARY
NAMES python${_CURRENT_VERSION_NO_DOTS} python${_CURRENT_VERSION}
PATHS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath]/libs/Debug
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath]/libs
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath]/libs/Debug
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath]/libs
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath]/libs/Debug
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath]/libs
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.2\\InstallPath]/libs/Debug
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.2\\InstallPath]/libs
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.1\\InstallPath]/libs/Debug
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.1\\InstallPath]/libs
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.0\\InstallPath]/libs/Debug
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.0\\InstallPath]/libs
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\1.6\\InstallPath]/libs/Debug
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\1.6\\InstallPath]/libs