summaryrefslogtreecommitdiff
path: root/indra/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'indra/cmake')
-rw-r--r--indra/cmake/00-Common.cmake4
-rw-r--r--indra/cmake/CARes.cmake1
-rw-r--r--indra/cmake/FindTut.cmake31
-rw-r--r--indra/cmake/LLAddBuildTest.cmake47
-rw-r--r--indra/cmake/LLKDU.cmake26
-rw-r--r--indra/cmake/LLSharedLibs.cmake17
-rw-r--r--indra/cmake/LLTestCommand.cmake17
-rw-r--r--indra/cmake/Tut.cmake10
-rw-r--r--indra/cmake/WebKitLibPlugin.cmake63
-rw-r--r--indra/cmake/cmake_dummy.cpp36
-rw-r--r--indra/cmake/run_build_test.py21
11 files changed, 109 insertions, 164 deletions
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake
index a114d6e778..592e9fc901 100644
--- a/indra/cmake/00-Common.cmake
+++ b/indra/cmake/00-Common.cmake
@@ -74,10 +74,6 @@ if (WINDOWS)
if (NOT VS_DISABLE_FATAL_WARNINGS)
add_definitions(/WX)
endif (NOT VS_DISABLE_FATAL_WARNINGS)
-
- # configure win32 API for windows XP+ compatibility
- set(WINVER "0x0501" CACHE STRING "Win32 API Target version (see http://msdn.microsoft.com/en-us/library/aa383745%28v=VS.85%29.aspx)")
- add_definitions("/DWINVER=${WINVER}" "/D_WIN32_WINNT=${WINVER}")
endif (WINDOWS)
diff --git a/indra/cmake/CARes.cmake b/indra/cmake/CARes.cmake
index 1850b706ac..8a2dc01561 100644
--- a/indra/cmake/CARes.cmake
+++ b/indra/cmake/CARes.cmake
@@ -9,7 +9,6 @@ if (STANDALONE)
include(FindCARes)
else (STANDALONE)
use_prebuilt_binary(ares)
- add_definitions("-DCARES_STATICLIB")
if (WINDOWS)
set(CARES_LIBRARIES areslib)
elseif (DARWIN)
diff --git a/indra/cmake/FindTut.cmake b/indra/cmake/FindTut.cmake
deleted file mode 100644
index b5d58f6396..0000000000
--- a/indra/cmake/FindTut.cmake
+++ /dev/null
@@ -1,31 +0,0 @@
-# -*- cmake -*-
-
-# - Find Tut
-# Find the Tut unit test framework includes and library
-# This module defines
-# TUT_INCLUDE_DIR, where to find tut.h, etc.
-# TUT_FOUND, If false, do not try to use Tut.
-
-find_path(TUT_INCLUDE_DIR tut.h
- /usr/local/include/
- /usr/include
- )
-
-if (TUT_INCLUDE_DIR)
- set(TUT_FOUND "YES")
-else (TUT_INCLUDE_DIR)
- set(TUT_FOUND "NO")
-endif (TUT_INCLUDE_DIR)
-
-if (TUT_FOUND)
- if (NOT TUT_FIND_QUIETLY)
- message(STATUS "Found Tut: ${TUT_INCLUDE_DIR}")
- set(TUT_FIND_QUIETLY TRUE) # Only alert us the first time
- endif (NOT TUT_FIND_QUIETLY)
-else (TUT_FOUND)
- if (TUT_FIND_REQUIRED)
- message(FATAL_ERROR "Could not find Tut")
- endif (TUT_FIND_REQUIRED)
-endif (TUT_FOUND)
-
-mark_as_advanced(TUT_INCLUDE_DIR)
diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake
index a6a7989955..bf4d9b72a9 100644
--- a/indra/cmake/LLAddBuildTest.cmake
+++ b/indra/cmake/LLAddBuildTest.cmake
@@ -107,7 +107,7 @@ INCLUDE(GoogleMock)
# Setup target
ADD_EXECUTABLE(PROJECT_${project}_TEST_${name} ${${name}_test_SOURCE_FILES})
- SET_TARGET_PROPERTIES(PROJECT_${project}_TEST_${name} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${EXE_STAGING_DIR}")
+ SET_TARGET_PROPERTIES(PROJECT_${project}_TEST_${name} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${EXE_STAGING_DIR})
#
# Per-codefile additional / external project dep and lib dep property extraction
@@ -137,13 +137,21 @@ INCLUDE(GoogleMock)
SET(TEST_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/PROJECT_${project}_TEST_${name}_ok.txt)
SET(TEST_CMD ${TEST_EXE} --touch=${TEST_OUTPUT} --sourcedir=${CMAKE_CURRENT_SOURCE_DIR})
- # daveh - what configuration does this use? Debug? it's cmake-time, not build time. + poppy 2009-04-19
+ # daveh - what configuration does this use? Debug? it's cmake-time, not build time. + poppy 2009-04-19
IF(LL_TEST_VERBOSE)
MESSAGE(STATUS "LL_ADD_PROJECT_UNIT_TESTS ${name} test_cmd = ${TEST_CMD}")
ENDIF(LL_TEST_VERBOSE)
+
+ IF(WINDOWS)
+ set(LD_LIBRARY_PATH ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR})
+ ELSEIF(DARWIN)
+ set(LD_LIBRARY_PATH ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/Resources:/usr/lib)
+ ELSE(WINDOWS)
+ set(LD_LIBRARY_PATH ${SHARED_LIB_STAGING_DIR}:/usr/lib)
+ ENDIF(WINDOWS)
- SET_TEST_PATH(LD_LIBRARY_PATH)
- LL_TEST_COMMAND(TEST_SCRIPT_CMD "${LD_LIBRARY_PATH}" ${TEST_CMD})
+ LL_TEST_COMMAND("${LD_LIBRARY_PATH}" ${TEST_CMD})
+ SET(TEST_SCRIPT_CMD ${LL_TEST_COMMAND_value})
IF(LL_TEST_VERBOSE)
MESSAGE(STATUS "LL_ADD_PROJECT_UNIT_TESTS ${name} test_script = ${TEST_SCRIPT_CMD}")
ENDIF(LL_TEST_VERBOSE)
@@ -196,7 +204,7 @@ FUNCTION(LL_ADD_INTEGRATION_TEST
message(STATUS "ADD_EXECUTABLE(INTEGRATION_TEST_${testname} ${source_files})")
endif(TEST_DEBUG)
ADD_EXECUTABLE(INTEGRATION_TEST_${testname} ${source_files})
- SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${EXE_STAGING_DIR}")
+ SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${EXE_STAGING_DIR})
# Add link deps to the executable
if(TEST_DEBUG)
@@ -225,8 +233,16 @@ FUNCTION(LL_ADD_INTEGRATION_TEST
LIST(INSERT test_command test_exe_pos "${TEST_EXE}")
ENDIF (test_exe_pos LESS 0)
- SET_TEST_PATH(LD_LIBRARY_PATH)
- LL_TEST_COMMAND(TEST_SCRIPT_CMD "${LD_LIBRARY_PATH}" ${test_command})
+ IF(WINDOWS)
+ set(LD_LIBRARY_PATH ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR})
+ ELSEIF(DARWIN)
+ set(LD_LIBRARY_PATH ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/Resources:/usr/lib)
+ ELSE(WINDOWS)
+ set(LD_LIBRARY_PATH ${SHARED_LIB_STAGING_DIR}:/usr/lib)
+ ENDIF(WINDOWS)
+
+ LL_TEST_COMMAND("${LD_LIBRARY_PATH}" ${test_command})
+ SET(TEST_SCRIPT_CMD ${LL_TEST_COMMAND_value})
if(TEST_DEBUG)
message(STATUS "TEST_SCRIPT_CMD: ${TEST_SCRIPT_CMD}")
@@ -242,20 +258,3 @@ FUNCTION(LL_ADD_INTEGRATION_TEST
# ADD_TEST(INTEGRATION_TEST_RUNNER_${testname} ${TEST_SCRIPT_CMD})
ENDFUNCTION(LL_ADD_INTEGRATION_TEST)
-
-MACRO(SET_TEST_PATH LISTVAR)
- IF(WINDOWS)
- # We typically build/package only Release variants of third-party
- # libraries, so append the Release staging dir in case the library being
- # sought doesn't have a debug variant.
- set(${LISTVAR} ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR} ${SHARED_LIB_STAGING_DIR}/Release)
- ELSEIF(DARWIN)
- # We typically build/package only Release variants of third-party
- # libraries, so append the Release staging dir in case the library being
- # sought doesn't have a debug variant.
- set(${LISTVAR} ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/Resources ${SHARED_LIB_STAGING_DIR}/Release/Resources /usr/lib)
- ELSE(WINDOWS)
- # Linux uses a single staging directory anyway.
- set(${LISTVAR} ${SHARED_LIB_STAGING_DIR} /usr/lib)
- ENDIF(WINDOWS)
-ENDMACRO(SET_TEST_PATH)
diff --git a/indra/cmake/LLKDU.cmake b/indra/cmake/LLKDU.cmake
index fbe410c25f..6b69388896 100644
--- a/indra/cmake/LLKDU.cmake
+++ b/indra/cmake/LLKDU.cmake
@@ -1,20 +1,18 @@
# -*- cmake -*-
include(Prebuilt)
-if (INSTALL_PROPRIETARY AND NOT STANDALONE)
+if (INSTALL_PROPRIETARY AND NOT STANDALONE AND EXISTS ${LIBS_CLOSED_DIR}/llkdu)
use_prebuilt_binary(kdu)
- if (EXISTS ${LIBS_CLOSED_DIR}/llkdu)
- if (WINDOWS)
- set(KDU_LIBRARY debug kdu_cored optimized kdu_core)
- else (WINDOWS)
- set(KDU_LIBRARY kdu)
- endif (WINDOWS)
+ if (WINDOWS)
+ set(KDU_LIBRARY debug kdu_cored optimized kdu_core)
+ else (WINDOWS)
+ set(KDU_LIBRARY kdu)
+ endif (WINDOWS)
- set(KDU_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include)
+ set(KDU_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include)
- set(LLKDU_LIBRARY llkdu)
- set(LLKDU_STATIC_LIBRARY llkdu_static)
- set(LLKDU_LIBRARIES ${LLKDU_LIBRARY})
- set(LLKDU_STATIC_LIBRARIES ${LLKDU_STATIC_LIBRARY})
- endif (EXISTS ${LIBS_CLOSED_DIR}/llkdu)
-endif (INSTALL_PROPRIETARY AND NOT STANDALONE)
+ set(LLKDU_LIBRARY llkdu)
+ set(LLKDU_STATIC_LIBRARY llkdu_static)
+ set(LLKDU_LIBRARIES ${LLKDU_LIBRARY})
+ set(LLKDU_STATIC_LIBRARIES ${LLKDU_STATIC_LIBRARY})
+endif (INSTALL_PROPRIETARY AND NOT STANDALONE AND EXISTS ${LIBS_CLOSED_DIR}/llkdu)
diff --git a/indra/cmake/LLSharedLibs.cmake b/indra/cmake/LLSharedLibs.cmake
index e29076c738..6f602680f4 100644
--- a/indra/cmake/LLSharedLibs.cmake
+++ b/indra/cmake/LLSharedLibs.cmake
@@ -5,21 +5,20 @@ macro(ll_deploy_sharedlibs_command target_exe)
get_filename_component(OUTPUT_PATH ${TARGET_LOCATION} PATH)
if(DARWIN)
- SET_TEST_PATH(SEARCH_DIRS)
+ set(SEARCH_DIRS "${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/Resources")
get_target_property(IS_BUNDLE ${target_exe} MACOSX_BUNDLE)
if(IS_BUNDLE)
- # If its a bundle the exe is not in the target location, this should find it.
+ # If its a bundle the exe is not in the target location, this should find it.
get_filename_component(TARGET_FILE ${TARGET_LOCATION} NAME)
set(OUTPUT_PATH ${TARGET_LOCATION}.app/Contents/MacOS)
set(TARGET_LOCATION ${OUTPUT_PATH}/${TARGET_FILE})
- set(OUTPUT_PATH ${OUTPUT_PATH}/../Resources)
+ set(OUTPUT_PATH ${OUTPUT_PATH}/../Resources)
endif(IS_BUNDLE)
elseif(WINDOWS)
- SET_TEST_PATH(SEARCH_DIRS)
- LIST(APPEND SEARCH_DIRS "$ENV{SystemRoot}/system32")
+ set(SEARCH_DIRS "${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}" "$ENV{SystemRoot}/system32")
elseif(LINUX)
- SET_TEST_PATH(SEARCH_DIRS)
- set(OUTPUT_PATH ${OUTPUT_PATH}/lib)
+ set(SEARCH_DIRS "${SHARED_LIB_STAGING_DIR}")
+ set(OUTPUT_PATH ${OUTPUT_PATH}/lib)
endif(DARWIN)
add_custom_command(
@@ -50,7 +49,7 @@ macro(ll_stage_sharedlib DSO_TARGET)
else(DARWIN)
set(SHARED_LIB_STAGING_DIR_CONFIG ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR})
endif(DARWIN)
-
+
# *TODO - maybe make this a symbolic link? -brad
add_custom_command(
TARGET ${DSO_TARGET} POST_BUILD
@@ -72,4 +71,4 @@ macro(ll_stage_sharedlib DSO_TARGET)
)
endif(DARWIN)
-endmacro(ll_stage_sharedlib)
+endmacro(ll_stage_sharedlib) \ No newline at end of file
diff --git a/indra/cmake/LLTestCommand.cmake b/indra/cmake/LLTestCommand.cmake
index 554559edbd..fae5640493 100644
--- a/indra/cmake/LLTestCommand.cmake
+++ b/indra/cmake/LLTestCommand.cmake
@@ -1,16 +1,13 @@
-MACRO(LL_TEST_COMMAND OUTVAR LD_LIBRARY_PATH)
+MACRO(LL_TEST_COMMAND LD_LIBRARY_PATH)
# nat wonders how Kitware can use the term 'function' for a construct that
# cannot return a value. And yet, variables you set inside a FUNCTION are
# local. Try a MACRO instead.
- SET(value
+ SET(LL_TEST_COMMAND_value
${PYTHON_EXECUTABLE}
"${CMAKE_SOURCE_DIR}/cmake/run_build_test.py")
- FOREACH(dir ${LD_LIBRARY_PATH})
- LIST(APPEND value "-l${dir}")
- ENDFOREACH(dir)
- LIST(APPEND value ${ARGN})
- SET(${OUTVAR} ${value})
-##IF(LL_TEST_VERBOSE)
-## MESSAGE(STATUS "LL_TEST_COMMAND: ${value}")
-##ENDIF(LL_TEST_VERBOSE)
+ IF(LD_LIBRARY_PATH)
+ LIST(APPEND LL_TEST_COMMAND_value "-l${LD_LIBRARY_PATH}")
+ ENDIF(LD_LIBRARY_PATH)
+ LIST(APPEND LL_TEST_COMMAND_value ${ARGN})
+##MESSAGE(STATUS "Will run: ${LL_TEST_COMMAND_value}")
ENDMACRO(LL_TEST_COMMAND)
diff --git a/indra/cmake/Tut.cmake b/indra/cmake/Tut.cmake
index 784560471d..7488e9dcb0 100644
--- a/indra/cmake/Tut.cmake
+++ b/indra/cmake/Tut.cmake
@@ -1,12 +1,6 @@
# -*- cmake -*-
include(Prebuilt)
-set(TUT_FIND_REQUIRED TRUE)
-set(TUT_FIND_QUIETLY TRUE)
-
-if (STANDALONE)
- include(FindTut)
- include_directories(${TUT_INCLUDE_DIR})
-else (STANDALONE)
+if (NOT STANDALONE)
use_prebuilt_binary(tut)
-endif (STANDALONE)
+endif(NOT STANDALONE)
diff --git a/indra/cmake/WebKitLibPlugin.cmake b/indra/cmake/WebKitLibPlugin.cmake
index 12ba1b1b35..1c572ab27f 100644
--- a/indra/cmake/WebKitLibPlugin.cmake
+++ b/indra/cmake/WebKitLibPlugin.cmake
@@ -3,46 +3,48 @@ include(Linking)
include(Prebuilt)
if (STANDALONE)
- set(WEBKITLIBPLUGIN OFF CACHE BOOL
- "WEBKITLIBPLUGIN support for the llplugin/llmedia test apps.")
+ 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.")
+ 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
- )
+ 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
- )
+ set(WEBKIT_PLUGIN_LIBRARIES
+ optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libllqtwebkit.dylib
+ debug ${ARCH_PREBUILT_DIRS_RELEASE}/libllqtwebkit.dylib
+ )
elseif (LINUX)
- if (STANDALONE)
- set(WEBKIT_PLUGIN_LIBRARIES llqtwebkit)
- else (STANDALONE)
set(WEBKIT_PLUGIN_LIBRARIES
llqtwebkit
qgif
+# qico
qjpeg
+# qpng
+# qtiff
+# qsvg
+# QtSvg
QtWebKit
QtOpenGL
QtNetwork
@@ -54,6 +56,9 @@ elseif (LINUX)
X11
Xrender
GL
+
+# sqlite3
+# Xi
+# SM
)
- endif (STANDALONE)
endif (WINDOWS)
diff --git a/indra/cmake/cmake_dummy.cpp b/indra/cmake/cmake_dummy.cpp
index ae4475a73e..25191e2a18 100644
--- a/indra/cmake/cmake_dummy.cpp
+++ b/indra/cmake/cmake_dummy.cpp
@@ -1,24 +1,30 @@
/**
* @file cmake_dummy.cpp
*
- * $LicenseInfo:firstyear=2008&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
+ * $LicenseInfo:firstyear=2008&license=viewergpl$
+ *
+ * Copyright (c) 2008-2009, 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.
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
*
- * 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.
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
*
- * 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
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
*
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
* $/LicenseInfo$
*/
diff --git a/indra/cmake/run_build_test.py b/indra/cmake/run_build_test.py
index 104585c195..0f6967e42a 100644
--- a/indra/cmake/run_build_test.py
+++ b/indra/cmake/run_build_test.py
@@ -22,25 +22,8 @@ python run_build_test.py -DFOO=bar myprog somearg otherarg
sets environment variable FOO=bar, then runs:
myprog somearg otherarg
-$LicenseInfo:firstyear=2009&license=viewerlgpl$
-Second Life Viewer Source Code
-Copyright (C) 2010, 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:firstyear=2009&license=internal$
+Copyright (c) 2009, Linden Research, Inc.
$/LicenseInfo$
"""