Przeglądaj źródła

CMake: Configure: Cleanup the packages which haven't been implemented yet, and other config settings.

kestred 12 lat temu
rodzic
commit
eb947cc15a
1 zmienionych plików z 139 dodań i 369 usunięć
  1. 139 369
      dtool/Configure.cmake

+ 139 - 369
dtool/Configure.cmake

@@ -87,396 +87,159 @@ config_package(VRPN)
 
 
 
-if(FOUND_ZLIB)
-	set(USE_ZLIB TRUE CACHE BOOL "If true, compile Panda3D with zlib")
-	if(USE_ZLIB)
-		set(HAVE_ZLIB TRUE)
-	endif()
-endif()
-if(HAVE_ZLIB)
-	message(STATUS "+ zlib")
-else()
-	message(STATUS "- Did not find zlib")
-endif()
+########
+# TODO #
+########
 
-if(FOUND_RAD_MSS)
-	set(USE_RAD_MSS TRUE CACHE BOOL "If true, compile Panda3D with Miles Sound System")
-	if(USE_RAD_MSS)
-		set(HAVE_RAD_MSS TRUE)
-	endif()
-endif()
-if(HAVE_RAD_MSS)
-	message(STATUS "+ Miles Sound System")
-else()
-	message(STATUS "- Did not find Miles Sound System")
-endif()
+# Find and configure zlib
+#find_package(zlib)
+#config_package(ZLIB COMMENT "zlib")
 
-if(FOUND_FMODEX)
-	set(USE_FMODEX TRUE CACHE BOOL "If true, compile Panda3D with FMOD Ex sound library")
-	if(USE_FMODEX)
-		set(HAVE_FMODEX TRUE)
-	endif()
-endif()
-if(HAVE_FMODEX)
-	message(STATUS "+ FMOD Ex sound library")
-else()
-	message(STATUS "- Did not find FMOD Ex sound library")
-endif()
+# Find and configure Miles sound system
+#find_package(RAD_MSS)
+#config_package(RAD_MSS COMMENT "Miles Sound System")
 
-if(FOUND_OPENAL)
-	set(USE_OPENAL TRUE CACHE BOOL "If true, compile Panda3D with OpenAL sound library")
-	if(USE_OPENAL)
-		set(HAVE_OPENAL TRUE)
-	endif()
-endif()
-if(HAVE_OPENAL)
-	message(STATUS "+ OpenAL sound library")
-else()
-	message(STATUS "- Did not find OpenAL sound library")
-endif()
+# Find and configure FMOD Ex
+#find_package(FMODEX)
+#config_package(FMODEX COMMENT "FMOD Ex sound library")
 
-if(FOUND_PHYSX)
-	set(USE_PHYSX TRUE CACHE BOOL "If true, compile Panda3D with Aegia PhysX")
-	if(USE_PHYSX)
-		set(HAVE_PHYSX TRUE)
-	endif()
-endif()
-if(HAVE_PHYSX)
-	message(STATUS "+ Ageia PhysX")
-else()
-	message(STATUS "- Did not find Ageia PhysX")
-endif()
+# Find and configure OpenAL
+#find_package(OpenAL)
+#config_package(OPENAL COMMENT "OpenAL sound library")
 
-if(FOUND_SPEEDTREE)
-	set(USE_SPEEDTREE TRUE CACHE BOOL "If true, compile Panda3D with SpeedTree")
-	if(USE_SPEEDTREE)
-		set(HAVE_SPEEDTREE TRUE)
-	endif()
-endif()
-if(HAVE_SPEEDTREE)
-	message(STATUS "+ SpeedTree")
-else()
-	message(STATUS "- Did not find SpeedTree")
-endif()
+# Find and configure PhysX
+#find_package(PhysX)
+#config_package(PHYSX COMMENT "Aegia PhysX")
 
-if(FOUND_GTK)
-	set(USE_GTK TRUE CACHE BOOL "If true, compile Panda3D with gtk+-2")
-	if(USE_GTK)
-		set(HAVE_GTK TRUE)
-	endif()
-endif()
-if(HAVE_GTK)
-	message(STATUS "+ gtk+-2")
-else()
-	message(STATUS "- Did not find gtk+-2")
-endif()
+# Find and configure SpeedTree
+#find_package(SpeedTree)
+#config_package(SPEEDTREE COMMENT "SpeedTree")
 
-if(FOUND_FREETYPE)
-	set(USE_FREETYPE TRUE CACHE BOOL "If true, compile Panda3D with Freetype")
-	if(USE_FREETYPE)
-		set(HAVE_FREETYPE TRUE)
-	endif()
-endif()
-if(HAVE_FREETYPE)
-	message(STATUS "+ Freetype")
-else()
-	message(STATUS "- Did not find Freetype")
-endif()
+# Find and configure GTK
+#find_package(GTK)
+#config_package(GTK COMMENT "gtk+-2")
 
-if(FOUND_WX)
-	set(USE_WX TRUE CACHE BOOL "If true, compile Panda3D with WxWidgets")
-	if(USE_WX)
-		set(HAVE_WX TRUE)
-	endif()
-endif()
-if(HAVE_WX)
-	message(STATUS "+ WxWidgets")
-else()
-	message(STATUS "- Did not find WxWidgets")
-endif()
+# Find and configure Freetype
+#find_package(Freetype)
+#config_package(FREETYPE COMMENT "Freetype")
 
-if(FOUND_FLTK)
-	set(USE_FLTK TRUE CACHE BOOL "If true, compile Panda3D with FLTK")
-	if(USE_FLTK)
-		set(HAVE_FLTK TRUE)
-	endif()
-endif()
-if(HAVE_FLTK)
-	message(STATUS "+ FLTK")
-else()
-	message(STATUS "- Did not find FLTK")
-endif()
+# Find and configure WxWidgets
+#find_package(WxWidgets)
+#config_package(WX COMMENT "WxWidgets")
 
-if(FOUND_GL)
-	set(USE_GL TRUE CACHE BOOL "If true, compile Panda3D with OpenGL")
-	if(USE_GL)
-		set(HAVE_GL TRUE)
-	endif()
-endif()
-if(HAVE_GL)
-	message(STATUS "+ OpenGL")
-else()
-	message(STATUS "- Did not find OpenGL")
-endif()
+# Find and configure FLTK
+#find_package(FLTK)
+#config_package(FLTK)
 
-if(FOUND_GLES)
-	set(USE_GLES TRUE CACHE BOOL "If true, compile Panda3D with OpenGL ES 1")
-	if(USE_GLES)
-		set(HAVE_GLES TRUE)
-	endif()
-endif()
-if(HAVE_GLES)
-	message(STATUS "+ OpenGL ES 1")
-else()
-	message(STATUS "- Did not find OpenGL ES 1")
-endif()
+# Find and configure OpenGL
+#find_package(OpenGL)
+#config_package(OPENGL COMMENT "OpenGL")
 
-if(FOUND_GLES2)
-	set(USE_GLES2 TRUE CACHE BOOL "If true, compile Panda3D with OpenGL ES 2")
-	if(USE_GLES2)
-		set(HAVE_GLES2 TRUE)
-	endif()
-endif()
-if(HAVE_GLES2)
-	message(STATUS "+ OpenGL ES 2")
-else()
-	message(STATUS "- Did not find OpenGL ES 2")
-endif()
+# Find and configure OpenGL ES 1
+#find_package(GLES)
+#config_package(GLES COMMENT "OpenGL ES 1")
 
-if(FOUND_DX8)
-	set(USE_DX8 TRUE CACHE BOOL "If true, compile Panda3D with DirectX8")
-	if(USE_DX8)
-		set(HAVE_DX8 TRUE)
-	endif()
-endif()
-if(HAVE_DX8)
-	message(STATUS "+ DirectX8")
-else()
-	message(STATUS "- Did not find DirectX8")
-endif()
+# Find and configure OpenGL ES 2
+#find_package(GLES)
+#config_package(GLES COMMENT "OpenGL ES 2")
 
-if(FOUND_DX9)
-	set(USE_DX9 TRUE CACHE BOOL "If true, compile Panda3D with DirectX9")
-	if(USE_DX9)
-		set(HAVE_DX9 TRUE)
-	endif()
-endif()
-if(HAVE_DX9)
-	message(STATUS "+ DirectX9")
-else()
-	message(STATUS "- Did not find DirectX9")
-endif()
+# Find and configure DirectX 8
+#find_package(DX8)
+#config_package(DX8 COMMENT "DirectX8")
 
-if(FOUND_TINYDISPLAY)
-	set(USE_TINYDISPLAY TRUE CACHE BOOL "If true, compile Panda3D with Tinydisplay")
-	if(USE_TINYDISPLAY)
-		set(HAVE_TINYDISPLAY TRUE)
-	endif()
-endif()
-if(HAVE_TINYDISPLAY)
-	message(STATUS "+ Tinydisplay")
-else()
-	message(STATUS "- Not building Tinydisplay")
-endif()
+# Find and configure DirectX 9
+#find_package(DX9)
+#config_package(DX9 COMMENT "DirectX9")
+
+# Find and configure DirectX 11
+#find_package(DX11)
+#config_package(DX11 COMMENT "DirectX11")
+
+# Find and configure Tinydisplay
+#find_package(Tinydisplay)
+#config_package(TINYDISPLAY COMMENT "Tinydisplay")
 
 #### Was commented out in original 'Config.pp' not sure why
-#if(FOUND_SDL)
-#	set(USE_SDL TRUE CACHE BOOL "If true, compile Panda3D with SDL")
-#	if(USE_SDL)
-#		set(HAVE_SDL TRUE)
+# Find and configure SDL
+#find_package(SDL)
+#config_package(SDL)
+
+# Find and configure Mesa
+#find_package(Mesa)
+#config_package(MESA COMMENT "Mesa")
+
+# Find and configure OpenCV
+#find_package(OpenCV)
+#config_package(OPENCV COMMENT "OpenCV")
+
+# Find and configure FFMPEG
+#find_package(FFMPEG)
+#config_package(FFMPEG)
+
+# Find and configure ODE
+#find_package(ODE)
+#config_package(ODE)
+
+# Find and configure Awesomium
+#find_package(Awesomium)
+#config_package(AWESOMIUM COMMENT "Awesomium")
+
+# Find and configure OpenMaya
+#find_package(OpenMaya)
+#config_package(MAYA COMMENT "OpenMaya")
+
+# Find and configure FCollada
+#find_package(FCollada)
+#config_package(FCOLLADA COMMENT "FCollada")
+#if(FOUND_COLLADA14DOM OR FOUND_COLLADA15DOM)
+#	set(USE_COLLADA TRUE CACHE BOOL "If true, compile Panda3D with COLLADA DOM")
+#	if(USE_COLLADA)
+#		if(FOUND_COLLADA15DOM)
+#			set(HAVE_COLLADA15DOM TRUE)
+#		else()
+#			set(HAVE_COLLADA14DOM TRUE)
+#		endif()
 #	endif()
 #endif()
-#if(HAVE_SDL)
-#    message(STATUS "+ SDL")
-# else()
-#    message(STATUS "- Did not find SDL")
-# endif()
-
-if(FOUND_X11)
-	set(USE_X11 TRUE CACHE BOOL "If true, compile Panda3D with X11")
-	if(USE_X11)
-		set(HAVE_X11 TRUE)
-	endif()
-endif()
-if(HAVE_X11)
-	message(STATUS "+ X11")
-else()
-	message(STATUS "- Did not find X11")
-endif()
 
-if(FOUND_MESA)
-	set(USE_MESA TRUE CACHE BOOL "If true, compile Panda3D with Mesa")
-	if(USE_MESA)
-		set(HAVE_MESA TRUE)
-	endif()
-endif()
-if(HAVE_MESA)
-	message(STATUS "+ Mesa")
-else()
-	message(STATUS "- Did not find Mesa")
-endif()
-
-if(FOUND_OPENCV)
-	set(USE_OPENCV TRUE CACHE BOOL "If true, compile Panda3D with OpenCV")
-	if(USE_OPENCV)
-		set(HAVE_OPENCV TRUE)
-	endif()
-endif()
-if(HAVE_OPENCV)
-	message(STATUS "+ OpenCV")
-else()
-	message(STATUS "- Did not find OpenCV")
-endif()
-
-if(FOUND_FFMPEG)
-	set(USE_FFMPEG TRUE CACHE BOOL "If true, compile Panda3D with FFMPEG")
-	if(USE_FFMPEG)
-		set(HAVE_FFMPEG TRUE)
-	endif()
-endif()
-if(HAVE_FFMPEG)
-	message(STATUS "+ FFMPEG")
-else()
-	message(STATUS "- Did not find FFMPEG")
-endif()
-
-if(FOUND_ODE)
-	set(USE_ODE TRUE CACHE BOOL "If true, compile Panda3D with ODE")
-	if(USE_ODE)
-		set(HAVE_ODE TRUE)
-	endif()
-endif()
-if(HAVE_ODE)
-	message(STATUS "+ ODE")
-else()
-	message(STATUS "- Did not find ODE")
-endif()
-
-if(FOUND_AWESOMIUM)
-	set(USE_AWESOMIUM TRUE CACHE BOOL "If true, compile Panda3D with AWESOMIUM")
-	if(USE_AWESOMIUM)
-		set(HAVE_AWESOMIUM TRUE)
-	endif()
-endif()
-if(HAVE_AWESOMIUM)
-	message(STATUS "+ AWESOMIUM")
-else()
-	message(STATUS "- Did not find AWESOMIUM")
-endif()
-
-if(FOUND_MAYA)
-	set(USE_MAYA TRUE CACHE BOOL "If true, compile Panda3D with OpenMaya")
-	if(USE_MAYA)
-		set(HAVE_MAYA TRUE)
-	endif()
-endif()
-if(HAVE_MAYA)
-	message(STATUS "+ OpenMaya")
-else()
-	message(STATUS "- Did not find OpenMaya")
-endif()
-
-if(FOUND_FCOLLADA)
-	set(USE_FCOLLADA TRUE CACHE BOOL "If true, compile Panda3D with FCollada")
-	if(USE_FCOLLADA)
-		set(HAVE_FCOLLADA TRUE)
-	endif()
-endif()
-if(HAVE_FCOLLADA)
-	message(STATUS "+ FCollada")
-else()
-	message(STATUS "- Did not find FCollada")
-endif()
-
-if(FOUND_COLLADA14DOM OR FOUND_COLLADA15DOM)
-	set(USE_COLLADA TRUE CACHE BOOL "If true, compile Panda3D with COLLADA DOM")
-	if(USE_COLLADA)
-		if(FOUND_COLLADA15DOM)
-			set(HAVE_COLLADA15DOM TRUE)
-		else()
-			set(HAVE_COLLADA14DOM TRUE)
-		endif()
-	endif()
-endif()
-if(HAVE_COLLADA14DOM OR HAVE_COLLADA15DOM)
-	message(STATUS "+ COLLADA DOM")
-else()
-	message(STATUS "- Did not find COLLADA DOM")
-endif()
+# Find and configure Assimp
+#find_package(Assimp)
+#config_package(ASSIMP COMMENT "Assimp")
+
+# Find and configure ARToolKit
+#find_package(ARToolKit)
+#config_package(ARTOOLKIT COMMENT "ARToolKit")
+
+# Find and configure libRocket
+#find_package(Rocket)
+#config_package(ROCKET COMMENT "libRocket")
+#if(HAVE_ROCKET)
+#	# Check for rocket python bindings
+#	if(FOUND_ROCKET_PYTHON)
+#		set(USE_ROCKET_PYTHON TRUE CACHE BOOL "If true, compile Panda3D with python bindings for libRocket")
+#		if(USE_ROCKET_PYTHON)
+#			set(HAVE_ROCKET_PYTHON TRUE)
+#		endif()
+#	endif()
+#	if(HAVE_ROCKET_PYTHON)
+#		message(STATUS "+ libRocket with Python bindings")
+#	else()
+#		message(STATUS "+ libRocket without Python bindings")
+#	endif()
+#endif()
 
-if(FOUND_ASSIMP)
-	set(USE_ASSIMP TRUE CACHE BOOL "If true, compile Panda3D with Assimp")
-	if(USE_ASSIMP)
-		set(HAVE_ASSIMP TRUE)
-	endif()
-endif()
-if(HAVE_ASSIMP)
-	message(STATUS "+ Assimp")
-else()
-	message(STATUS "- Did not find Assimp")
-endif()
+# Find and configure Bullet
+#find_package(Bullet)
+#config_package(BULLET COMMENT "Bullet Physics")
 
-if(FOUND_ARTOOLKIT)
-	set(USE_ARTOOLKIT TRUE CACHE BOOL "If true, compile Panda3D with ARToolKit")
-	if(USE_ARTOOLKIT)
-		set(HAVE_ARTOOLKIT TRUE)
-	endif()
-endif()
-if(HAVE_ARTOOLKIT)
-	message(STATUS "+ ARToolKit")
-else()
-	message(STATUS "- Did not find ARToolKit")
-endif()
+# Find and configure Vorbis
+#find_package(Vorbis)
+#config_package(VORBIS COMMENT "Vorbis Ogg decoder")
 
-if(FOUND_ROCKET)
-	set(USE_ROCKET TRUE CACHE BOOL "If true, compile Panda3D with libRocket")
-	if(USE_ROCKET)
-		set(HAVE_ROCKET TRUE)
-	endif()
-endif()
-if(HAVE_ROCKET)
-	# Check for rocket python bindings
-	if(FOUND_ROCKET_PYTHON)
-		set(USE_ROCKET_PYTHON TRUE CACHE BOOL "If true, compile Panda3D with python bindings for libRocket")
-		if(USE_ROCKET_PYTHON)
-			set(HAVE_ROCKET_PYTHON TRUE)
-		endif()
-	endif()
-	if(HAVE_ROCKET_PYTHON)
-		message(STATUS "+ libRocket with Python bindings")
-	else()
-		message(STATUS "+ libRocket without Python bindings")
-	endif()
-else()
-	message(STATUS "- Did not find libRocket")
-endif()
 
-if(FOUND_BULLET)
-	set(USE_BULLET TRUE CACHE BOOL "If true, compile Panda3D with Bullet Physics")
-	if(USE_BULLET)
-		set(HAVE_BULLET TRUE)
-	endif()
-endif()
-if(HAVE_BULLET)
-	message(STATUS "+ Bullet Physics")
-else()
-	message(STATUS "- Did not find Bullet Physics")
-endif()
-
-if(FOUND_VORBIS)
-	set(USE_VORBIS TRUE CACHE BOOL "If true, compile Panda3D with libvorbis")
-	if(USE_VORBIS)
-		set(HAVE_VORBIS TRUE)
-	endif()
-endif()
-if(HAVE_VORBIS)
-	message(STATUS "+ libvorbis (Ogg Vorbis Decoder)")
-else()
-	message(STATUS "- Did not find libvorbis (Ogg Vorbis Decoder)")
-endif()
 
 message(STATUS "") # simple line break
-if(FOUND_INTERROGATE AND HAVE_PYTHON)
+if(HAVE_PYTHON)
 	set(USE_INTERROGATE TRUE CACHE BOOL "If true, Panda3D will generate python interfaces")
 	if(USE_INTERROGATE)
 		set(HAVE_INTERROGATE TRUE)
@@ -488,16 +251,22 @@ else()
 	message(STATUS "Configuring Panda without Python interfaces.")
 endif()
 
-if(FOUND_THREADS)
-	set(USE_THREADS TRUE CACHE BOOL "If true, compile Panda3D with threading support.")
-	if(USE_THREADS)
-		set(HAVE_THREADS TRUE)
-	endif()
+
+set(USE_THREADS TRUE CACHE BOOL "If true, compile Panda3D with threading support.")
+if(USE_THREADS)
+	set(HAVE_THREADS TRUE)
+else()
+	unset(SIMPLE_THREADS CACHE)
+	unset(DO_PIPELINING CACHE)
 endif()
+
 if(HAVE_THREADS)
+	set(SIMPLE_THREADS FALSE CACHE BOOL "If true, compile with simulated threads.")
 	if(SIMPLE_THREADS)
 		message(STATUS "Compilation will include simulated threading support.")
+		unset(DO_PIPELINING CACHE)
 	else()
+		set(DO_PIPELINING TRUE CACHE BOOL "If true, compile with pipelined threads.")
 		if(DO_PIPELINING)
 			message(STATUS "Compilation will include full, pipelined threading support.")
 		else()
@@ -509,6 +278,7 @@ else()
 endif()
 
 if(OSX_PLATFORM)
+	set(UNIVERSIAL_BINARIES TRUE CACHE BOOL "If true, compiling will create universal OS X binaries.")
 	if(UNIVERSAL_BINARIES)
 		message(STATUS "Compilation will create universal binaries.")
 	else()