From 7abecb48babe6a6f09bf6692ba55076546cfced9 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Mon, 1 Dec 2008 17:39:58 -0600 Subject: Second Life viewer sources 1.22.0-RC --- linden/indra/cmake/00-Common.cmake | 8 ++++ linden/indra/cmake/APR.cmake | 21 ++++----- linden/indra/cmake/CopyWinLibs.cmake | 55 +++++++++++++++++++++++ linden/indra/cmake/DBusGlib.cmake | 29 ++++++++++++ linden/indra/cmake/DirectX.cmake | 22 ++++----- linden/indra/cmake/FindMono.cmake | 18 ++++---- linden/indra/cmake/GooglePerfTools.cmake | 6 ++- linden/indra/cmake/LLAudio.cmake | 8 +--- linden/indra/cmake/LLCharacter.cmake | 4 +- linden/indra/cmake/LLCommon.cmake | 8 +--- linden/indra/cmake/LLCrashLogger.cmake | 4 +- linden/indra/cmake/LLDatabase.cmake | 5 +-- linden/indra/cmake/LLImage.cmake | 6 +-- linden/indra/cmake/LLImageJ2COJ.cmake | 5 +-- linden/indra/cmake/LLInventory.cmake | 4 +- linden/indra/cmake/LLKDU.cmake | 2 - linden/indra/cmake/LLMath.cmake | 4 +- linden/indra/cmake/LLMedia.cmake | 7 +-- linden/indra/cmake/LLMessage.cmake | 9 +--- linden/indra/cmake/LLPhysics.cmake | 76 -------------------------------- linden/indra/cmake/LLPrimitive.cmake | 4 +- linden/indra/cmake/LLScene.cmake | 4 +- linden/indra/cmake/LLUI.cmake | 4 +- linden/indra/cmake/LLVFS.cmake | 6 --- linden/indra/cmake/LLXML.cmake | 7 ++- linden/indra/cmake/Linking.cmake | 8 ++-- linden/indra/cmake/Python.cmake | 1 + linden/indra/cmake/QuickTime.cmake | 22 +++++++-- 28 files changed, 167 insertions(+), 190 deletions(-) create mode 100644 linden/indra/cmake/DBusGlib.cmake delete mode 100644 linden/indra/cmake/LLPhysics.cmake (limited to 'linden/indra/cmake') diff --git a/linden/indra/cmake/00-Common.cmake b/linden/indra/cmake/00-Common.cmake index 240853a..bf2d2c3 100644 --- a/linden/indra/cmake/00-Common.cmake +++ b/linden/indra/cmake/00-Common.cmake @@ -49,6 +49,10 @@ if (WINDOWS) ) if(MSVC80 OR MSVC90) + set(CMAKE_CXX_FLAGS_RELEASE + "${CMAKE_CXX_FLAGS_RELEASE} -D_SECURE_STL=0 -D_HAS_ITERATOR_DEBUGGING=0" + CACHE STRING "C++ compiler release options" FORCE) + add_definitions( /Zc:wchar_t- ) @@ -165,6 +169,10 @@ if (DARWIN) set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_CXX_LINK_FLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mlong-branch") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mlong-branch") + # NOTE: it's critical that the optimization flag is put in front. + # NOTE: it's critical to have both CXX_FLAGS and C_FLAGS covered. + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O0 ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") + set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O0 ${CMAKE_C_FLAGS_RELWITHDEBINFO}") endif (DARWIN) diff --git a/linden/indra/cmake/APR.cmake b/linden/indra/cmake/APR.cmake index 2a96d70..523d8ee 100644 --- a/linden/indra/cmake/APR.cmake +++ b/linden/indra/cmake/APR.cmake @@ -15,23 +15,17 @@ if (STANDALONE) else (STANDALONE) use_prebuilt_binary(apr_suite) if (WINDOWS) - set(WINLIBS_PREBUILT_DEBUG_DIR - ${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug - ) - set(WINLIBS_PREBUILT_RELEASE_DIR - ${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release - ) set(APR_LIBRARIES - debug ${WINLIBS_PREBUILT_DEBUG_DIR}/apr-1.lib - optimized ${WINLIBS_PREBUILT_RELEASE_DIR}/apr-1.lib + debug ${ARCH_PREBUILT_DIRS_DEBUG}/apr-1.lib + optimized ${ARCH_PREBUILT_DIRS_RELEASE}/apr-1.lib ) set(APRUTIL_LIBRARIES - debug ${WINLIBS_PREBUILT_DEBUG_DIR}/aprutil-1.lib - optimized ${WINLIBS_PREBUILT_RELEASE_DIR}/aprutil-1.lib + debug ${ARCH_PREBUILT_DIRS_DEBUG}/aprutil-1.lib + optimized ${ARCH_PREBUILT_DIRS_RELEASE}/aprutil-1.lib ) set(APRICONV_LIBRARIES - debug ${WINLIBS_PREBUILT_DEBUG_DIR}/apriconv-1.lib - optimized ${WINLIBS_PREBUILT_RELEASE_DIR}/apriconv-1.lib + debug ${ARCH_PREBUILT_DIRS_DEBUG}/apriconv-1.lib + optimized ${ARCH_PREBUILT_DIRS_RELEASE}/apriconv-1.lib ) elseif (DARWIN) set(APR_LIBRARIES @@ -42,10 +36,11 @@ else (STANDALONE) debug ${ARCH_PREBUILT_DIRS_DEBUG}/libaprutil-1.a optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libaprutil-1.a ) - set(APRICONV_LIBRARIES apriconv-1) + set(APRICONV_LIBRARIES iconv) else (WINDOWS) set(APR_LIBRARIES apr-1) set(APRUTIL_LIBRARIES aprutil-1) + set(APRICONV_LIBRARIES iconv) endif (WINDOWS) set(APR_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/apr-1) diff --git a/linden/indra/cmake/CopyWinLibs.cmake b/linden/indra/cmake/CopyWinLibs.cmake index 345761a..b74ce4f 100644 --- a/linden/indra/cmake/CopyWinLibs.cmake +++ b/linden/indra/cmake/CopyWinLibs.cmake @@ -148,6 +148,61 @@ else(EXISTS ${internal_llkdu_path}) endif (EXISTS ${internal_llkdu_path}) +# Copy MS C runtime dlls, required for packaging. +# *TODO - Adapt this to support VC9 +if (MSVC80) + FIND_PATH(debug_msvc8_redist_path msvcr80d.dll + PATHS + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup\\VC;ProductDir]/redist/Debug_NonRedist/x86/Microsoft.VC80.DebugCRT + ) + + if(EXISTS ${debug_msvc8_redist_path}) + set(debug_msvc8_files + msvcr80d.dll + msvcp80d.dll + Microsoft.VC80.DebugCRT.manifest + ) + + copy_if_different( + ${debug_msvc8_redist_path} + "${CMAKE_CURRENT_BINARY_DIR}/Debug" + out_targets + ${debug_msvc8_files} + ) + set(all_targets ${all_targets} ${out_targets}) + endif (EXISTS ${debug_msvc8_redist_path}) + + FIND_PATH(release_msvc8_redist_path msvcr80.dll + PATHS + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup\\VC;ProductDir]/redist/x86/Microsoft.VC80.CRT + ) + + if(EXISTS ${release_msvc8_redist_path}) + set(release_msvc8_files + msvcr80.dll + msvcp80.dll + Microsoft.VC80.CRT.manifest + ) + + copy_if_different( + ${release_msvc8_redist_path} + "${CMAKE_CURRENT_BINARY_DIR}/Release" + out_targets + ${release_msvc8_files} + ) + set(all_targets ${all_targets} ${out_targets}) + + copy_if_different( + ${release_msvc8_redist_path} + "${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo" + out_targets + ${release_msvc8_files} + ) + set(all_targets ${all_targets} ${out_targets}) + + endif (EXISTS ${release_msvc8_redist_path}) +endif (MSVC80) + add_custom_target(copy_win_libs ALL DEPENDS ${all_targets}) if(EXISTS ${internal_llkdu_path}) diff --git a/linden/indra/cmake/DBusGlib.cmake b/linden/indra/cmake/DBusGlib.cmake new file mode 100644 index 0000000..cfc4ccd --- /dev/null +++ b/linden/indra/cmake/DBusGlib.cmake @@ -0,0 +1,29 @@ +# -*- cmake -*- +include(Prebuilt) + +if (STANDALONE) + include(FindPkgConfig) + + pkg_check_modules(DBUSGLIB REQUIRED dbus-glib-1) + +elseif (LINUX) + use_prebuilt_binary(dbusglib) + set(DBUSGLIB_FOUND ON FORCE BOOL) + set(DBUSGLIB_INCLUDE_DIRS + ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/glib-2.0 + ) + # We don't need to explicitly link against dbus-glib itself, because + # the viewer probes for the system's copy at runtime. + set(DBUSGLIB_LIBRARIES + gobject-2.0 + glib-2.0 + ) +endif (STANDALONE) + +if (DBUSGLIB_FOUND) + set(DBUSGLIB ON CACHE BOOL "Build with dbus-glib message bus support.") +endif (DBUSGLIB_FOUND) + +if (DBUSGLIB) + add_definitions(-DLL_DBUS_ENABLED=1) +endif (DBUSGLIB) diff --git a/linden/indra/cmake/DirectX.cmake b/linden/indra/cmake/DirectX.cmake index 4d2d5e0..d406f37 100644 --- a/linden/indra/cmake/DirectX.cmake +++ b/linden/indra/cmake/DirectX.cmake @@ -3,12 +3,13 @@ if (VIEWER AND WINDOWS) find_path(DIRECTX_INCLUDE_DIR dxdiag.h "$ENV{DXSDK_DIR}/Include" - "C:/Program Files/Microsoft DirectX SDK (June 2008)/Include" - "C:/Program Files/Microsoft DirectX SDK (March 2008)/Include" - "C:/Program Files/Microsoft DirectX SDK (November 2007)/Include" - "C:/Program Files/Microsoft DirectX SDK (August 2007)/Include" + "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2008)/Include" + "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2008)/Include" + "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (March 2008)/Include" + "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (November 2007)/Include" + "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2007)/Include" "C:/DX90SDK/Include" - "C:/Program Files/DX90SDK/Include" + "$ENV{PROGRAMFILES}/DX90SDK/Include" ) if (DIRECTX_INCLUDE_DIR) include_directories(${DIRECTX_INCLUDE_DIR}) @@ -22,12 +23,13 @@ if (VIEWER AND WINDOWS) find_path(DIRECTX_LIBRARY_DIR dxguid.lib "$ENV{DXSDK_DIR}/Lib/x86" - "C:/Program Files/Microsoft DirectX SDK (June 2008)/Lib/x86" - "C:/Program Files/Microsoft DirectX SDK (March 2008)/Lib/x86" - "C:/Program Files/Microsoft DirectX SDK (November 2007)/Lib/x86" - "C:/Program Files/Microsoft DirectX SDK (August 2007)/Lib/x86" + "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2008)/Lib/x86" + "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2008)/Lib/x86" + "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (March 2008)/Lib/x86" + "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (November 2007)/Lib/x86" + "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2007)/Lib/x86" "C:/DX90SDK/Lib" - "C:/Program Files/DX90SDK/Lib" + "$ENV{PROGRAMFILES}/DX90SDK/Lib" ) if (DIRECTX_LIBRARY_DIR) if (DIRECTX_FIND_QUIETLY) diff --git a/linden/indra/cmake/FindMono.cmake b/linden/indra/cmake/FindMono.cmake index f0a0705..c36d725 100644 --- a/linden/indra/cmake/FindMono.cmake +++ b/linden/indra/cmake/FindMono.cmake @@ -14,29 +14,29 @@ # Removed the check for gmcs FIND_PROGRAM (MONO_EXECUTABLE mono - "C:/Program Files/Mono-1.9.1/bin" - "C:/Program Files/Mono-1.2.6/bin" + "$ENV{PROGRAMFILES}/Mono-1.9.1/bin" + "$ENV{PROGRAMFILES}/Mono-1.2.6/bin" /bin /usr/bin /usr/local/bin ) FIND_PROGRAM (MCS_EXECUTABLE mcs - "C:/Program Files/Mono-1.9.1/bin" - "C:/Program Files/Mono-1.2.6/bin" + "$ENV{PROGRAMFILES}/Mono-1.9.1/bin" + "$ENV{PROGRAMFILES}/Mono-1.2.6/bin" /bin /usr/bin /usr/local/bin ) FIND_PROGRAM (GMCS_EXECUTABLE gmcs - "C:/Program Files/Mono-1.9.1/bin" - "C:/Program Files/Mono-1.2.6/bin" + "$ENV{PROGRAMFILES}/Mono-1.9.1/bin" + "$ENV{PROGRAMFILES}/Mono-1.2.6/bin" /bin /usr/bin /usr/local/bin ) FIND_PROGRAM (GACUTIL_EXECUTABLE gacutil - "C:/Program Files/Mono-1.9.1/bin" - "C:/Program Files/Mono-1.2.6/bin" + "$ENV{PROGRAMFILES}/Mono-1.9.1/bin" + "$ENV{PROGRAMFILES}/Mono-1.2.6/bin" /bin /usr/bin /usr/local/bin @@ -44,7 +44,7 @@ FIND_PROGRAM (GACUTIL_EXECUTABLE gacutil FIND_PROGRAM (ILASM_EXECUTABLE ilasm NO_DEFAULT_PATH - PATHS "C:/Program Files/Mono-1.9.1/bin" "C:/Apps/Mono-1.2.6/bin" "C:/Program Files/Mono-1.2.6/bin" /bin /usr/bin /usr/local/bin + PATHS "$ENV{PROGRAMFILES}/Mono-1.9.1/bin" "$ENV{PROGRAMFILES}/Mono-1.2.6/bin" /bin /usr/bin /usr/local/bin ) SET (MONO_FOUND FALSE) diff --git a/linden/indra/cmake/GooglePerfTools.cmake b/linden/indra/cmake/GooglePerfTools.cmake index 9b3eca0..25e9f6d 100644 --- a/linden/indra/cmake/GooglePerfTools.cmake +++ b/linden/indra/cmake/GooglePerfTools.cmake @@ -19,10 +19,14 @@ if (GOOGLE_PERFTOOLS_FOUND) set(USE_GOOGLE_PERFTOOLS ON CACHE BOOL "Build with Google PerfTools support.") endif (GOOGLE_PERFTOOLS_FOUND) +# XXX Disable temporarily, until we have compilation issues on 64-bit +# Etch sorted. +set(USE_GOOGLE_PERFTOOLS OFF) + if (USE_GOOGLE_PERFTOOLS) set(TCMALLOC_FLAG -DLL_USE_TCMALLOC=1) include_directories(${GOOGLE_PERFTOOLS_INCLUDE_DIR}) - set(GOOGLE_PERFTOOLS_LIBRARIES ${TCMALLOC_LIBRARIES} ${STACKTRACE_LIBRARIES}) + set(GOOGLE_PERFTOOLS_LIBRARIES ${TCMALLOC_LIBRARIES} ${STACKTRACE_LIBRARIES} ${PROFILER_LIBRARIES}) else (USE_GOOGLE_PERFTOOLS) set(TCMALLOC_FLAG -ULL_USE_TCMALLOC) endif (USE_GOOGLE_PERFTOOLS) diff --git a/linden/indra/cmake/LLAudio.cmake b/linden/indra/cmake/LLAudio.cmake index 7b9f254..eff643d 100644 --- a/linden/indra/cmake/LLAudio.cmake +++ b/linden/indra/cmake/LLAudio.cmake @@ -6,10 +6,4 @@ set(LLAUDIO_INCLUDE_DIRS ${LIBS_OPEN_DIR}/llaudio ) -set(LLAUDIO_LIBRARIES - llaudio - ${VORBISENC_LIBRARIES} - ${VORBISFILE_LIBRARIES} - ${VORBIS_LIBRARIES} - ${OGG_LIBRARIES} - ) +set(LLAUDIO_LIBRARIES llaudio) diff --git a/linden/indra/cmake/LLCharacter.cmake b/linden/indra/cmake/LLCharacter.cmake index c74092c..9b2f5c4 100644 --- a/linden/indra/cmake/LLCharacter.cmake +++ b/linden/indra/cmake/LLCharacter.cmake @@ -4,6 +4,4 @@ set(LLCHARACTER_INCLUDE_DIRS ${LIBS_OPEN_DIR}/llcharacter ) -set(LLCHARACTER_LIBRARIES - llcharacter - ) +set(LLCHARACTER_LIBRARIES llcharacter) diff --git a/linden/indra/cmake/LLCommon.cmake b/linden/indra/cmake/LLCommon.cmake index f4b251e..410766e 100644 --- a/linden/indra/cmake/LLCommon.cmake +++ b/linden/indra/cmake/LLCommon.cmake @@ -12,10 +12,4 @@ set(LLCOMMON_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ) -set(LLCOMMON_LIBRARIES - llcommon - ${APRUTIL_LIBRARIES} - ${APR_LIBRARIES} - ${EXPAT_LIBRARIES} - ${ZLIB_LIBRARIES} - ) +set(LLCOMMON_LIBRARIES llcommon) diff --git a/linden/indra/cmake/LLCrashLogger.cmake b/linden/indra/cmake/LLCrashLogger.cmake index 7b362d0..f2cb83e 100644 --- a/linden/indra/cmake/LLCrashLogger.cmake +++ b/linden/indra/cmake/LLCrashLogger.cmake @@ -4,6 +4,4 @@ set(LLCRASHLOGGER_INCLUDE_DIRS ${LIBS_OPEN_DIR}/llcrashlogger ) -set(LLCRASHLOGGER_LIBRARIES - llcrashlogger - ) +set(LLCRASHLOGGER_LIBRARIES llcrashlogger) diff --git a/linden/indra/cmake/LLDatabase.cmake b/linden/indra/cmake/LLDatabase.cmake index c3cf622..6526101 100644 --- a/linden/indra/cmake/LLDatabase.cmake +++ b/linden/indra/cmake/LLDatabase.cmake @@ -7,7 +7,4 @@ set(LLDATABASE_INCLUDE_DIRS ${MYSQL_INCLUDE_DIR} ) -set(LLDATABASE_LIBRARIES - lldatabase - ${MYSQL_LIBRARIES} - ) +set(LLDATABASE_LIBRARIES lldatabase) diff --git a/linden/indra/cmake/LLImage.cmake b/linden/indra/cmake/LLImage.cmake index 8874fa5..ec3da89 100644 --- a/linden/indra/cmake/LLImage.cmake +++ b/linden/indra/cmake/LLImage.cmake @@ -8,8 +8,4 @@ set(LLIMAGE_INCLUDE_DIRS ${JPEG_INCLUDE_DIRS} ) -set(LLIMAGE_LIBRARIES - llimage - ${JPEG_LIBRARIES} - ${PNG_LIBRARIES} - ) +set(LLIMAGE_LIBRARIES llimage) diff --git a/linden/indra/cmake/LLImageJ2COJ.cmake b/linden/indra/cmake/LLImageJ2COJ.cmake index 91973e0..1bcf205 100644 --- a/linden/indra/cmake/LLImageJ2COJ.cmake +++ b/linden/indra/cmake/LLImageJ2COJ.cmake @@ -2,7 +2,4 @@ include(OpenJPEG) -set(LLIMAGEJ2COJ_LIBRARIES - llimagej2coj - ${OPENJPEG_LIBRARIES} - ) +set(LLIMAGEJ2COJ_LIBRARIES llimagej2coj) diff --git a/linden/indra/cmake/LLInventory.cmake b/linden/indra/cmake/LLInventory.cmake index 7d5f492..c3dc077 100644 --- a/linden/indra/cmake/LLInventory.cmake +++ b/linden/indra/cmake/LLInventory.cmake @@ -4,6 +4,4 @@ set(LLINVENTORY_INCLUDE_DIRS ${LIBS_OPEN_DIR}/llinventory ) -set(LLINVENTORY_LIBRARIES - llinventory - ) +set(LLINVENTORY_LIBRARIES llinventory) diff --git a/linden/indra/cmake/LLKDU.cmake b/linden/indra/cmake/LLKDU.cmake index a02b5d9..f103dcf 100644 --- a/linden/indra/cmake/LLKDU.cmake +++ b/linden/indra/cmake/LLKDU.cmake @@ -5,8 +5,6 @@ if (NOT STANDALONE AND EXISTS ${LIBS_CLOSED_DIR}/llkdu) use_prebuilt_binary(kdu) if (WINDOWS) set(KDU_LIBRARY debug kdu_cored optimized kdu_core) - elseif (LINUX) - set(KDU_LIBRARY kdu_v42R) else (WINDOWS) set(KDU_LIBRARY kdu) endif (WINDOWS) diff --git a/linden/indra/cmake/LLMath.cmake b/linden/indra/cmake/LLMath.cmake index 8afd45e..893920a 100644 --- a/linden/indra/cmake/LLMath.cmake +++ b/linden/indra/cmake/LLMath.cmake @@ -4,6 +4,4 @@ set(LLMATH_INCLUDE_DIRS ${LIBS_OPEN_DIR}/llmath ) -set(LLMATH_LIBRARIES - llmath - ) +set(LLMATH_LIBRARIES llmath) diff --git a/linden/indra/cmake/LLMedia.cmake b/linden/indra/cmake/LLMedia.cmake index b7bf11c..91c7818 100644 --- a/linden/indra/cmake/LLMedia.cmake +++ b/linden/indra/cmake/LLMedia.cmake @@ -7,9 +7,4 @@ set(LLMEDIA_INCLUDE_DIRS ${LIBS_OPEN_DIR}/llmedia ) -set(LLMEDIA_LIBRARIES - llmedia - ${GSTREAMER_LIBRARIES} - ${GSTREAMER_PLUGINS_BASE_LIBRARIES} - ${QUICKTIME_LIBRARY} - ) +set(LLMEDIA_LIBRARIES llmedia) diff --git a/linden/indra/cmake/LLMessage.cmake b/linden/indra/cmake/LLMessage.cmake index 1cea03a..0143d04 100644 --- a/linden/indra/cmake/LLMessage.cmake +++ b/linden/indra/cmake/LLMessage.cmake @@ -12,11 +12,4 @@ set(LLMESSAGE_INCLUDE_DIRS ${OPENSSL_INCLUDE_DIRS} ) -set(LLMESSAGE_LIBRARIES - llmessage - ${CURL_LIBRARIES} - ${CARES_LIBRARIES} - ${OPENSSL_LIBRARIES} - ${CRYPTO_LIBRARIES} - ${XMLRPCEPI_LIBRARIES} - ) +set(LLMESSAGE_LIBRARIES llmessage) diff --git a/linden/indra/cmake/LLPhysics.cmake b/linden/indra/cmake/LLPhysics.cmake deleted file mode 100644 index 3ae390e..0000000 --- a/linden/indra/cmake/LLPhysics.cmake +++ /dev/null @@ -1,76 +0,0 @@ -# -*- cmake -*- -include(Prebuilt) - -use_prebuilt_binary(havok) - -set(HAVOK_VERSION 460) - -set(LLPHYSICS_INCLUDE_DIRS - ${LIBS_SERVER_DIR}/llphysics - ${LIBS_PREBUILT_DIR}/include/havok/hk${HAVOK_VERSION}/common - ${LIBS_PREBUILT_DIR}/include/havok/hk${HAVOK_VERSION}/physics - ) - -add_definitions(-DLL_CURRENT_HAVOK_VERSION=${HAVOK_VERSION}) - -if (LINUX OR DARWIN) - if (DARWIN) - link_directories( - ${LIBS_PREBUILT_DIR}/universal-darwin/lib_release/havok/hk460 - ) - else (DARWIN) - link_directories( - ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib_release/havok/hk460 - ) - endif (DARWIN) - - set(LLPHYSICS_LIBRARIES - llphysics - hkcompat - hkutilities - hkvisualize - hkdynamics - hkvehicle - hkcollide - hkinternal - hkconstraintsolver - hkmath - hkscenedata - hkserialize - hkgraphicsogl - hkgraphicsbridge - hkgraphics - hkdemoframework - hkbase - ) -elseif (WINDOWS) - if (MSVC71) - set(HK_DEBUG ${WINLIBS_PREBUILT_DEBUG_DIR}/havok/hk460) - set(HK_RELEASE ${WINLIBS_PREBUILT_RELEASE_DIR}/havok/hk460) - else (MSVC71) - set(HK_DEBUG ${WINLIBS_PREBUILT_DEBUG_DIR}/havok/hk460_net_8-0) - set(HK_RELEASE ${WINLIBS_PREBUILT_RELEASE_DIR}/havok/hk460_net_8-0) - endif (MSVC71) - - set(HAVOK_LIBS - hkbase - hkdynamics - hkmath - hkcollide - hkutilities - hkvisualize - hkinternal - hkconstraintsolver - hkcompat - hkserialize - hkvehicle - hkscenedata - ) - - set(LLPHYSICS_LIBRARIES llphysics) - - foreach(lib ${HAVOK_LIBS}) - list(APPEND LLPHYSICS_LIBRARIES - debug ${HK_DEBUG}/${lib} optimized ${HK_RELEASE}/${lib}) - endforeach(lib) -endif (LINUX OR DARWIN) diff --git a/linden/indra/cmake/LLPrimitive.cmake b/linden/indra/cmake/LLPrimitive.cmake index 0426ae5..d397b78 100644 --- a/linden/indra/cmake/LLPrimitive.cmake +++ b/linden/indra/cmake/LLPrimitive.cmake @@ -4,6 +4,4 @@ set(LLPRIMITIVE_INCLUDE_DIRS ${LIBS_OPEN_DIR}/llprimitive ) -set(LLPRIMITIVE_LIBRARIES - llprimitive - ) +set(LLPRIMITIVE_LIBRARIES llprimitive) diff --git a/linden/indra/cmake/LLScene.cmake b/linden/indra/cmake/LLScene.cmake index d1c32b3..96ad508 100644 --- a/linden/indra/cmake/LLScene.cmake +++ b/linden/indra/cmake/LLScene.cmake @@ -4,6 +4,4 @@ set(LLSCENE_INCLUDE_DIRS ${LIBS_SERVER_DIR}/llscene ) -set(LLSCENE_LIBRARIES - llscene - ) +set(LLSCENE_LIBRARIES llscene) diff --git a/linden/indra/cmake/LLUI.cmake b/linden/indra/cmake/LLUI.cmake index d1287de..34de571 100644 --- a/linden/indra/cmake/LLUI.cmake +++ b/linden/indra/cmake/LLUI.cmake @@ -4,6 +4,4 @@ set(LLUI_INCLUDE_DIRS ${LIBS_OPEN_DIR}/llui ) -set(LLUI_LIBRARIES - llui - ) +set(LLUI_LIBRARIES llui) diff --git a/linden/indra/cmake/LLVFS.cmake b/linden/indra/cmake/LLVFS.cmake index 5ce3d25..0fe87cd 100644 --- a/linden/indra/cmake/LLVFS.cmake +++ b/linden/indra/cmake/LLVFS.cmake @@ -5,9 +5,3 @@ set(LLVFS_INCLUDE_DIRS ) set(LLVFS_LIBRARIES llvfs) - -if (DARWIN) - include(CMakeFindFrameworks) - find_library(CARBON_LIBRARY Carbon) - list(APPEND LLVFS_LIBRARIES ${CARBON_LIBRARY}) -endif (DARWIN) diff --git a/linden/indra/cmake/LLXML.cmake b/linden/indra/cmake/LLXML.cmake index 1ce93c0..64dfdb6 100644 --- a/linden/indra/cmake/LLXML.cmake +++ b/linden/indra/cmake/LLXML.cmake @@ -1,13 +1,12 @@ # -*- cmake -*- +include(Boost) include(EXPAT) set(LLXML_INCLUDE_DIRS ${LIBS_OPEN_DIR}/llxml + ${Boost_INCLUDE_DIRS} ${EXPAT_INCLUDE_DIRS} ) -set(LLXML_LIBRARIES - llxml - ${EXPAT_LIBRARIES} - ) +set(LLXML_LIBRARIES llxml) diff --git a/linden/indra/cmake/Linking.cmake b/linden/indra/cmake/Linking.cmake index c9748e3..167c5dd 100644 --- a/linden/indra/cmake/Linking.cmake +++ b/linden/indra/cmake/Linking.cmake @@ -7,15 +7,15 @@ if (NOT STANDALONE) set(ARCH_PREBUILT_DIRS_DEBUG ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib/debug) elseif (LINUX) if (VIEWER) - set(ARCH_PREBUILT_DIRS - ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib_release_client) - set(ARCH_PREBUILT_DIRS_RELEASE ${ARCH_PREBUILT_DIRS}) - set(ARCH_PREBUILT_DIRS_DEBUG ${ARCH_PREBUILT_DIRS}) + set(ARCH_PREBUILT_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib_release_client) else (VIEWER) set(ARCH_PREBUILT_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib_release) endif (VIEWER) + set(ARCH_PREBUILT_DIRS_RELEASE ${ARCH_PREBUILT_DIRS}) + set(ARCH_PREBUILT_DIRS_DEBUG ${ARCH_PREBUILT_DIRS}) elseif (DARWIN) set(ARCH_PREBUILT_DIRS_RELEASE ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib_release) + set(ARCH_PREBUILT_DIRS ${ARCH_PREBUILT_DIRS_RELEASE}) set(ARCH_PREBUILT_DIRS_DEBUG ${ARCH_PREBUILT_DIRS_RELEASE}) endif (WINDOWS) endif (NOT STANDALONE) diff --git a/linden/indra/cmake/Python.cmake b/linden/indra/cmake/Python.cmake index e9505fb..4f86d32 100644 --- a/linden/indra/cmake/Python.cmake +++ b/linden/indra/cmake/Python.cmake @@ -9,6 +9,7 @@ if (WINDOWS) NAMES python25.exe python23.exe python.exe NO_DEFAULT_PATH # added so that cmake does not find cygwin python PATHS + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.6\\InstallPath] [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath] [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath] [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath] diff --git a/linden/indra/cmake/QuickTime.cmake b/linden/indra/cmake/QuickTime.cmake index b79ac11..4352709 100644 --- a/linden/indra/cmake/QuickTime.cmake +++ b/linden/indra/cmake/QuickTime.cmake @@ -9,13 +9,29 @@ if (DARWIN) include(CMakeFindFrameworks) find_library(QUICKTIME_LIBRARY QuickTime) elseif (WINDOWS) - set(QUICKTIME_SDK_DIR "C:\\Program Files\\QuickTime SDK" + set(QUICKTIME_SDK_DIR "$ENV{PROGRAMFILES}/QuickTime SDK" CACHE PATH "Location of the QuickTime SDK.") - find_library(QUICKTIME_LIBRARY qtmlclient + + find_library(DEBUG_QUICKTIME_LIBRARY qtmlclient + PATHS + ${ARCH_PREBUILT_DIRS_DEBUG} + "${QUICKTIME_SDK_DIR}\\libraries" + ) + + find_library(RELEASE_QUICKTIME_LIBRARY qtmlclient PATHS - ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib/release + ${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" -- cgit v1.1 From 22b861982f2efd5d16097a012627e73b9fb85834 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Tue, 9 Dec 2008 22:25:37 -0600 Subject: Second Life viewer sources 1.22.2-RC --- linden/indra/cmake/CopyWinLibs.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'linden/indra/cmake') diff --git a/linden/indra/cmake/CopyWinLibs.cmake b/linden/indra/cmake/CopyWinLibs.cmake index b74ce4f..d4ddb23 100644 --- a/linden/indra/cmake/CopyWinLibs.cmake +++ b/linden/indra/cmake/CopyWinLibs.cmake @@ -153,7 +153,8 @@ endif (EXISTS ${internal_llkdu_path}) if (MSVC80) FIND_PATH(debug_msvc8_redist_path msvcr80d.dll PATHS - [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup\\VC;ProductDir]/redist/Debug_NonRedist/x86/Microsoft.VC80.DebugCRT + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup\\VC;ProductDir]/redist/Debug_NonRedist/x86/Microsoft.VC80.DebugCRT + NO_DEFAULT_PATH ) if(EXISTS ${debug_msvc8_redist_path}) @@ -174,7 +175,8 @@ if (MSVC80) FIND_PATH(release_msvc8_redist_path msvcr80.dll PATHS - [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup\\VC;ProductDir]/redist/x86/Microsoft.VC80.CRT + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup\\VC;ProductDir]/redist/x86/Microsoft.VC80.CRT + NO_DEFAULT_PATH ) if(EXISTS ${release_msvc8_redist_path}) -- cgit v1.1 From 61f97b33f9850d21965d397b947a298c16ba576d Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Thu, 12 Feb 2009 02:06:41 -0600 Subject: Second Life viewer sources 1.22.8-RC --- linden/indra/cmake/CopyWinLibs.cmake | 5 ----- linden/indra/cmake/LLAudio.cmake | 9 ++++++++- linden/indra/cmake/OPENAL.cmake | 28 ++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 6 deletions(-) create mode 100644 linden/indra/cmake/OPENAL.cmake (limited to 'linden/indra/cmake') diff --git a/linden/indra/cmake/CopyWinLibs.cmake b/linden/indra/cmake/CopyWinLibs.cmake index d4ddb23..92b5d71 100644 --- a/linden/indra/cmake/CopyWinLibs.cmake +++ b/linden/indra/cmake/CopyWinLibs.cmake @@ -8,12 +8,7 @@ include(CMakeCopyIfDifferent) set(vivox_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/i686-win32") set(vivox_files - tntk.dll - libeay32.dll SLVoice.exe - ssleay32.dll - SLVoiceAgent.exe - srtp.dll alut.dll vivoxsdk.dll ortp.dll diff --git a/linden/indra/cmake/LLAudio.cmake b/linden/indra/cmake/LLAudio.cmake index eff643d..ff479f6 100644 --- a/linden/indra/cmake/LLAudio.cmake +++ b/linden/indra/cmake/LLAudio.cmake @@ -6,4 +6,11 @@ set(LLAUDIO_INCLUDE_DIRS ${LIBS_OPEN_DIR}/llaudio ) -set(LLAUDIO_LIBRARIES llaudio) +set(LLAUDIO_LIBRARIES + llaudio + ${VORBISENC_LIBRARIES} + ${VORBISFILE_LIBRARIES} + ${VORBIS_LIBRARIES} + ${OGG_LIBRARIES} + ${OPENAL_LIBRARIES} + ) diff --git a/linden/indra/cmake/OPENAL.cmake b/linden/indra/cmake/OPENAL.cmake new file mode 100644 index 0000000..eb195a0 --- /dev/null +++ b/linden/indra/cmake/OPENAL.cmake @@ -0,0 +1,28 @@ +# -*- cmake -*- +include(Linking) +include(Prebuilt) + +if (LINUX) + set(OPENAL ON CACHE BOOL "Enable OpenAL") +else (LINUX) + set(OPENAL OFF CACHE BOOL "Enable OpenAL") +endif (LINUX) + +if (OPENAL) + if (STANDALONE) + include(FindPkgConfig) + include(FindOpenAL) + pkg_check_modules(OPENAL_LIB REQUIRED openal) + pkg_check_modules(FREEALUT_LIB REQUIRED freealut) + else (STANDALONE) + use_prebuilt_binary(openal) + endif (STANDALONE) + set(OPENAL_LIBRARIES + openal + alut + ) +endif (OPENAL) + +if (OPENAL) + message(STATUS "Building with OpenAL audio support") +endif (OPENAL) -- cgit v1.1