FindSDL*: use FPHSA (#12467)

This commit is contained in:
Rolf Eike Beer 2012-02-11 17:08:51 +01:00
parent 677047dda0
commit a6de8a5882
6 changed files with 18 additions and 26 deletions

View File

@ -81,7 +81,6 @@ FIND_PATH(SDL_INCLUDE_DIR SDL.h
/opt/csw # Blastwave
/opt
)
#MESSAGE("SDL_INCLUDE_DIR is ${SDL_INCLUDE_DIR}")
# SDL-1.1 is the name used by FreeBSD ports...
# don't confuse it for the version number.
@ -97,8 +96,6 @@ FIND_LIBRARY(SDL_LIBRARY_TEMP
/opt
)
#MESSAGE("SDL_LIBRARY_TEMP is ${SDL_LIBRARY_TEMP}")
IF(NOT SDL_BUILDING_LIBRARY)
IF(NOT ${SDL_INCLUDE_DIR} MATCHES ".framework")
# Non-OS X framework versions expect you to also dynamically link to
@ -134,7 +131,6 @@ IF(MINGW)
SET(MINGW32_LIBRARY mingw32 CACHE STRING "mwindows for MinGW")
ENDIF(MINGW)
SET(SDL_FOUND "NO")
IF(SDL_LIBRARY_TEMP)
# For SDLmain
IF(NOT SDL_BUILDING_LIBRARY)
@ -169,9 +165,9 @@ IF(SDL_LIBRARY_TEMP)
SET(SDL_LIBRARY ${SDL_LIBRARY_TEMP} CACHE STRING "Where the SDL Library can be found")
# Set the temp variable to INTERNAL so it is not seen in the CMake GUI
SET(SDL_LIBRARY_TEMP "${SDL_LIBRARY_TEMP}" CACHE INTERNAL "")
SET(SDL_FOUND "YES")
ENDIF(SDL_LIBRARY_TEMP)
#MESSAGE("SDL_LIBRARY is ${SDL_LIBRARY}")
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL
REQUIRED_VARS SDL_LIBRARY SDL_INCLUDE_DIR)

View File

@ -68,8 +68,7 @@ FIND_LIBRARY(SDLIMAGE_LIBRARY
/opt
)
SET(SDLIMAGE_FOUND "NO")
IF(SDLIMAGE_LIBRARY AND SDLIMAGE_INCLUDE_DIR)
SET(SDLIMAGE_FOUND "YES")
ENDIF(SDLIMAGE_LIBRARY AND SDLIMAGE_INCLUDE_DIR)
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDLIMAGE
REQUIRED_VARS SDLIMAGE_LIBRARY SDLIMAGE_INCLUDE_DIR)

View File

@ -68,8 +68,7 @@ FIND_LIBRARY(SDLMIXER_LIBRARY
/opt
)
SET(SDLMIXER_FOUND "NO")
IF(SDLMIXER_LIBRARY AND SDLMIXER_INCLUDE_DIR)
SET(SDLMIXER_FOUND "YES")
ENDIF(SDLMIXER_LIBRARY AND SDLMIXER_INCLUDE_DIR)
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDLMIXER
REQUIRED_VARS SDLMIXER_LIBRARY SDLMIXER_INCLUDE_DIR)

View File

@ -67,8 +67,7 @@ FIND_LIBRARY(SDLNET_LIBRARY
/opt
)
SET(SDLNET_FOUND "NO")
IF(SDLNET_LIBRARY AND SDLNET_INCLUDE_DIR)
SET(SDLNET_FOUND "YES")
ENDIF(SDLNET_LIBRARY AND SDLNET_INCLUDE_DIR)
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDLNET
REQUIRED_VARS SDLNET_LIBRARY SDLNET_INCLUDE_DIR)

View File

@ -114,7 +114,6 @@ FIND_LIBRARY(SDL_SOUND_LIBRARY
/opt/lib
)
SET(SDL_SOUND_FOUND "NO")
IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
# CMake is giving me problems using TRY_COMPILE with the CMAKE_FLAGS
@ -414,8 +413,9 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
ENDIF(NOT MY_RESULT)
SET(SDL_SOUND_LIBRARIES "${SDL_SOUND_EXTRAS} ${SDL_SOUND_LIBRARIES_TMP}" CACHE INTERNAL "SDL_sound and dependent libraries")
SET(SDL_SOUND_FOUND "YES")
ENDIF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
# MESSAGE("SDL_SOUND_LIBRARIES is ${SDL_SOUND_LIBRARIES}")
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL_SOUND
REQUIRED_VARS SDL_SOUND_LIBRARIES SDL_SOUND_INCLUDE_DIR)

View File

@ -68,8 +68,7 @@ FIND_LIBRARY(SDLTTF_LIBRARY
PATH_SUFFIXES lib64 lib
)
SET(SDLTTF_FOUND "NO")
IF(SDLTTF_LIBRARY AND SDLTTF_INCLUDE_DIR)
SET(SDLTTF_FOUND "YES")
ENDIF(SDLTTF_LIBRARY AND SDLTTF_INCLUDE_DIR)
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDLTTF
REQUIRED_VARS SDLTTF_LIBRARY SDLTTF_INCLUDE_DIR)