From 44ec8ece0ddaf7f6fe18031a44be5c53fe6fa92b Mon Sep 17 00:00:00 2001 From: Rovanion Luckey Date: Tue, 10 Feb 2015 14:28:26 +0100 Subject: [PATCH] Removed the unsetting of ${libPortAudioCpp} I was trying to use your cmake-file for one of my projects, though it didn't find the cpp-library correctly. Took a quick peek in the file and found that the variable was unset quickly after it was set and just before it was used. This pull request corrects this. --- CmakeIncludes/FindPortAudio.cmake | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/CmakeIncludes/FindPortAudio.cmake b/CmakeIncludes/FindPortAudio.cmake index b927a648d..63d093f1b 100644 --- a/CmakeIncludes/FindPortAudio.cmake +++ b/CmakeIncludes/FindPortAudio.cmake @@ -15,16 +15,14 @@ find_path(PORTAUDIO_INCLUDE_DIR portaudio.h ) - -# finally the library itself +# Finally the library itself. find_library(libPortAudio NAMES portaudio) find_library(libPortAudioCpp NAMES portaudiocpp) -set(libPortAudioCpp "") set(PORTAUDIO_LIBRARIES ${libPortAudio} ${libPortAudioCpp}) -# handle the QUIETLY and REQUIRED arguments and set PORTAUDIO_FOUND to TRUE if -# all listed variables are TRUE +# Handle the QUIETLY and REQUIRED arguments and set PORTAUDIO_FOUND to TRUE if +# all listed variables are TRUE. include(FindPackageHandleStandardArgs) find_package_handle_standard_args(PortAudio DEFAULT_MSG PORTAUDIO_LIBRARIES PORTAUDIO_INCLUDE_DIR) -mark_as_advanced(PORTAUDIO_LIBRARIES PORTAUDIO_INCLUDE_DIR) \ No newline at end of file +mark_as_advanced(PORTAUDIO_LIBRARIES PORTAUDIO_INCLUDE_DIR)