diff --git a/cmake/modules/FindCg.cmake b/cmake/modules/FindCg.cmake index 757eb52603..3fdfe757ca 100644 --- a/cmake/modules/FindCg.cmake +++ b/cmake/modules/FindCg.cmake @@ -10,6 +10,7 @@ # CG_INCLUDE_DIRS - directories for all NvidiaCg components # CG_LIBRARY_DIR - the NvidiaCg library directory # CG_LIBRARY - the path to the library binary +# CG_LIBRARIES - the paths to the Cg library and each library below. # # CGGL_FOUND - system has CgGL # CGGL_INCLUDE_DIR - the CgGL include directory @@ -157,4 +158,8 @@ if(CG_INCLUDE_DIR AND CG_LIBRARY_DIR) find_cgdx8() find_cgdx9() find_cgdx10() -endif() \ No newline at end of file + + set(CG_LIBRARIES ${CG_LIBRARY} ${CGGL_LIBRARY} + ${CGDX8_LIBRARY} ${CGDX9_LIBRARY} ${CGDX10_LIBRARY}) + mark_as_advanced(CG_LIBRARIES) +endif() diff --git a/dtool/Config.cmake b/dtool/Config.cmake index 4fc5e17b38..a60ad6a8a3 100644 --- a/dtool/Config.cmake +++ b/dtool/Config.cmake @@ -355,7 +355,7 @@ requires the Apple IPhone SDK, which is currently only available for OS X platforms. Set this to either 'iPhoneSimulator' or 'iPhoneOS'. Note that this is still *experimental* and incomplete! Don't enable this unless you know what you're doing!") -set_property(CACHE BUILD_IPHONE PROPERTY STRINGS iPhoneSimulator iPhoneOS) +set_property(CACHE BUILD_IPHONE PROPERTY STRINGS "" iPhoneSimulator iPhoneOS) # Android support @@ -645,6 +645,19 @@ mark_as_advanced(SDL_LIBRARY) mark_as_advanced(SDL_LIBRARY_TEMP) +# Is X11 insalled, and where? +find_package(X11) + +package_option(X11 + "Provides X-server support on Unix platforms. X11 may need to be linked +against for tinydisplay, but probably only on a Linux platform.") +if(NOT UNIX AND HAVE_X11) + message(SEND_ERROR + "X11 support is only supported on Unix platforms: +ie. Linux, BSD, OS X, Cygwin, etc...") +endif() + + # TODO: XF86DGA # This defines if we have XF86DGA installed. #find_package(XF86DGA QUIET) @@ -752,6 +765,8 @@ mark_as_advanced(HAVE_SGI_RGB HAVE_TGA + + # How to invoke bison and flex. Panda takes advantage of some # bison/flex features, and therefore specifically requires bison and # flex, not some other versions of yacc and lex. However, you only @@ -769,8 +784,11 @@ find_package(FLEX QUIET) set(HAVE_BISON ${BISON_FOUND}) set(HAVE_FLEX ${FLEX_FOUND}) + # -# +# >>>>> Below is entirely temporary config information +# until the port of Config.pp is finished. +# It should be re-arranged for above. >>>>>> # ### Configure threading support ### diff --git a/panda/metalibs/pandagl/CMakeLists.txt b/panda/metalibs/pandagl/CMakeLists.txt index 9d321ef16f..96eb7465cc 100644 --- a/panda/metalibs/pandagl/CMakeLists.txt +++ b/panda/metalibs/pandagl/CMakeLists.txt @@ -1,4 +1,12 @@ if(HAVE_GL) + # Check that we actually have a display subsystem. + if(NOT HAVE_WGL AND NOT HAVE_COCOA AND NOT HAVE_CARBON AND NOT HAVE_GLX) + message("") # Add extra line before error + message(SEND_ERROR + "When compiling with OpenGL (HAVE_GL), at least one of: + HAVE_WGL, HAVE_COCOA, HAVE_CARBON, or HAVE_GLX must be defined.") + endif() + add_definitions(-DBUILDING_PANDAGL) set(PANDAGL_LINK_TARGETS p3glgsg) diff --git a/panda/src/express/CMakeLists.txt b/panda/src/express/CMakeLists.txt index ef4ce2c614..8f93753e4d 100644 --- a/panda/src/express/CMakeLists.txt +++ b/panda/src/express/CMakeLists.txt @@ -126,7 +126,8 @@ set(P3EXPRESS_SOURCES composite_sources(p3express P3EXPRESS_SOURCES) add_library(p3express ${P3EXPRESS_SOURCES} ${P3EXPRESS_HEADERS}) -target_link_libraries(p3express p3pandabase p3dtool p3dtoolconfig) +target_link_libraries(p3express p3pandabase p3dtool p3dtoolconfig + ${TAR_LIBRARY}) target_interrogate(p3express ALL) #add_executable(p3expressTestTypes test_types.cxx) diff --git a/panda/src/glgsg/CMakeLists.txt b/panda/src/glgsg/CMakeLists.txt index c7519749aa..ba0cb410d1 100644 --- a/panda/src/glgsg/CMakeLists.txt +++ b/panda/src/glgsg/CMakeLists.txt @@ -10,6 +10,7 @@ if(HAVE_GL) composite_sources(p3glgsg P3GLGSG_SOURCES) add_library(p3glgsg ${P3GLGSG_HEADERS} ${P3GLGSG_SOURCES}) - target_link_libraries(p3glgsg p3glstuff p3display ${OPENGL_LIBRARIES}) + target_link_libraries(p3glgsg p3glstuff p3display + ${OPENGL_LIBRARIES} ${CG_LIBRARIES}) target_interrogate(p3glgsg ALL) endif() diff --git a/panda/src/gobj/CMakeLists.txt b/panda/src/gobj/CMakeLists.txt index 34dbb3216d..ef1d2bedd6 100644 --- a/panda/src/gobj/CMakeLists.txt +++ b/panda/src/gobj/CMakeLists.txt @@ -143,7 +143,8 @@ set(P3GOBJ_SOURCES composite_sources(p3gobj P3GOBJ_SOURCES) add_library(p3gobj ${P3GOBJ_HEADERS} ${P3GOBJ_SOURCES}) -target_link_libraries(p3gobj p3gsgbase p3pnmimage ${ZLIB_LIBRARIES}) +target_link_libraries(p3gobj p3gsgbase p3pnmimage + ${ZLIB_LIBRARIES} ${SQUISH_LIBRARY}) target_interrogate(p3gobj ALL) #begin test_bin_target