FindSDL: Add "cmake_minimum_required" to "try_compile" project

This commit is contained in:
Benjamin Eikel 2012-09-04 15:43:07 +02:00 committed by Brad King
parent 2c3b8255c5
commit a5194e2ffb
1 changed files with 2 additions and 1 deletions

View File

@ -176,7 +176,8 @@ if(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
# in the SDL_LIBRARY string after the "-framework".
# But if I quote the stuff in INCLUDE_DIRECTORIES, it doesn't work.
file(WRITE ${PROJECT_BINARY_DIR}/CMakeTmp/CMakeLists.txt
"project(DetermineSoundLibs)
"cmake_minimum_required(VERSION 2.8)
project(DetermineSoundLibs)
include_directories(${SDL_INCLUDE_DIR} ${SDL_SOUND_INCLUDE_DIR})
add_executable(DetermineSoundLibs DetermineSoundLibs.c)
target_link_libraries(DetermineSoundLibs ${TMP_TRY_LIBS})"