# force this include dir no matter what, so we get sane headers.
include_directories("${DEPDIR}/OpenGL")
-option (LUGARU_FORCE_INTERNAL_OPENAL)
+option (LUGARU_FORCE_INTERNAL_OPENAL "Force internal OpenAL, even if theer's a system version" False)
if (NOT LUGARU_FORCE_INTERNAL_OPENAL)
find_package(OpenAL REQUIRED)
+else(NOT LUGARU_FORCE_INTERNAL_OPENAL)
+ set(OPENAL_FOUND False)
endif (NOT LUGARU_FORCE_INTERNAL_OPENAL)
if (NOT OPENAL_FOUND)
option (LUGARU_FORCE_INTERNAL_SDL "Force internal libSDL, even if there's a system version" False)
if (NOT LUGARU_FORCE_INTERNAL_SDL)
find_package(SDL)
+else(NOT LUGARU_FORCE_INTERNAL_SDL)
+ set(SDL_FOUND False)
endif (NOT LUGARU_FORCE_INTERNAL_SDL)
+
if (NOT SDL_FOUND)
message(STATUS "Using internal copy of SDL")
set(LUGARU_MISSING_DEPS "${LUGARU_MISSING_DEPS} SDL")
option (LUGARU_FORCE_INTERNAL_PNG "Force internal libPNG, even if there's a system version" False)
if (NOT LUGARU_FORCE_INTERNAL_PNG)
find_package(PNG)
+else(NOT LUGARU_FORCE_INTERNAL_PNG)
+ set(PNG_FOUND False)
endif (NOT LUGARU_FORCE_INTERNAL_PNG)
+
if (NOT PNG_FOUND)
message(STATUS "Using internal copy of libpng")
set(LUGARU_MISSING_DEPS "${LUGARU_MISSING_DEPS} PNG")
option (LUGARU_FORCE_INTERNAL_JPEG "Force internal libJPEG, even if there's a system version" False)
if (NOT LUGARU_FORCE_INTERNAL_JPEG)
find_package(JPEG)
+else(NOT LUGARU_FORCE_INTERNAL_JPEG)
+ set(JPEG_FOUND False)
endif (NOT LUGARU_FORCE_INTERNAL_JPEG)
+
if (NOT JPEG_FOUND)
message(STATUS "Using internal copy of libjpeg")
set(LUGARU_MISSING_DEPS "${LUGARU_MISSING_DEPS} JPEG")
option (LUGARU_FORCE_INTERNAL_ZLIB "Force internal zlib, even if there's a system version" False)
if (NOT LUGARU_FORCE_INTERNAL_ZLIB)
find_package(ZLIB)
+else(NOT LUGARU_FORCE_INTERNAL_ZLIB)
+ set(ZLIB_FOUND False)
endif (NOT LUGARU_FORCE_INTERNAL_ZLIB)
+
if (NOT ZLIB_FOUND)
message(STATUS "Using internal copy of zlib")
set(LUGARU_MISSING_DEPS "${LUGARU_MISSING_DEPS} ZLIB")
endif (NOT ZLIB_FOUND)
option (LUGARU_FORCE_INTERNAL_GLU "Force internal libGLU, even if there's a system version" False)
-if (NOT LUGARU_FORCE_INTERNAL_GLU)
- find_package(GLU)
-endif (NOT LUGARU_FORCE_INTERNAL_GLU)
-if (NOT GLU_FOUND)
+if (LUGARU_FORCE_INTERNAL_GLU)
+ set(OPENGL_GLU_FOUND False)
+endif (LUGARU_FORCE_INTERNAL_GLU)
+
+if (NOT OPENGL_GLU_FOUND)
message(STATUS "Using internal copy of libGLU")
set(LUGARU_MISSING_DEPS "${LUGARU_MISSING_DEPS} GLU")
set(GLUDIR "${DEPDIR}/GLU")
${GLUDIR}/tessmono.c
${GLUDIR}/util.c
)
-endif (NOT GLU_FOUND)
+endif (NOT OPENGL_GLU_FOUND)
option (LUGARU_FORCE_INTERNAL_VORBIS "Force internal Vorbis, even if there's a system version" False)
if (NOT LUGARU_FORCE_INTERNAL_VORBIS)
find_package(OggVorbis)
+else(NOT LUGARU_FORCE_INTERNAL_VORBIS)
+ set(OGGVORBIS_FOUND False)
endif (NOT LUGARU_FORCE_INTERNAL_VORBIS)
-if (NOT OggVorbis_FOUND)
+
+if (NOT OGGVORBIS_FOUND)
message(STATUS "Using internal copy of Ogg Vorbis")
set(LUGARU_MISSING_DEPS "${LUGARU_MISSING_DEPS} OggVorbis")
set(OGGDIR "${DEPDIR}/libogg")
${VORBISDIR}/lib/vorbisfile.c
${VORBISDIR}/lib/window.c
)
-endif (NOT OggVorbis_FOUND)
+endif (NOT OGGVORBIS_FOUND)
include_directories(
${OPENAL_INCLUDE_DIR}