cmake_modules/FindOggVorbis.cmake
changeset 5169 e353ca78d28b
parent 2609 b67624c7d61e
child 8660 6370e545fd5f
equal deleted inserted replaced
5168:8a074a255af0 5169:e353ca78d28b
    16 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
    16 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
    17 
    17 
    18 
    18 
    19 include (CheckLibraryExists)
    19 include (CheckLibraryExists)
    20 find_path(VORBIS_INCLUDE_DIR vorbis/vorbisfile.h)
    20 find_path(VORBIS_INCLUDE_DIR vorbis/vorbisfile.h)
    21 #  [koda] (for Hedgewars) added libraries with capital names for compatibility with Mac frameworks
       
    22 
    21 
    23 find_library(OGG_LIBRARY NAMES ogg)
    22 find_library(OGG_LIBRARY NAMES ogg)
    24 find_library(VORBIS_LIBRARY NAMES vorbis)
    23 find_library(VORBIS_LIBRARY NAMES vorbis)
    25 find_library(VORBISFILE_LIBRARY NAMES vorbisfile)
    24 find_library(VORBISFILE_LIBRARY NAMES vorbisfile)
       
    25 if(APPLE AND NOT VORBISFILE_LIBRARY)
       
    26 #  [koda] (for Hedgewars) frameworks don't come with libvorbisfile
       
    27    set(VORBISFILE_LIBRARY "${VORBIS_LIBRARY}")
       
    28 endif()
    26 
    29 
    27 if (OGG_LIBRARY AND VORBIS_LIBRARY AND VORBISFILE_LIBRARY)
    30 if (OGG_LIBRARY AND VORBIS_LIBRARY AND VORBISFILE_LIBRARY)
    28    set(OGGVORBIS_FOUND TRUE)
    31    set(OGGVORBIS_FOUND TRUE)
    29 #  [sommer] (for SuperTux) reversed order of libraries, so that cmake 2.4.5 for Windows generates an MSYS Makefile that will link correctly
    32 #  [sommer] (for SuperTux) reversed order of libraries, so that cmake 2.4.5 for Windows generates an MSYS Makefile that will link correctly
    30 #  set(OGGVORBIS_LIBRARIES ${OGG_LIBRARY} ${VORBIS_LIBRARY} ${VORBISFILE_LIBRARY})
    33 #  set(OGGVORBIS_LIBRARIES ${OGG_LIBRARY} ${VORBIS_LIBRARY} ${VORBISFILE_LIBRARY})