$NetBSD: patch-CMakeLists.txt,v 1.1 2013/03/29 03:12:05 othyro Exp $

Truly make some PKG_OPTIONS optional and remove unused OPENAL_INCLUDES variable.

--- CMakeLists.txt.orig	2013-02-27 21:33:03.000000000 +0000
+++ CMakeLists.txt
@@ -9,6 +9,8 @@ option(OpenGL "Build OpenGL renderer" of
 option(VDP32 "Use 32 bit colors instead 16 bit" off)
 option(Didj "Build the client to work with the Leapfrog didj" off)
 option(Debug "Build a binary that has extra debugging output" off)
+option(BZip2 "Enable support for loading ROMs compressed with bzip2" off)
+option(ZLIB "Build the client with zlib support" off)
 
 if(Debug)
     set(CRAB_DEFINES ${CRAB_DEFINES} -DDEBUG)
@@ -20,19 +22,26 @@ if(SDL)
     find_package(SDL_ttf REQUIRED)
 endif(SDL)
 
-find_package(BZip2)
-find_package(ZLIB)
-
-if(NOT BZIP2_FOUND)
-    add_definitions(-DNO_BZ2)
+if(BZip2)
+	find_package(BZip2)
+	if(NOT BZIP2_FOUND)
+		add_definitions(-DNO_BZ2)
+	else()
+		set(CRAB_LIBRARIES ${CRAB_LIBRARIES} ${BZIP2_LIBRARIES})
+	endif()
 else()
-    set(CRAB_LIBRARIES ${CRAB_LIBRARIES} ${BZIP2_LIBRARIES})
+	add_definitions(-DNO_BZ2)
 endif()
 
-if(NOT ZLIB_FOUND)
-    add_definitions(-DNO_ZLIB)
+if(ZLIB)
+	find_package(ZLIB)
+	if(NOT ZLIB_FOUND)
+		add_definitions(-DNO_ZLIB)
+	else()
+		set(CRAB_LIBRARIES ${CRAB_LIBRARIES} ${ZLIB_LIBRARIES})
+	endif()
 else()
-    set(CRAB_LIBRARIES ${CRAB_LIBRARIES} ${ZLIB_LIBRARIES})
+	add_definitions(-DNO_ZLIB)
 endif()
 
 if(OpenGL)
@@ -55,7 +64,6 @@ set(SRCDIR ${CMAKE_SOURCE_DIR}/src)
 
 include_directories(
     ${SDL_INCLUDE_DIR}
-    ${OPENAL_INCLUDES}
     ${OPENGL_INCLUDE_DIR}
     ${SRCDIR}
     ${SRCDIR}/consoles/colecovision
