summaryrefslogtreecommitdiff
path: root/indra/integration_tests
diff options
context:
space:
mode:
Diffstat (limited to 'indra/integration_tests')
-rw-r--r--indra/integration_tests/CMakeLists.txt1
-rw-r--r--indra/integration_tests/llimage_libtest/CMakeLists.txt114
-rw-r--r--indra/integration_tests/llimage_libtest/llimage_libtest.cpp47
-rw-r--r--indra/integration_tests/llimage_libtest/llimage_libtest.h29
4 files changed, 191 insertions, 0 deletions
diff --git a/indra/integration_tests/CMakeLists.txt b/indra/integration_tests/CMakeLists.txt
index 67e8fbf1f2..5935f23fe9 100644
--- a/indra/integration_tests/CMakeLists.txt
+++ b/indra/integration_tests/CMakeLists.txt
@@ -1,3 +1,4 @@
# -*- cmake -*-
add_subdirectory(llui_libtest)
+add_subdirectory(llimage_libtest)
diff --git a/indra/integration_tests/llimage_libtest/CMakeLists.txt b/indra/integration_tests/llimage_libtest/CMakeLists.txt
new file mode 100644
index 0000000000..e3c508659b
--- /dev/null
+++ b/indra/integration_tests/llimage_libtest/CMakeLists.txt
@@ -0,0 +1,114 @@
+# -*- cmake -*-
+
+# Integration tests of the llimage library (JPEG2000 images reading and writing)
+
+if (VIEWER)
+
+project (llimage_libtest)
+
+include(00-Common)
+include(LLCommon)
+include(LLImage)
+include(LLImageJ2COJ)
+include(LLKDU)
+include(LLMath)
+#include(LLVFS) # ugh, needed for LLDir
+#include(LLXML)
+#include(LLXUIXML)
+include(Linking)
+# include(Tut)
+
+include_directories(
+ ${LLCOMMON_INCLUDE_DIRS}
+ ${LLIMAGE_INCLUDE_DIRS}
+ ${LLMATH_INCLUDE_DIRS}
+ )
+
+set(llimage_libtest_SOURCE_FILES
+ llimage_libtest.cpp
+ )
+
+set(llimage_libtest_HEADER_FILES
+ CMakeLists.txt
+ llimage_libtest.h
+ )
+
+set_source_files_properties(${llimage_libtest_HEADER_FILES}
+ PROPERTIES HEADER_FILE_ONLY TRUE)
+
+list(APPEND llimage_libtest_SOURCE_FILES ${llimage_libtest_HEADER_FILES})
+
+add_executable(llimage_libtest ${llimage_libtest_SOURCE_FILES})
+
+# Link with OS-specific libraries
+if (DARWIN)
+ find_library(COCOA_LIBRARY Cocoa)
+ set(OS_LIBRARIES ${COCOA_LIBRARY})
+elseif (WINDOWS)
+ #ll_stack_trace needs this now...
+ list(APPEND WINDOWS_LIBRARIES dbghelp)
+ set(OS_LIBRARIES ${WINDOWS_LIBRARIES})
+elseif (LINUX)
+ set(OS_LIBRARIES)
+else (DARWIN)
+ message(FATAL_ERROR "unknown platform")
+endif (DARWIN)
+
+# Libraries on which this library depends, needed for Linux builds
+# Sort by high-level to low-level
+target_link_libraries(llimage_libtest
+ ${LLIMAGE_LIBRARIES}
+ ${LLKDU_LIBRARIES}
+ ${KDU_LIBRARY}
+ ${LLIMAGEJ2COJ_LIBRARIES}
+ ${OS_LIBRARIES}
+ ${GOOGLE_PERFTOOLS_LIBRARIES}
+ )
+
+if (DARWIN)
+ set_target_properties(llimage_libtest
+ PROPERTIES
+ OUTPUT_NAME "llimage_libtest"
+ MACOSX_BUNDLE_INFO_STRING "llimage test utility"
+ MACOSX_BUNDLE_GUI_IDENTIFIER "llimage_libtest"
+ MACOSX_BUNDLE_LONG_VERSION_STRING "0.5"
+ MACOSX_BUNDLE_BUNDLE_NAME "llimage_libtest"
+ MACOSX_BUNDLE_SHORT_VERSION_STRING "v0.5"
+ MACOSX_BUNDLE_BUNDLE_VERSION "v0.5"
+ MACOSX_BUNDLE_COPYRIGHT "Copyright Linden Lab 2011"
+ )
+ # TODO : Copy over libs in the bundle
+elseif (WINDOWS)
+ set_target_properties(llimage_libtest
+ PROPERTIES
+ LINK_FLAGS "/NODEFAULTLIB:LIBCMT"
+ LINK_FLAGS_DEBUG "/NODEFAULTLIB:MSVCRT /NODEFAULTLIB:LIBCMTD"
+ )
+
+ # Copy over OpenJPEG.dll
+ # *NOTE: On Windows with VS2005, only the first comment prints
+ set(OPENJPEG_RELEASE
+ "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release/openjpeg.dll")
+ add_custom_command( TARGET llimage_libtest POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ ${OPENJPEG_RELEASE} ${CMAKE_CURRENT_BINARY_DIR}
+ COMMENT "Copying OpenJPEG DLLs to binary directory"
+ )
+ set(OPENJPEG_DEBUG
+ "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug/openjpegd.dll")
+ add_custom_command( TARGET llimage_libtest POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ ${OPENJPEG_DEBUG} ${CMAKE_CURRENT_BINARY_DIR}
+ )
+elseif (LINUX)
+ # TODO : please help me get this to build and run for Linux!
+else (DARWIN)
+ message(FATAL_ERROR "unknown platform")
+endif (DARWIN)
+
+# Ensure people working on the viewer don't break this library
+# *NOTE: This could be removed, or only built by TeamCity, if the build
+# and link times become too long.
+add_dependencies(viewer llimage_libtest)
+
+endif (VIEWER)
diff --git a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp
new file mode 100644
index 0000000000..a4a4d10bcb
--- /dev/null
+++ b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp
@@ -0,0 +1,47 @@
+/**
+ * @file llimage_libtest.cpp
+ * @author Merov Linden
+ * @brief Integration test for the llimage library
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+#include "linden_common.h"
+
+#include "llimage_libtest.h"
+
+// linden library includes
+
+#include <iostream>
+
+// *TODO: switch to using TUT
+// *TODO: teach TeamCity about this program, run automatically after full builds
+
+void init_llimage()
+{
+}
+
+int main(int argc, char** argv)
+{
+ init_llimage();
+
+ return 0;
+}
diff --git a/indra/integration_tests/llimage_libtest/llimage_libtest.h b/indra/integration_tests/llimage_libtest/llimage_libtest.h
new file mode 100644
index 0000000000..63f3d46b50
--- /dev/null
+++ b/indra/integration_tests/llimage_libtest/llimage_libtest.h
@@ -0,0 +1,29 @@
+/**
+ * @file llimage_libtest.h
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+#ifndef LLIMAGE_LIBTEST_H
+#define LLIMAGE_LIBTEST_H
+
+
+#endif