David Rose 17 năm trước cách đây
mục cha
commit
3113912e4d
3 tập tin đã thay đổi với 18 bổ sung0 xóa
  1. 7 0
      dtool/Config.pp
  2. 8 0
      dtool/pptempl/Global.pp
  3. 3 0
      panda/src/tinydisplay/Sources.pp

+ 7 - 0
dtool/Config.pp

@@ -625,6 +625,13 @@
 #define SDL_LIBS
 #defer HAVE_SDL $[libtest $[SDL_LPATH],$[SDL_LIBS]]
 
+// X11 may need to be linked against for tinydisplay, but probably
+// only on a Linux platform.
+#define X11_IPATH
+#define X11_LPATH /usr/X11R6/lib
+#define X11_LIBS X11
+#defer HAVE_X11 $[libtest $[X11_LPATH],$[X11_LIBS]]
+
 // How about GLX?
 #define GLX_IPATH
 #define GLX_LPATH

+ 8 - 0
dtool/pptempl/Global.pp

@@ -135,6 +135,14 @@
   #define sdl_framework $[SDL_FRAMEWORK]
 #endif
 
+#if $[HAVE_X11]
+  #define x11_ipath $[wildcard $[X11_IPATH]]
+  #define x11_lpath $[wildcard $[X11_LPATH]]
+  #define x11_cflags $[X11_CFLAGS]
+  #define x11_libs $[X11_LIBS]
+  #define x11_framework $[X11_FRAMEWORK]
+#endif
+
 #if $[HAVE_MESA]
   #define mesa_ipath $[wildcard $[MESA_IPATH]]
   #define mesa_lpath $[wildcard $[MESA_LPATH]]

+ 3 - 0
panda/src/tinydisplay/Sources.pp

@@ -6,6 +6,9 @@
                    dtoolutil:c dtoolbase:c dtool:m prc:c 
 
 #define USE_PACKAGES sdl
+#if $[UNIX_PLATFORM]
+  #define USE_PACKAGES $[USE_PACKAGES] x11
+#endif
 
 #begin lib_target
   #define TARGET tinydisplay