cmake_modules/FindOggVorbis.cmake
changeset 2400 2422ea85d100
parent 2395 d01d3bf3e1de
child 2437 10e4b5fc0d93
equal deleted inserted replaced
2399:ddde0ac1472b 2400:2422ea85d100
    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 find_library(OGG_LIBRARY NAMES ogg)
    21 #  [koda] (for Hedgewars) added libraries with capital names for compatibility with Mac frameworks
    22 find_library(VORBIS_LIBRARY NAMES vorbis)
    22 find_library(OGG_LIBRARY NAMES ogg Ogg)
    23 find_library(VORBISFILE_LIBRARY NAMES vorbisfile)
    23 find_library(VORBIS_LIBRARY NAMES vorbis Vorbis)
       
    24 find_library(VORBISFILE_LIBRARY NAMES vorbisfile Vorbis)
    24 if (OGG_LIBRARY AND VORBIS_LIBRARY AND VORBISFILE_LIBRARY)
    25 if (OGG_LIBRARY AND VORBIS_LIBRARY AND VORBISFILE_LIBRARY)
    25    set(OGGVORBIS_FOUND TRUE)
    26    set(OGGVORBIS_FOUND TRUE)
    26 #  [sommer] (for SuperTux) reversed order of libraries, so that cmake 2.4.5 for Windows generates an MSYS Makefile that will link correctly
    27 #  [sommer] (for SuperTux) reversed order of libraries, so that cmake 2.4.5 for Windows generates an MSYS Makefile that will link correctly
    27 #  set(OGGVORBIS_LIBRARIES ${OGG_LIBRARY} ${VORBIS_LIBRARY} ${VORBISFILE_LIBRARY})
    28 #  set(OGGVORBIS_LIBRARIES ${OGG_LIBRARY} ${VORBIS_LIBRARY} ${VORBISFILE_LIBRARY})
    28    set(OGGVORBIS_LIBRARIES ${VORBISFILE_LIBRARY} ${VORBIS_LIBRARY} ${OGG_LIBRARY})
    29    set(OGGVORBIS_LIBRARIES ${VORBISFILE_LIBRARY} ${VORBIS_LIBRARY} ${OGG_LIBRARY})