diff options
author | Brad King <brad.king@kitware.com> | 2016-11-09 14:49:56 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-11-09 14:49:56 (GMT) |
commit | e2565be52c7d80a4993c749282210e5b599cbc32 (patch) | |
tree | 452c4c3e0c4260bb25237873a6e53c68a458a8d0 /Modules | |
parent | 72190b923bd19bc9f9bddc6958ebb0cec28a5b98 (diff) | |
parent | f18b18b72b8f7f8dc21e350f4dd1c6931cdb389f (diff) | |
download | CMake-e2565be52c7d80a4993c749282210e5b599cbc32.zip CMake-e2565be52c7d80a4993c749282210e5b599cbc32.tar.gz CMake-e2565be52c7d80a4993c749282210e5b599cbc32.tar.bz2 |
Merge topic 'FindSDL_preventGrowingCacheVar'
f18b18b7 FindSDL: Prevent unbounded growth of SDL_LIBRARY_TEMP variable
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindSDL.cmake | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Modules/FindSDL.cmake b/Modules/FindSDL.cmake index 4e4411f..3410018 100644 --- a/Modules/FindSDL.cmake +++ b/Modules/FindSDL.cmake @@ -94,6 +94,11 @@ find_library(SDL_LIBRARY_TEMP PATH_SUFFIXES lib ${VC_LIB_PATH_SUFFIX} ) +# Hide this cache variable from the user, it's an internal implementation +# detail. The documented library variable for the user is SDL_LIBRARY +# which is derived from SDL_LIBRARY_TEMP further below. +set_property(CACHE SDL_LIBRARY_TEMP PROPERTY TYPE INTERNAL) + if(NOT SDL_BUILDING_LIBRARY) if(NOT SDL_INCLUDE_DIR MATCHES ".framework") # Non-OS X framework versions expect you to also dynamically link to @@ -162,8 +167,6 @@ if(SDL_LIBRARY_TEMP) # Set the final string here so the GUI reflects the final state. 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 "") endif() if(SDL_INCLUDE_DIR AND EXISTS "${SDL_INCLUDE_DIR}/SDL_version.h") |