-# force this include dir no matter what, so we get sane headers.
-set(OPENGL_INCLUDE_DIR "${DEPDIR}/OpenGL")
-
-find_package(OpenAL REQUIRED) # !!! FIXME: package a .dll for Windows?
-
-find_package(SDL)
-if (NOT SDL)
- set(LUGARU_MISSING_DEPS "${LUGARU_MISSING_DEPS} SDL")
- message(STATUS "SDL not found, using internal copy")
- set(SDLDIR "${DEPDIR}/SDL12")
- set(SDL_INCLUDE_DIR "${SDLDIR}/include")
- set(SDL_LIBRARY "")
- if (APPLE)
- set(LUGARU_HAS_INTERNAL_SDL True)
- set(SDL_LIBRARY
- ${SDLDIR}/lib/macosx/libSDL-1.2.0.dylib
- ${SDLDIR}/lib/macosx/libSDLmain-osx.a
- )
- endif (APPLE)
-
- if (WINDOWS)
- set(LUGARU_HAS_INTERNAL_SDL True)
- set(SDL_LIBRARY
- ${SDLDIR}/lib/win32/SDL.lib
- ${SDLDIR}/lib/win32/SDLmain.lib
- )
- endif (WINDOWS)
-
- if (NOT LUGARU_HAS_INTERNAL_SDL)
- message(ERROR "We don't have a prebuilt SDL for this platform.")
- endif (NOT LUGARU_HAS_INTERNAL_SDL)
-endif (NOT SDL)
-
-find_package(PNG)
-if (NOT PNG)
- set(LUGARU_MISSING_DEPS "${LUGARU_MISSING_DEPS} PNG")
- message(STATUS "libpng not found, using internal copy")
- set(PNGDIR "${DEPDIR}/libpng")
- set(PNG_INCLUDE_DIR "${PNGDIR}")
- set(PNG_LIBRARY "")
- set(LUGARU_SRCS
- ${LUGARU_SRCS}
- ${PNGDIR}/png.c
- ${PNGDIR}/pngerror.c
- ${PNGDIR}/pngget.c
- ${PNGDIR}/pngmem.c
- ${PNGDIR}/pngpread.c
- ${PNGDIR}/pngread.c
- ${PNGDIR}/pngrio.c
- ${PNGDIR}/pngrtran.c
- ${PNGDIR}/pngrutil.c
- ${PNGDIR}/pngset.c
- ${PNGDIR}/pngtrans.c
- ${PNGDIR}/pngwio.c
- ${PNGDIR}/pngwrite.c
- ${PNGDIR}/pngwtran.c
- ${PNGDIR}/pngwutil.c
- )
-endif (NOT PNG)
-
-find_package(JPEG)
-if (NOT JPEG)
- set(LUGARU_MISSING_DEPS "${LUGARU_MISSING_DEPS} JPEG")
- message(STATUS "libjpeg not found, using internal copy")
- set(JPEGDIR "${DEPDIR}/libjpeg")
- set(JPEG_INCLUDE_DIR "${JPEGDIR}")
- set(JPEG_LIBRARY "")
- set(LUGARU_SRCS
- ${LUGARU_SRCS}
- ${JPEGDIR}/jdapistd.c
- ${JPEGDIR}/jdmaster.c
- ${JPEGDIR}/jdapimin.c
- ${JPEGDIR}/jcapimin.c
- ${JPEGDIR}/jdmerge.c
- ${JPEGDIR}/jdatasrc.c
- ${JPEGDIR}/jdatadst.c
- ${JPEGDIR}/jdcoefct.c
- ${JPEGDIR}/jdcolor.c
- ${JPEGDIR}/jddctmgr.c
- ${JPEGDIR}/jdhuff.c
- ${JPEGDIR}/jdinput.c
- ${JPEGDIR}/jdmainct.c
- ${JPEGDIR}/jdmarker.c
- ${JPEGDIR}/jdpostct.c
- ${JPEGDIR}/jdsample.c
- ${JPEGDIR}/jdtrans.c
- ${JPEGDIR}/jerror.c
- ${JPEGDIR}/jidctflt.c
- ${JPEGDIR}/jidctfst.c
- ${JPEGDIR}/jidctint.c
- ${JPEGDIR}/jmemmgr.c
- ${JPEGDIR}/jutils.c
- ${JPEGDIR}/jmemnobs.c
- ${JPEGDIR}/jquant1.c
- ${JPEGDIR}/jquant2.c
- ${JPEGDIR}/jcomapi.c
- ${JPEGDIR}/jcmarker.c
- ${JPEGDIR}/jcapistd.c
- ${JPEGDIR}/jcparam.c
- ${JPEGDIR}/jcinit.c
- ${JPEGDIR}/jcdctmgr.c
- ${JPEGDIR}/jccoefct.c
- ${JPEGDIR}/jcmainct.c
- ${JPEGDIR}/jfdctflt.c
- ${JPEGDIR}/jfdctint.c
- ${JPEGDIR}/jfdctfst.c
- ${JPEGDIR}/jchuff.c
- ${JPEGDIR}/jcsample.c
- ${JPEGDIR}/jcmaster.c
- ${JPEGDIR}/jccolor.c
- ${JPEGDIR}/jcprepct.c
- ${JPEGDIR}/jcarith.c
- ${JPEGDIR}/jdarith.c
- ${JPEGDIR}/jaricom.c
- )
-endif (NOT JPEG)
-
-find_package(ZLIB)
-if (NOT ZLIB)
- set(LUGARU_MISSING_DEPS "${LUGARU_MISSING_DEPS} ZLIB")
- message(STATUS "zlib not found, using internal copy")
- set(ZLIBDIR "${DEPDIR}/zlib")
- set(ZLIB_INCLUDE_DIR "${ZLIBDIR}")
- set(ZLIB_LIBRARIES "")
- set(LUGARU_SRCS
- ${LUGARU_SRCS}
- ${ZLIBDIR}/adler32.c
- ${ZLIBDIR}/compress.c
- ${ZLIBDIR}/crc32.c
- ${ZLIBDIR}/deflate.c
- ${ZLIBDIR}/infback.c
- ${ZLIBDIR}/inffast.c
- ${ZLIBDIR}/inflate.c
- ${ZLIBDIR}/inftrees.c
- ${ZLIBDIR}/trees.c
- ${ZLIBDIR}/uncompr.c
- ${ZLIBDIR}/zutil.c
- )
-endif (NOT ZLIB)
-
-find_package(GLU)
-if (NOT GLU)
- set(LUGARU_MISSING_DEPS "${LUGARU_MISSING_DEPS} GLU")
- message(STATUS "GLU not found, using internal copy")
- set(GLUDIR "${DEPDIR}/GLU")
- set(GLU_INCLUDE_DIR "${GLUDIR}")
- set(GLU_LIBRARY "")
- set(LUGARU_SRCS
- ${LUGARU_SRCS}
- ${GLUDIR}/dict.c
- ${GLUDIR}/geom.c
- ${GLUDIR}/memalloc.c
- ${GLUDIR}/mesh.c
- ${GLUDIR}/mipmap.c
- ${GLUDIR}/normal.c
- ${GLUDIR}/priorityq.c
- ${GLUDIR}/render.c
- ${GLUDIR}/sweep.c
- ${GLUDIR}/tess.c
- ${GLUDIR}/tessmono.c
- ${GLUDIR}/util.c
- )
-endif (NOT GLU)
-
-find_package(OggVorbis)
-if (NOT OggVorbis)
- set(LUGARU_MISSING_DEPS "${LUGARU_MISSING_DEPS} OggVorbis")
- message(STATUS "Ogg Vorbis not found, using internal copy")
- set(OGGDIR "${DEPDIR}/libogg")
- set(OGG_INCLUDE_DIR "${OGGDIR}/include")
- set(OGG_LIBRARY "")
- set(VORBISDIR "${DEPDIR}/libvorbis")
- set(VORBISFILE_INCLUDE_DIR "${VORBISDIR}/include")
- set(VORBISFILE_LIBRARY "")
- set(LUGARU_SRCS
- ${LUGARU_SRCS}
- ${OGGDIR}/src/bitwise.c
- ${OGGDIR}/src/framing.c
- ${VORBISDIR}/lib/analysis.c
- ${VORBISDIR}/lib/bitrate.c
- ${VORBISDIR}/lib/block.c
- ${VORBISDIR}/lib/codebook.c
- ${VORBISDIR}/lib/envelope.c
- ${VORBISDIR}/lib/floor0.c
- ${VORBISDIR}/lib/floor1.c
- ${VORBISDIR}/lib/info.c
- ${VORBISDIR}/lib/lpc.c
- ${VORBISDIR}/lib/lsp.c
- ${VORBISDIR}/lib/mapping0.c
- ${VORBISDIR}/lib/mdct.c
- ${VORBISDIR}/lib/psy.c
- ${VORBISDIR}/lib/registry.c
- ${VORBISDIR}/lib/res0.c
- ${VORBISDIR}/lib/sharedbook.c
- ${VORBISDIR}/lib/smallft.c
- ${VORBISDIR}/lib/synthesis.c
- ${VORBISDIR}/lib/vorbisfile.c
- ${VORBISDIR}/lib/window.c
- )
-endif (NOT OggVorbis)