summaryrefslogtreecommitdiff
path: root/indra/cmake
diff options
context:
space:
mode:
authorBryan O'Sullivan <bos@lindenlab.com>2009-08-31 13:47:47 -0700
committerBryan O'Sullivan <bos@lindenlab.com>2009-08-31 13:47:47 -0700
commit30ff6cabd61f2f083df5df1e6e70cc94742af477 (patch)
tree631935f1cf59d19a91cdad65e9a75fe825afda7d /indra/cmake
parentff11d74820c89822cd067b51727d9df1dc87d0d0 (diff)
parent3ac3a4b206c08ed06b889bdaa24074b6aa0e020a (diff)
Merge with trunk
Diffstat (limited to 'indra/cmake')
-rw-r--r--indra/cmake/00-Common.cmake3
-rw-r--r--indra/cmake/CMakeLists.txt6
-rw-r--r--indra/cmake/GStreamer010Plugin.cmake39
-rw-r--r--indra/cmake/Glui.cmake28
-rw-r--r--indra/cmake/Glut.cmake19
-rw-r--r--indra/cmake/GooglePerfTools.cmake8
-rw-r--r--indra/cmake/LLAddBuildTest.cmake76
-rw-r--r--indra/cmake/LLCommon.cmake4
-rw-r--r--indra/cmake/LLPlugin.cmake8
-rw-r--r--indra/cmake/LLXUIXML.cmake7
-rw-r--r--indra/cmake/Linking.cmake1
-rw-r--r--indra/cmake/MediaPluginBase.cmake8
-rw-r--r--indra/cmake/PluginAPI.cmake16
-rw-r--r--indra/cmake/QuickTimePlugin.cmake46
-rw-r--r--indra/cmake/Variables.cmake1
-rw-r--r--indra/cmake/WebKitLibPlugin.cmake63
16 files changed, 326 insertions, 7 deletions
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake
index ad7529ea0a..2a70263446 100644
--- a/indra/cmake/00-Common.cmake
+++ b/indra/cmake/00-Common.cmake
@@ -192,7 +192,7 @@ endif (DARWIN)
if (LINUX OR DARWIN)
- set(GCC_WARNINGS "-Wall -Wno-sign-compare -Wno-trigraphs -Wno-non-virtual-dtor")
+ set(GCC_WARNINGS "-Wall -Wno-sign-compare -Wno-trigraphs -Wno-non-virtual-dtor -Woverloaded-virtual")
if (NOT GCC_DISABLE_FATAL_WARNINGS)
set(GCC_WARNINGS "${GCC_WARNINGS} -Werror")
@@ -227,7 +227,6 @@ else (STANDALONE)
glib-2.0
gstreamer-0.10
gtk-2.0
- llfreetype2
pango-1.0
)
endif (STANDALONE)
diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt
index 658441dab1..3ce393b659 100644
--- a/indra/cmake/CMakeLists.txt
+++ b/indra/cmake/CMakeLists.txt
@@ -34,7 +34,7 @@ set(cmake_SOURCE_FILES
FindXmlRpcEpi.cmake
FMOD.cmake
FreeType.cmake
- GStreamer.cmake
+ GStreamer010Plugin.cmake
GooglePerfTools.cmake
JPEG.cmake
LLAddBuildTest.cmake
@@ -48,8 +48,8 @@ set(cmake_SOURCE_FILES
LLInventory.cmake
LLKDU.cmake
LLMath.cmake
- LLMedia.cmake
LLMessage.cmake
+ LLPlugin.cmake
LLPrimitive.cmake
LLRender.cmake
LLScene.cmake
@@ -60,7 +60,6 @@ set(cmake_SOURCE_FILES
LScript.cmake
Linking.cmake
MonoEmbed.cmake
- Mozlib.cmake
MySQL.cmake
NDOF.cmake
OPENAL.cmake
@@ -70,7 +69,6 @@ set(cmake_SOURCE_FILES
PNG.cmake
Python.cmake
Prebuilt.cmake
- QuickTime.cmake
RunBuildTest.cmake
TemplateCheck.cmake
Tut.cmake
diff --git a/indra/cmake/GStreamer010Plugin.cmake b/indra/cmake/GStreamer010Plugin.cmake
new file mode 100644
index 0000000000..0d334837d4
--- /dev/null
+++ b/indra/cmake/GStreamer010Plugin.cmake
@@ -0,0 +1,39 @@
+# -*- cmake -*-
+include(Prebuilt)
+
+if (STANDALONE)
+ include(FindPkgConfig)
+
+ pkg_check_modules(GSTREAMER010 REQUIRED gstreamer-0.10)
+ pkg_check_modules(GSTREAMER010_PLUGINS_BASE REQUIRED gstreamer-plugins-base-0.10)
+elseif (LINUX)
+ use_prebuilt_binary(gstreamer)
+ # possible libxml should have its own .cmake file instead
+ use_prebuilt_binary(libxml)
+ set(GSTREAMER010_FOUND ON FORCE BOOL)
+ set(GSTREAMER010_PLUGINS_BASE_FOUND ON FORCE BOOL)
+ set(GSTREAMER010_INCLUDE_DIRS
+ ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/gstreamer-0.10
+ ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/glib-2.0
+ ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/libxml2
+ )
+ # We don't need to explicitly link against gstreamer itself, because
+ # LLMediaImplGStreamer probes for the system's copy at runtime.
+ set(GSTREAMER010_LIBRARIES
+ gobject-2.0
+ gmodule-2.0
+ dl
+ gthread-2.0
+ rt
+ glib-2.0
+ )
+endif (STANDALONE)
+
+if (GSTREAMER010_FOUND AND GSTREAMER010_PLUGINS_BASE_FOUND)
+ set(GSTREAMER010 ON CACHE BOOL "Build with GStreamer-0.10 streaming media support.")
+endif (GSTREAMER010_FOUND AND GSTREAMER010_PLUGINS_BASE_FOUND)
+
+if (GSTREAMER010)
+ add_definitions(-DLL_GSTREAMER010_ENABLED=1)
+endif (GSTREAMER010)
+
diff --git a/indra/cmake/Glui.cmake b/indra/cmake/Glui.cmake
new file mode 100644
index 0000000000..f62a56856c
--- /dev/null
+++ b/indra/cmake/Glui.cmake
@@ -0,0 +1,28 @@
+# -*- cmake -*-
+include(Linking)
+include(Prebuilt)
+
+if (STANDALONE)
+ set(GLUI OFF CACHE BOOL
+ "GLUI support for the llplugin/llmedia test apps.")
+else (STANDALONE)
+ use_prebuilt_binary(glui)
+ set(GLUI ON CACHE BOOL
+ "GLUI support for the llplugin/llmedia test apps.")
+endif (STANDALONE)
+
+if (LINUX)
+ set(GLUI ON CACHE BOOL
+ "llplugin media apps HACK for Linux.")
+endif (LINUX)
+
+if (DARWIN OR LINUX)
+ set(GLUI_LIBRARY
+ glui)
+endif (DARWIN OR LINUX)
+
+if (WINDOWS)
+ set(GLUI_LIBRARY
+ debug glui32.lib
+ optimized glui32.lib)
+endif (WINDOWS)
diff --git a/indra/cmake/Glut.cmake b/indra/cmake/Glut.cmake
new file mode 100644
index 0000000000..314da30652
--- /dev/null
+++ b/indra/cmake/Glut.cmake
@@ -0,0 +1,19 @@
+# -*- cmake -*-
+include(Linking)
+include(Prebuilt)
+
+if (WINDOWS)
+ use_prebuilt_binary(freeglut)
+ set(GLUT_LIBRARY
+ debug freeglut_static.lib
+ optimized freeglut_static.lib)
+endif (WINDOWS)
+
+if (LINUX)
+ FIND_LIBRARY(GLUT_LIBRARY glut)
+endif (LINUX)
+
+if (DARWIN)
+ include(CMakeFindFrameworks)
+ find_library(GLUT_LIBRARY GLUT)
+endif (DARWIN)
diff --git a/indra/cmake/GooglePerfTools.cmake b/indra/cmake/GooglePerfTools.cmake
index aff65cb53e..355ecb58f0 100644
--- a/indra/cmake/GooglePerfTools.cmake
+++ b/indra/cmake/GooglePerfTools.cmake
@@ -6,9 +6,11 @@ if (STANDALONE)
else (STANDALONE)
use_prebuilt_binary(google)
if (WINDOWS)
+ use_prebuilt_binary(google-perftools)
set(TCMALLOC_LIBRARIES
debug libtcmalloc_minimal-debug
- optimized libtcmalloc_minimal-debug)
+ optimized libtcmalloc_minimal)
+ set(GOOGLE_PERFTOOLS_FOUND "YES")
endif (WINDOWS)
if (LINUX)
set(TCMALLOC_LIBRARIES tcmalloc)
@@ -27,6 +29,10 @@ endif (GOOGLE_PERFTOOLS_FOUND)
# XXX Disable temporarily, until we have compilation issues on 64-bit
# Etch sorted.
set(USE_GOOGLE_PERFTOOLS OFF)
+if (WINDOWS)
+ # *TODO -reenable this once we get server usage sorted out
+ #set(USE_GOOGLE_PERFTOOLS ON)
+endif (WINDOWS)
if (USE_GOOGLE_PERFTOOLS)
set(TCMALLOC_FLAG -DLL_USE_TCMALLOC=1)
diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake
index 4da0824120..373ad4d4e9 100644
--- a/indra/cmake/LLAddBuildTest.cmake
+++ b/indra/cmake/LLAddBuildTest.cmake
@@ -157,3 +157,79 @@ INCLUDE(GoogleMock)
ADD_DEPENDENCIES(${project} ${project}_tests)
ENDMACRO(LL_ADD_PROJECT_UNIT_TESTS)
+FUNCTION(LL_ADD_INTEGRATION_TEST
+ testname
+ additional_source_files
+ library_dependencies
+# variable args
+ )
+ if(TEST_DEBUG)
+ message(STATUS "Adding INTEGRATION_TEST_${testname} - debug output is on")
+ endif(TEST_DEBUG)
+
+ SET(source_files
+ tests/${testname}_test.cpp
+ ${CMAKE_SOURCE_DIR}/test/test.cpp
+ ${CMAKE_SOURCE_DIR}/test/lltut.cpp
+ ${additional_source_files}
+ )
+
+ SET(libraries
+ ${library_dependencies}
+ ${PTHREAD_LIBRARY}
+ )
+
+ # Add test executable build target
+ if(TEST_DEBUG)
+ message(STATUS "ADD_EXECUTABLE(INTEGRATION_TEST_${testname} ${source_files})")
+ endif(TEST_DEBUG)
+ ADD_EXECUTABLE(INTEGRATION_TEST_${testname} ${source_files})
+
+ # Add link deps to the executable
+ if(TEST_DEBUG)
+ message(STATUS "TARGET_LINK_LIBRARIES(INTEGRATION_TEST_${testname} ${libraries})")
+ endif(TEST_DEBUG)
+ TARGET_LINK_LIBRARIES(INTEGRATION_TEST_${testname} ${libraries})
+
+ # Create the test running command
+ SET(test_command ${ARGN})
+ GET_TARGET_PROPERTY(TEST_EXE INTEGRATION_TEST_${testname} LOCATION)
+ LIST(FIND test_command "{}" test_exe_pos)
+ IF(test_exe_pos LESS 0)
+ # The {} marker means "the full pathname of the test executable."
+ # test_exe_pos -1 means we didn't find it -- so append the test executable
+ # name to $ARGN, the variable part of the arg list. This is convenient
+ # shorthand for both straightforward execution of the test program (empty
+ # $ARGN) and for running a "wrapper" program of some kind accepting the
+ # pathname of the test program as the last of its args. You need specify
+ # {} only if the test program's pathname isn't the last argument in the
+ # desired command line.
+ LIST(APPEND test_command "${TEST_EXE}")
+ ELSE (test_exe_pos LESS 0)
+ # Found {} marker at test_exe_pos. Remove the {}...
+ LIST(REMOVE_AT test_command test_exe_pos)
+ # ...and replace it with the actual name of the test executable.
+ LIST(INSERT test_command test_exe_pos "${TEST_EXE}")
+ ENDIF (test_exe_pos LESS 0)
+
+ SET(TEST_SCRIPT_CMD
+ ${CMAKE_COMMAND}
+ -DLD_LIBRARY_PATH=${ARCH_PREBUILT_DIRS}:/usr/lib
+ -DTEST_CMD:STRING="${test_command}"
+ -P ${CMAKE_SOURCE_DIR}/cmake/RunBuildTest.cmake
+ )
+
+ if(TEST_DEBUG)
+ message(STATUS "TEST_SCRIPT_CMD: ${TEST_SCRIPT_CMD}")
+ endif(TEST_DEBUG)
+
+ ADD_CUSTOM_COMMAND(
+ TARGET INTEGRATION_TEST_${testname}
+ POST_BUILD
+ COMMAND ${TEST_SCRIPT_CMD}
+ )
+
+ # Use CTEST? Not sure how to yet...
+ # ADD_TEST(INTEGRATION_TEST_RUNNER_${testname} ${TEST_SCRIPT_CMD})
+
+ENDFUNCTION(LL_ADD_INTEGRATION_TEST) \ No newline at end of file
diff --git a/indra/cmake/LLCommon.cmake b/indra/cmake/LLCommon.cmake
index 410766e4f9..ef202dd879 100644
--- a/indra/cmake/LLCommon.cmake
+++ b/indra/cmake/LLCommon.cmake
@@ -4,6 +4,7 @@ include(APR)
include(Boost)
include(EXPAT)
include(ZLIB)
+include(GooglePerfTools)
set(LLCOMMON_INCLUDE_DIRS
${LIBS_OPEN_DIR}/llcommon
@@ -13,3 +14,6 @@ set(LLCOMMON_INCLUDE_DIRS
)
set(LLCOMMON_LIBRARIES llcommon)
+
+add_definitions(${TCMALLOC_FLAG})
+
diff --git a/indra/cmake/LLPlugin.cmake b/indra/cmake/LLPlugin.cmake
new file mode 100644
index 0000000000..9722f16c3c
--- /dev/null
+++ b/indra/cmake/LLPlugin.cmake
@@ -0,0 +1,8 @@
+# -*- cmake -*-
+
+
+set(LLPLUGIN_INCLUDE_DIRS
+ ${LIBS_OPEN_DIR}/llplugin
+ )
+
+set(LLPLUGIN_LIBRARIES llplugin)
diff --git a/indra/cmake/LLXUIXML.cmake b/indra/cmake/LLXUIXML.cmake
new file mode 100644
index 0000000000..b8bfe48c77
--- /dev/null
+++ b/indra/cmake/LLXUIXML.cmake
@@ -0,0 +1,7 @@
+# -*- cmake -*-
+
+set(LLXUIXML_INCLUDE_DIRS
+ ${LIBS_OPEN_DIR}/llxuixml
+ )
+
+set(LLXUIXML_LIBRARIES llxuixml)
diff --git a/indra/cmake/Linking.cmake b/indra/cmake/Linking.cmake
index 2bddb95178..eaa8a6dc29 100644
--- a/indra/cmake/Linking.cmake
+++ b/indra/cmake/Linking.cmake
@@ -42,6 +42,7 @@ if (WINDOWS)
wldap32
gdi32
user32
+ dbghelp
)
else (WINDOWS)
set(WINDOWS_LIBRARIES "")
diff --git a/indra/cmake/MediaPluginBase.cmake b/indra/cmake/MediaPluginBase.cmake
new file mode 100644
index 0000000000..2be035b641
--- /dev/null
+++ b/indra/cmake/MediaPluginBase.cmake
@@ -0,0 +1,8 @@
+# -*- cmake -*-
+
+
+set(MEDIA_PLUGIN_BASE_INCLUDE_DIRS
+ ${LIBS_OPEN_DIR}/media_plugins/base/
+ )
+
+set(MEDIA_PLUGIN_BASE_LIBRARIES media_plugin_base)
diff --git a/indra/cmake/PluginAPI.cmake b/indra/cmake/PluginAPI.cmake
new file mode 100644
index 0000000000..d1649e8248
--- /dev/null
+++ b/indra/cmake/PluginAPI.cmake
@@ -0,0 +1,16 @@
+# -*- cmake -*-
+
+if (WINDOWS)
+ set(PLUGIN_API_WINDOWS_LIBRARIES
+ wsock32
+ ws2_32
+ psapi
+ netapi32
+ advapi32
+ user32
+ )
+else (WINDOWS)
+ set(PLUGIN_API_WINDOWS_LIBRARIES "")
+endif (WINDOWS)
+
+
diff --git a/indra/cmake/QuickTimePlugin.cmake b/indra/cmake/QuickTimePlugin.cmake
new file mode 100644
index 0000000000..8afd8f304c
--- /dev/null
+++ b/indra/cmake/QuickTimePlugin.cmake
@@ -0,0 +1,46 @@
+# -*- cmake -*-
+
+if(INSTALL_PROPRIETARY)
+ include(Prebuilt)
+ use_prebuilt_binary(quicktime)
+endif(INSTALL_PROPRIETARY)
+
+if (DARWIN)
+ include(CMakeFindFrameworks)
+ find_library(QUICKTIME_LIBRARY QuickTime)
+elseif (WINDOWS)
+ set(QUICKTIME_SDK_DIR "$ENV{PROGRAMFILES}/QuickTime SDK"
+ CACHE PATH "Location of the QuickTime SDK.")
+
+ find_library(DEBUG_QUICKTIME_LIBRARY qtmlclient
+ PATHS
+ ${ARCH_PREBUILT_DIRS_DEBUG}
+ "${QUICKTIME_SDK_DIR}\\libraries"
+ )
+
+ find_library(RELEASE_QUICKTIME_LIBRARY qtmlclient
+ PATHS
+ ${ARCH_PREBUILT_DIRS_RELEASE}
+ "${QUICKTIME_SDK_DIR}\\libraries"
+ )
+
+ if (DEBUG_QUICKTIME_LIBRARY AND RELEASE_QUICKTIME_LIBRARY)
+ set(QUICKTIME_LIBRARY
+ optimized ${RELEASE_QUICKTIME_LIBRARY}
+ debug ${DEBUG_QUICKTIME_LIBRARY}
+ )
+
+ endif (DEBUG_QUICKTIME_LIBRARY AND RELEASE_QUICKTIME_LIBRARY)
+
+ include_directories(
+ ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/quicktime
+ "${QUICKTIME_SDK_DIR}\\CIncludes"
+ )
+endif (DARWIN)
+
+mark_as_advanced(QUICKTIME_LIBRARY)
+
+if (QUICKTIME_LIBRARY)
+ set(QUICKTIME ON CACHE BOOL "Build with QuickTime streaming media support.")
+endif (QUICKTIME_LIBRARY)
+
diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake
index 75b66a85da..6559051b5a 100644
--- a/indra/cmake/Variables.cmake
+++ b/indra/cmake/Variables.cmake
@@ -23,6 +23,7 @@ set(LIBS_SERVER_PREFIX)
set(SCRIPTS_PREFIX ../scripts)
set(SERVER_PREFIX)
set(VIEWER_PREFIX)
+set(INTEGRATION_TESTS_PREFIX)
set(LIBS_CLOSED_DIR ${CMAKE_SOURCE_DIR}/${LIBS_CLOSED_PREFIX})
set(LIBS_OPEN_DIR ${CMAKE_SOURCE_DIR}/${LIBS_OPEN_PREFIX})
diff --git a/indra/cmake/WebKitLibPlugin.cmake b/indra/cmake/WebKitLibPlugin.cmake
new file mode 100644
index 0000000000..9ec23e80ca
--- /dev/null
+++ b/indra/cmake/WebKitLibPlugin.cmake
@@ -0,0 +1,63 @@
+# -*- cmake -*-
+include(Linking)
+include(Prebuilt)
+
+if (STANDALONE)
+ set(WEBKITLIBPLUGIN OFF CACHE BOOL
+ "WEBKITLIBPLUGIN support for the llplugin/llmedia test apps.")
+else (STANDALONE)
+ use_prebuilt_binary(llqtwebkit)
+ set(WEBKITLIBPLUGIN ON CACHE BOOL
+ "WEBKITLIBPLUGIN support for the llplugin/llmedia test apps.")
+endif (STANDALONE)
+
+if (WINDOWS)
+ set(WEBKIT_PLUGIN_LIBRARIES
+ debug llqtwebkitd
+ debug QtWebKitd4
+ debug QtOpenGLd4
+ debug QtNetworkd4
+ debug QtGuid4
+ debug QtCored4
+ debug qtmaind
+ optimized llqtwebkit
+ optimized QtWebKit4
+ optimized QtOpenGL4
+ optimized QtNetwork4
+ optimized QtGui4
+ optimized QtCore4
+ optimized qtmain
+ )
+elseif (DARWIN)
+ set(WEBKIT_PLUGIN_LIBRARIES
+ optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libllqtwebkit.dylib
+ debug ${ARCH_PREBUILT_DIRS_RELEASE}/libllqtwebkit.dylib
+ )
+elseif (LINUX)
+ set(WEBKIT_PLUGIN_LIBRARIES
+ llqtwebkit
+
+ qgif
+# qico
+ qjpeg
+# qpng
+# qtiff
+# qsvg
+
+# QtSvg
+ QtWebKit
+ QtOpenGL
+ QtNetwork
+ QtGui
+ QtCore
+
+ fontconfig
+ X11
+ Xrender
+ GL
+
+# sqlite3
+# Xi
+# SM
+ )
+endif (WINDOWS)