From 092fda55d8537e7655a545634e443c6c6c3dde0b Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Tue, 7 Sep 2010 18:01:44 -0700 Subject: Added fix for word size from Snowglobe (only for Windows--didn't update Linux or Mac as I can't test them) --- linden/indra/cmake/Variables.cmake | 1 + linden/indra/llplugin/llpluginsharedmemory.cpp | 7 ++++++ linden/indra/media_plugins/CMakeLists.txt | 2 ++ linden/indra/media_plugins/base/CMakeLists.txt | 8 +++++++ linden/indra/media_plugins/example/CMakeLists.txt | 10 ++++++++- .../indra/media_plugins/quicktime/CMakeLists.txt | 3 ++- linden/indra/media_plugins/webkit/CMakeLists.txt | 25 ++++++++++++++++------ 7 files changed, 48 insertions(+), 8 deletions(-) (limited to 'linden') diff --git a/linden/indra/cmake/Variables.cmake b/linden/indra/cmake/Variables.cmake index 5d4dffe..cd5bfc1 100644 --- a/linden/indra/cmake/Variables.cmake +++ b/linden/indra/cmake/Variables.cmake @@ -45,6 +45,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Windows") set(ARCH i686) set(LL_ARCH ${ARCH}_win32) set(LL_ARCH_DIR ${ARCH}-win32) + set(WORD_SIZE 32) endif (${CMAKE_SYSTEM_NAME} MATCHES "Windows") if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") diff --git a/linden/indra/llplugin/llpluginsharedmemory.cpp b/linden/indra/llplugin/llpluginsharedmemory.cpp index 2be4648..c946619 100644 --- a/linden/indra/llplugin/llpluginsharedmemory.cpp +++ b/linden/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/linden/indra/media_plugins/CMakeLists.txt b/linden/indra/media_plugins/CMakeLists.txt index d35afd8..cc03d9c 100644 --- a/linden/indra/media_plugins/CMakeLists.txt +++ b/linden/indra/media_plugins/CMakeLists.txt @@ -9,3 +9,5 @@ add_subdirectory(gstreamer010) if (WINDOWS OR DARWIN) add_subdirectory(quicktime) endif (WINDOWS OR DARWIN) + +add_subdirectory(example) diff --git a/linden/indra/media_plugins/base/CMakeLists.txt b/linden/indra/media_plugins/base/CMakeLists.txt index f8d2dab..a3ee02e 100644 --- a/linden/indra/media_plugins/base/CMakeLists.txt +++ b/linden/indra/media_plugins/base/CMakeLists.txt @@ -25,6 +25,14 @@ include_directories( ### media_plugin_base +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_base_SOURCE_FILES media_plugin_base.cpp ) diff --git a/linden/indra/media_plugins/example/CMakeLists.txt b/linden/indra/media_plugins/example/CMakeLists.txt index 4d82f27..b074a1d 100644 --- a/linden/indra/media_plugins/example/CMakeLists.txt +++ b/linden/indra/media_plugins/example/CMakeLists.txt @@ -29,6 +29,14 @@ include_directories( ### media_plugin_example +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_example_SOURCE_FILES media_plugin_example.cpp ) @@ -71,4 +79,4 @@ if (DARWIN) LINK_FLAGS "-exported_symbols_list ${CMAKE_CURRENT_SOURCE_DIR}/../base/media_plugin_base.exp" ) -endif (DARWIN) \ No newline at end of file +endif (DARWIN) diff --git a/linden/indra/media_plugins/quicktime/CMakeLists.txt b/linden/indra/media_plugins/quicktime/CMakeLists.txt index f0b8f0d..df191f5 100644 --- a/linden/indra/media_plugins/quicktime/CMakeLists.txt +++ b/linden/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/linden/indra/media_plugins/webkit/CMakeLists.txt b/linden/indra/media_plugins/webkit/CMakeLists.txt index 5bccd58..54bc364 100644 --- a/linden/indra/media_plugins/webkit/CMakeLists.txt +++ b/linden/indra/media_plugins/webkit/CMakeLists.txt @@ -24,6 +24,7 @@ include_directories( ${LLIMAGE_INCLUDE_DIRS} ${LLRENDER_INCLUDE_DIRS} ${LLWINDOW_INCLUDE_DIRS} + ${LLQTWEBKIT_INCLUDE_DIR} ) @@ -33,12 +34,15 @@ set(media_plugin_webkit_SOURCE_FILES media_plugin_webkit.cpp ) -add_library(media_plugin_webkit - SHARED - ${media_plugin_webkit_SOURCE_FILES} -) +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) -target_link_libraries(media_plugin_webkit +set(media_plugin_webkit_LINK_LIBRARIES ${LLPLUGIN_LIBRARIES} ${MEDIA_PLUGIN_BASE_LIBRARIES} ${LLCOMMON_LIBRARIES} @@ -46,6 +50,15 @@ target_link_libraries(media_plugin_webkit ${PLUGIN_API_WINDOWS_LIBRARIES} ) + + +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} @@ -79,4 +92,4 @@ if (DARWIN) DEPENDS media_plugin_webkit ${CMAKE_SOURCE_DIR}/../libraries/universal-darwin/lib_release/libllqtwebkit.dylib ) -endif (DARWIN) \ No newline at end of file +endif (DARWIN) -- cgit v1.1