open_toontown_panda3d/dtool/Configure.cmake

622 lines
14 KiB
CMake

message(STATUS "")
message("Configuring support for the following optional third-party packages:")
include(ConfigurePackage)
# Find and configure Eigen library
find_package(Eigen3)
config_package(EIGEN COMMENT "eigen")
if(HAVE_EIGEN)
if(WIN32)
set(EIGEN_CFLAGS "/arch:SSE2")
else()
set(EIGEN_CFLAGS "-msse2")
endif()
if(NOT DEFINED LINMATH_ALIGN)
message(STATUS "+ (vectorization enabled in build)")
endif()
set(LINMATH_ALIGN ON CACHE BOOL "If on, vectorization is enabled in build.")
else()
unset(LINMATH_ALIGN CACHE)
endif()
# Find and configure OpenSSL library
find_package(OpenSSL QUIET COMPONENTS ssl crypto)
mangle_package(OpenSSL)
config_package(OPENSSL COMMENT "OpenSSL")
if(HAVE_OPENSSL)
if(NOT DEFINED OPTIMIZE OR OPTIMIZE LESS 4)
set(REPORT_OPENSSL_ERRORS ON CACHE BOOL "If on, OpenSSL reports verbose error messages when they occur.")
else()
set(REPORT_OPENSSL_ERRORS OFF CACHE BOOL "If on, OpenSSL reports verbose error messages when they occur.")
endif()
else()
unset(REPORT_OPENSSL_ERRORS CACHE)
endif()
# Find and configure JPEG library
find_package(JPEG QUIET COMPONENTS jpeg)
mangle_package(JPEG)
config_package(JPEG COMMENT "libjpeg")
# Find and configure PNG library
find_package(PNG QUIET COMPONENTS png)
mangle_package(PNG)
config_package(PNG COMMENT "libpng")
# Find and configure TIFF library
find_package(TIFF QUIET COMPONENTS tiff z)
mangle_package(TIFF)
config_package(TIFF COMMENT "libtiff")
# Find and configure Tar library
find_package(Tar)
config_package(TAR COMMENT "libtar")
# Find and configure FFTW library
find_package(FFTW)
config_package(FFTW COMMENT "fftw")
if(FOUND_SQUISH)
set(USE_SQUISH TRUE CACHE BOOL "If true, compile Panda3D with squish")
if(USE_SQUISH)
set(HAVE_SQUISH TRUE)
endif()
endif()
if(HAVE_SQUISH)
message(STATUS "+ squish")
else()
message(STATUS "- Did not find squish")
endif()
if(FOUND_CG)
set(USE_CG TRUE CACHE BOOL "If true, compile Panda3D with Nvidia Cg")
if(USE_CG)
set(HAVE_CG TRUE)
endif()
endif()
if(HAVE_CG)
message(STATUS "+ Nvidia Cg High Level Shading Language")
else()
message(STATUS "- Did not find Nvidia Cg High Level Shading Language")
endif()
if(FOUND_CGGL)
set(USE_CGGL TRUE CACHE BOOL "If true, compile Panda3D with Cg OpenGL API")
if(USE_CGGL)
set(HAVE_CGGL TRUE)
endif()
endif()
if(HAVE_CGGL)
message(STATUS "+ Cg OpenGL API")
else()
message(STATUS "- Did not find Cg OpenGL API")
endif()
if(FOUND_CGDX8)
set(USE_CGDX8 TRUE CACHE BOOL "If true, compile Panda3D with Cg DX8 API")
if(USE_CGDX8)
set(HAVE_CGDX8 TRUE)
endif()
endif()
if(HAVE_CGDX8)
message(STATUS "+ Cg DX8 API")
else()
message(STATUS "- Did not find Cg DX8 API")
endif()
if(FOUND_CGDX9)
set(USE_CGDX9 TRUE CACHE BOOL "If true, compile Panda3D with Cg DX9 API")
if(USE_CGDX9)
set(HAVE_CGDX9 TRUE)
endif()
endif()
if(HAVE_CGDX9)
message(STATUS "+ Cg DX9 API")
else()
message(STATUS "- Did not find Cg DX9 API")
endif()
if(FOUND_CGDX10)
set(USE_CGDX10 TRUE CACHE BOOL "If true, compile Panda3D with Cg DX10 API")
if(USE_CGDX10)
set(HAVE_CGDX10 TRUE)
endif()
endif()
if(HAVE_CGDX10)
message(STATUS "+ Cg DX10 API")
else()
message(STATUS "- Did not find Cg DX10 API")
endif()
if(FOUND_VRPN)
set(USE_VRPN TRUE CACHE BOOL "If true, compile Panda3D with VRPN")
if(USE_VRPN)
set(HAVE_VRPN TRUE)
endif()
endif()
if(HAVE_VRPN)
message(STATUS "+ VRPN")
else()
message(STATUS "- Did not find VRPN")
endif()
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()
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()
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()
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()
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()
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()
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()
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()
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()
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()
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()
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()
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()
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()
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()
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()
#### 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)
# 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()
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()
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()
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)
set(USE_INTERROGATE TRUE CACHE BOOL "If true, Panda3D will generate python interfaces")
if(USE_INTERROGATE)
set(HAVE_INTERROGATE TRUE)
endif()
endif()
if(HAVE_INTERROGATE)
message(STATUS "Compilation will generate Python interfaces.")
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()
endif()
if(HAVE_THREADS)
if(SIMPLE_THREADS)
message(STATUS "Compilation will include simulated threading support.")
else()
if(DO_PIPELINING)
message(STATUS "Compilation will include full, pipelined threading support.")
else()
message(STATUS "Compilation will include nonpipelined threading support.")
endif()
endif()
else()
message(STATUS "Configuring Panda without threading support.")
endif()
if(OSX_PLATFORM)
if(UNIVERSAL_BINARIES)
message(STATUS "Compilation will create universal binaries.")
else()
message(STATUS "Compilation will not create universal binaries.")
endif()
endif()
message(STATUS "")
message(STATUS "See dtool_config.h for more details about the specified configuration.\n")
include(CheckIncludeFileCXX)
check_include_file_cxx(io.h PHAVE_IO_H)
check_include_file_cxx(iostream PHAVE_IOSTREAM)
check_include_file_cxx(malloc.h PHAVE_MALLOC_H)
check_include_file_cxx(sys/malloc.h PHAVE_SYS_MALLOC_H)
check_include_file_cxx(alloca.h PHAVE_ALLOCA_H)
check_include_file_cxx(locale.h PHAVE_LOCALE_H)
check_include_file_cxx(string.h PHAVE_STRING_H)
check_include_file_cxx(stdlib.h PHAVE_STDLIB_H)
check_include_file_cxx(limits.h PHAVE_LIMITS_H)
check_include_file_cxx(minmax.h PHAVE_MINMAX_H)
check_include_file_cxx(sstream PHAVE_SSTREAM)
check_include_file_cxx(new PHAVE_NEW)
check_include_file_cxx(sys/types.h PHAVE_SYS_TYPES_H)
check_include_file_cxx(sys/time.h PHAVE_SYS_TIME_H)
check_include_file_cxx(unistd.h PHAVE_UNISTD_H)
check_include_file_cxx(utime.h PHAVE_UTIME_H)
check_include_file_cxx(glob.h PHAVE_GLOB_H)
check_include_file_cxx(dirent.h PHAVE_DIRENT_H)
check_include_file_cxx(drfftw.h PHAVE_DRFFTW_H)
check_include_file_cxx(sys/soundcard.h PHAVE_SYS_SOUNDCARD_H)
check_include_file_cxx(ucontext.h PHAVE_UCONTEXT_H)
check_include_file_cxx(linux/input.h PHAVE_LINUX_INPUT_H)
check_include_file_cxx(stdint.h PHAVE_STDINT_H)
set(HAVE_NAMESPACE ON)
set(HAVE_LOCKF ON)
set(HAVE_WCHAR_T ON)
set(HAVE_WSTRING ON)
set(HAVE_TYPENAME ON)
set(SIMPLE_STRUCT_POINTERS ON)
set(HAVE_STREAMSIZE ON)
set(HAVE_IOS_TYPEDEFS ON)
if(WIN32)
set(DEFAULT_PATHSEP ";")
else()
set(DEFAULT_PATHSEP ":")
endif()
configure_file(dtool_config.h.cmake ${CMAKE_BINARY_DIR}/include/dtool_config.h)
include_directories("${CMAKE_BINARY_DIR}/include")