- added more deps to build static

This commit is contained in:
Mark Vejvoda
2011-11-30 05:10:04 +00:00
parent 598421fe3f
commit 99f8c23422
6 changed files with 65 additions and 8 deletions

View File

@@ -6,6 +6,11 @@
# VORBIS_FILE_LIBRARY
#
OPTION(WANT_STATIC_LIBS "builds as many static libs as possible" OFF)
IF(WANT_STATIC_LIBS)
OPTION(OGG_STATIC "Set to ON to link your project with static library (instead of DLL)." ON)
ENDIF()
# check for cache to avoid littering log
IF(OGG_INCLUDE_DIR AND OGG_LIBRARY AND VORBIS_LIBRARY)
SET(OGG_BE_QUIET TRUE)
@@ -13,13 +18,29 @@ ENDIF(OGG_INCLUDE_DIR AND OGG_LIBRARY AND VORBIS_LIBRARY)
FIND_PATH(OGG_INCLUDE_DIR ogg/ogg.h)
FIND_LIBRARY(OGG_LIBRARY NAMES ogg)
FIND_LIBRARY(VORBIS_LIBRARY NAMES vorbis)
#IF (OGG_STATIC AND NOT OGG_LIBRARY)
# FIND_LIBRARY(OGG_LIBRARY NAMES libogg.a ogg)
#ELSE()
FIND_LIBRARY(OGG_LIBRARY NAMES ogg)
#ENDIF()
#IF (OGG_STATIC AND NOT VORBIS_LIBRARY)
# FIND_LIBRARY(VORBIS_LIBRARY NAMES libvorbis.a vorbis)
#ELSE()
FIND_LIBRARY(VORBIS_LIBRARY NAMES vorbis)
#ENDIF()
#on macosx the vorbisfile library is part of the vorbisone...
#IF(NOT APPLE)
# comment above is full of lies
#IF (OGG_STATIC AND NOT VORBIS_FILE_LIBRARY)
# FIND_LIBRARY(VORBIS_FILE_LIBRARY NAMES libvorbisfile.a vorbisfile)
#ELSE()
FIND_LIBRARY(VORBIS_FILE_LIBRARY NAMES vorbisfile)
#ENDIF()
#ENDIF(NOT APPLE)
IF(OGG_INCLUDE_DIR AND OGG_LIBRARY AND VORBIS_LIBRARY AND (APPLE OR VORBIS_FILE_LIBRARY))