diff --git a/indra/llplugin/CMakeLists.txt b/indra/llplugin/CMakeLists.txt index a8071f56f..ec1112964 100644 --- a/indra/llplugin/CMakeLists.txt +++ b/indra/llplugin/CMakeLists.txt @@ -2,10 +2,6 @@ project(llplugin) -if (WORD_SIZE EQUAL 64) - set(REQUIRE_PIC) -endif(WORD_SIZE EQUAL 64) - include(00-Common) include(LLCommon) include(LLImage) diff --git a/indra/llplugin/llpluginsharedmemory.cpp b/indra/llplugin/llpluginsharedmemory.cpp index 2be46481d..c9466191e 100644 --- a/indra/llplugin/llpluginsharedmemory.cpp +++ b/indra/llplugin/llpluginsharedmemory.cpp @@ -34,6 +34,13 @@ #include "llpluginsharedmemory.h" +#if LL_WINDOWS +#include +#else // LL_WINDOWS +#include +#include +#endif // LL_WINDOWS + // on Mac and Linux, we use the native shm_open/mmap interface by using // #define USE_SHM_OPEN_SHARED_MEMORY 1 // in the appropriate sections below. diff --git a/indra/media_plugins/base/CMakeLists.txt b/indra/media_plugins/base/CMakeLists.txt index 4e4a1db5f..7814d704f 100644 --- a/indra/media_plugins/base/CMakeLists.txt +++ b/indra/media_plugins/base/CMakeLists.txt @@ -2,10 +2,6 @@ project(media_plugin_base) -if(WORD_SIZE EQUAL 64) - set(REQUIRE_PIC) -endif(WORD_SIZE EQUAL 64) - include(00-Common) include(LLCommon) include(LLImage) diff --git a/indra/media_plugins/example/CMakeLists.txt b/indra/media_plugins/example/CMakeLists.txt index 7f35c4401..b074a1d20 100644 --- a/indra/media_plugins/example/CMakeLists.txt +++ b/indra/media_plugins/example/CMakeLists.txt @@ -2,10 +2,6 @@ project(media_plugin_example) -if(WORD_SIZE EQUAL 64) - set(REQUIRE_PIC) -endif(WORD_SIZE EQUAL 64) - include(00-Common) include(LLCommon) include(LLImage) diff --git a/indra/media_plugins/gstreamer010/CMakeLists.txt b/indra/media_plugins/gstreamer010/CMakeLists.txt index c565e8327..5d1bee1b1 100644 --- a/indra/media_plugins/gstreamer010/CMakeLists.txt +++ b/indra/media_plugins/gstreamer010/CMakeLists.txt @@ -2,10 +2,6 @@ project(media_plugin_gstreamer010) -if(WORD_SIZE EQUAL 64) - set(REQUIRE_PIC) -endif(WORD_SIZE EQUAL 64) - include(00-Common) include(LLCommon) include(LLImage) @@ -34,14 +30,6 @@ include_directories( ### media_plugin_gstreamer010 -if(WORD_SIZE EQUAL 64) - if(WINDOWS) - add_definitions(/FIXED:NO) - else(WINDOWS) # not windows therefore gcc LINUX and DARWIN - add_definitions(-fPIC) - endif(WINDOWS) -endif (WORD_SIZE EQUAL 64) - set(media_plugin_gstreamer010_SOURCE_FILES media_plugin_gstreamer010.cpp llmediaimplgstreamer_syms.cpp @@ -54,15 +42,6 @@ set(media_plugin_gstreamer010_HEADER_FILES llmediaimplgstreamertriviallogging.h ) -if (LINUX) - if (${CXX_VERSION} GREATER 419) - # Work around a bad interaction between broken gstreamer headers and - # g++ 4.2's increased strictness. - set_source_files_properties(llmediaimplgstreamervidplug.cpp PROPERTIES - COMPILE_FLAGS -Wno-write-strings) - endif (${CXX_VERSION} GREATER 419) -endif (LINUX) - add_library(media_plugin_gstreamer010 SHARED ${media_plugin_gstreamer010_SOURCE_FILES} diff --git a/indra/media_plugins/gstreamer010/llmediaimplgstreamertriviallogging.h b/indra/media_plugins/gstreamer010/llmediaimplgstreamertriviallogging.h index 04976b92f..55a63bd01 100644 --- a/indra/media_plugins/gstreamer010/llmediaimplgstreamertriviallogging.h +++ b/indra/media_plugins/gstreamer010/llmediaimplgstreamertriviallogging.h @@ -35,16 +35,19 @@ #include -extern "C" { -#include -#include -} - ///////////////////////////////////////////////////////////////////////// // Debug/Info/Warning macros. +#if LL_WINDOWS +#include +#define LL_GETPID GetCurrentProcessId +#else +#include +#include +#define LL_GETPID getpid +#endif #define MSGMODULEFOO "(media plugin)" #define STDERRMSG(...) do{\ - fprintf(stderr, " pid:%d: ", (int)getpid());\ + fprintf(stderr, " pid:%d: ", (int)LL_GETPID());\ fprintf(stderr, MSGMODULEFOO " %s:%d: ", __FUNCTION__, __LINE__);\ fprintf(stderr, __VA_ARGS__);\ fputc('\n',stderr);\ diff --git a/indra/media_plugins/gstreamer010/llmediaimplgstreamervidplug.cpp b/indra/media_plugins/gstreamer010/llmediaimplgstreamervidplug.cpp index ef8ff588c..0a073d0de 100644 --- a/indra/media_plugins/gstreamer010/llmediaimplgstreamervidplug.cpp +++ b/indra/media_plugins/gstreamer010/llmediaimplgstreamervidplug.cpp @@ -52,7 +52,7 @@ GST_DEBUG_CATEGORY_STATIC (gst_slvideo_debug); #define SLV_ALLCAPS GST_VIDEO_CAPS_RGBx SLV_SIZECAPS static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ( - "sink", + (gchar*)"sink", GST_PAD_SINK, GST_PAD_ALWAYS, GST_STATIC_CAPS (SLV_ALLCAPS) @@ -512,18 +512,18 @@ plugin_init (GstPlugin * plugin) some g++ versions buggily avoid __attribute__((constructor)) functions - so we provide an explicit plugin init function. */ +#define PACKAGE (gchar*)"packagehack" + // this macro quietly refers to PACKAGE internally + GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, + GST_VERSION_MINOR, + (gchar*)"private-slvideoplugin", + (gchar*)"SL Video sink plugin", + plugin_init, (gchar*)"0.1", (gchar*)GST_LICENSE_UNKNOWN, + (gchar*)"Second Life", + (gchar*)"http://www.secondlife.com/"); +#undef PACKAGE void gst_slvideo_init_class (void) { -#define PACKAGE "packagehack" - // this macro quietly refers to PACKAGE internally - static GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, - GST_VERSION_MINOR, - "private-slvideoplugin", - "SL Video sink plugin", - plugin_init, "0.1", GST_LICENSE_UNKNOWN, - "Second Life", - "http://www.secondlife.com/"); -#undef PACKAGE ll_gst_plugin_register_static (&gst_plugin_desc); DEBUGMSG("CLASS INIT"); } diff --git a/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp b/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp index 5b3152d61..fa3d2ee57 100644 --- a/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp +++ b/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp @@ -162,7 +162,7 @@ MediaPluginGStreamer010::MediaPluginGStreamer010( mCommand ( COMMAND_NONE ) { std::ostringstream str; - INFOMSG("MediaPluginGStreamer010 constructor - my PID=%u", U32(getpid())); + INFOMSG("MediaPluginGStreamer010 constructor - my PID=%u", U32(LL_GETPID())); } /////////////////////////////////////////////////////////////////////////////// diff --git a/indra/media_plugins/quicktime/CMakeLists.txt b/indra/media_plugins/quicktime/CMakeLists.txt index f0b8f0d16..df191f543 100644 --- a/indra/media_plugins/quicktime/CMakeLists.txt +++ b/indra/media_plugins/quicktime/CMakeLists.txt @@ -60,7 +60,8 @@ if (WINDOWS) set_target_properties( media_plugin_quicktime PROPERTIES - LINK_FLAGS "/MANIFEST:NO" + LINK_FLAGS "/MANIFEST:NO /NODEFAULTLIB:LIBCMT" + LINK_FLAGS_DEBUG "/MANIFEST:NO /NODEFAULTLIB:\"LIBCMT;LIBCMTD\"" ) endif (WINDOWS) diff --git a/indra/media_plugins/webkit/CMakeLists.txt b/indra/media_plugins/webkit/CMakeLists.txt index 8ea957da4..3beedd19e 100644 --- a/indra/media_plugins/webkit/CMakeLists.txt +++ b/indra/media_plugins/webkit/CMakeLists.txt @@ -2,10 +2,6 @@ project(media_plugin_webkit) -if(WORD_SIZE EQUAL 64) - set(REQUIRE_PIC) -endif(WORD_SIZE EQUAL 64) - include(00-Common) include(LLCommon) include(LLImage) @@ -13,6 +9,7 @@ include(LLPlugin) include(LLMath) include(LLRender) include(LLWindow) +include(UI) include(Linking) include(PluginAPI) include(MediaPluginBase) @@ -28,6 +25,7 @@ include_directories( ${LLIMAGE_INCLUDE_DIRS} ${LLRENDER_INCLUDE_DIRS} ${LLWINDOW_INCLUDE_DIRS} + ${LLQTWEBKIT_INCLUDE_DIR} ) @@ -45,12 +43,7 @@ if(WORD_SIZE EQUAL 64) endif(WINDOWS) endif (WORD_SIZE EQUAL 64) -add_library(media_plugin_webkit - SHARED - ${media_plugin_webkit_SOURCE_FILES} -) - -target_link_libraries(media_plugin_webkit +set(media_plugin_webkit_LINK_LIBRARIES ${LLPLUGIN_LIBRARIES} ${MEDIA_PLUGIN_BASE_LIBRARIES} ${LLCOMMON_LIBRARIES} @@ -58,6 +51,20 @@ target_link_libraries(media_plugin_webkit ${PLUGIN_API_WINDOWS_LIBRARIES} ) +if(LINUX) + list(APPEND media_plugin_webkit_LINK_LIBRARIES + ${UI_LIBRARIES} # for glib/GTK + ) +endif(LINUX) + + +add_library(media_plugin_webkit + SHARED + ${media_plugin_webkit_SOURCE_FILES} +) + +target_link_libraries(media_plugin_webkit ${media_plugin_webkit_LINK_LIBRARIES}) + add_dependencies(media_plugin_webkit ${LLPLUGIN_LIBRARIES} ${MEDIA_PLUGIN_BASE_LIBRARIES}