From d1ad7a56beee603b336600d4aace1e4d4c0f5ade Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Sat, 2 Oct 2010 18:30:52 -0700 Subject: STORM-137 : Build script modif so that Windows build does not rely on fmod.dll being dropped in the source tree + addition to allow fmod to be found in standalone. Caution: wait an upcoming install.xml commit before pulling if building internaly. --- indra/cmake/CMakeLists.txt | 1 + indra/cmake/Copy3rdPartyLibs.cmake | 37 ++++---------------- indra/cmake/FMOD.cmake | 69 ++++++++++++-------------------------- indra/cmake/FindFMOD.cmake | 50 +++++++++++++++++++++++++++ 4 files changed, 79 insertions(+), 78 deletions(-) mode change 100644 => 100755 indra/cmake/CMakeLists.txt mode change 100644 => 100755 indra/cmake/Copy3rdPartyLibs.cmake mode change 100644 => 100755 indra/cmake/FMOD.cmake create mode 100755 indra/cmake/FindFMOD.cmake (limited to 'indra/cmake') diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt old mode 100644 new mode 100755 index 4fc25dcc24..6470836286 --- a/indra/cmake/CMakeLists.txt +++ b/indra/cmake/CMakeLists.txt @@ -26,6 +26,7 @@ set(cmake_SOURCE_FILES FindBerkeleyDB.cmake FindCARes.cmake FindELFIO.cmake + FindFMOD.cmake FindGooglePerfTools.cmake FindMono.cmake FindMT.cmake diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake old mode 100644 new mode 100755 index 95ed5d6bc8..e852cf463c --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -55,9 +55,10 @@ if(WINDOWS) set(release_files ${release_files} libtcmalloc_minimal.dll) endif(USE_GOOGLE_PERFTOOLS) - if (FMOD_SDK_DIR) - set(fmod_files fmod.dll) - endif (FMOD_SDK_DIR) + if (FMOD) + set(debug_files ${debug_files} fmod.dll) + set(release_files ${release_files} fmod.dll) + endif (FMOD) #******************************* # LLKDU @@ -237,9 +238,9 @@ elseif(LINUX) libssl.so.0.9.7 ) - if (FMOD_SDK_DIR) - set(fmod_files "libfmod-3.75.so") - endif (FMOD_SDK_DIR) + if (FMOD) + set(release_files ${release_files} "libfmod-3.75.so") + endif (FMOD) #******************************* # LLKDU @@ -333,30 +334,6 @@ copy_if_different( ) set(third_party_targets ${third_party_targets} ${out_targets}) -if (FMOD_SDK_DIR) - copy_if_different( - ${FMOD_SDK_DIR} - "${CMAKE_CURRENT_BINARY_DIR}/Debug" - out_targets - ${fmod_files} - ) - set(all_targets ${all_targets} ${out_targets}) - copy_if_different( - ${FMOD_SDK_DIR} - "${CMAKE_CURRENT_BINARY_DIR}/Release" - out_targets - ${fmod_files} - ) - set(all_targets ${all_targets} ${out_targets}) - copy_if_different( - ${FMOD_SDK_DIR} - "${CMAKE_CURRENT_BINARY_DIR}/RelWithDbgInfo" - out_targets - ${fmod_files} - ) - set(all_targets ${all_targets} ${out_targets}) -endif (FMOD_SDK_DIR) - #******************************* # LLKDU set(internal_llkdu_path "${CMAKE_SOURCE_DIR}/llkdu") diff --git a/indra/cmake/FMOD.cmake b/indra/cmake/FMOD.cmake old mode 100644 new mode 100755 index 759b8f1340..4582017bcb --- a/indra/cmake/FMOD.cmake +++ b/indra/cmake/FMOD.cmake @@ -1,62 +1,35 @@ # -*- cmake -*- +include(Prebuilt) -include(Linking) +set(FMOD_FIND_QUIETLY OFF) +set(FMOD_FIND_REQUIRED OFF) -if(INSTALL_PROPRIETARY) - include(Prebuilt) +if (STANDALONE) + include(FindFMOD) +else (STANDALONE) use_prebuilt_binary(fmod) -endif(INSTALL_PROPRIETARY) - -find_library(FMOD_LIBRARY_RELEASE - NAMES fmod fmodvc fmod-3.75 - PATHS - ${ARCH_PREBUILT_DIRS_RELEASE} - ) - -find_library(FMOD_LIBRARY_DEBUG - NAMES fmod fmodvc fmod-3.75 - PATHS - ${ARCH_PREBUILT_DIRS_DEBUG} - ) - -if (FMOD_LIBRARY_RELEASE AND FMOD_LIBRARY_DEBUG) - set(FMOD_LIBRARY - debug ${FMOD_LIBRARY_DEBUG} - optimized ${FMOD_LIBRARY_RELEASE}) -elseif (FMOD_LIBRARY_RELEASE) - set(FMOD_LIBRARY ${FMOD_LIBRARY_RELEASE}) -endif (FMOD_LIBRARY_RELEASE AND FMOD_LIBRARY_DEBUG) - -if (NOT FMOD_LIBRARY) - set(FMOD_SDK_DIR CACHE PATH "Path to the FMOD SDK.") - if (FMOD_SDK_DIR) - find_library(FMOD_LIBRARY - NAMES fmodvc fmod-3.75 fmod - PATHS - ${FMOD_SDK_DIR}/api/lib - ${FMOD_SDK_DIR}/api - ${FMOD_SDK_DIR}/lib - ${FMOD_SDK_DIR} - ) - endif (FMOD_SDK_DIR) -endif (NOT FMOD_LIBRARY) - -find_path(FMOD_INCLUDE_DIR fmod.h - ${LIBS_PREBUILT_DIR}/include - ${FMOD_SDK_DIR}/api/inc - ${FMOD_SDK_DIR}/inc - ${FMOD_SDK_DIR} - ) + + if (WINDOWS) + set(FMOD_LIBRARY fmod) + elseif (DARWIN) + set(FMOD_LIBRARY fmod) + elseif (LINUX) + set(FMOD_LIBRARY fmod-3.75) + endif (WINDOWS) + SET(FMOD_LIBRARIES ${FMOD_LIBRARY}) + + set(FMOD_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include) +endif (STANDALONE) if (FMOD_LIBRARY AND FMOD_INCLUDE_DIR) - set(FMOD ON CACHE BOOL "Use closed source FMOD sound library.") + set(FMOD ON CACHE BOOL "Use FMOD sound library.") else (FMOD_LIBRARY AND FMOD_INCLUDE_DIR) set(FMOD_LIBRARY "") set(FMOD_INCLUDE_DIR "") if (FMOD) - message(STATUS "No support for FMOD audio (need to set FMOD_SDK_DIR?)") + message(STATUS "No support for FMOD audio found.") endif (FMOD) - set(FMOD OFF CACHE BOOL "Use closed source FMOD sound library.") + set(FMOD OFF CACHE BOOL "FMOD sound library not used.") endif (FMOD_LIBRARY AND FMOD_INCLUDE_DIR) if (FMOD) diff --git a/indra/cmake/FindFMOD.cmake b/indra/cmake/FindFMOD.cmake new file mode 100755 index 0000000000..3659e97e61 --- /dev/null +++ b/indra/cmake/FindFMOD.cmake @@ -0,0 +1,50 @@ +# -*- cmake -*- + +# - Find FMOD +# Find the FMOD includes and library +# This module defines +# FMOD_INCLUDE_DIR, where to find fmod.h and fmod_errors.h +# FMOD_LIBRARIES, the libraries needed to use FMOD. +# FMOD, If false, do not try to use FMOD. +# also defined, but not for general use are +# FMOD_LIBRARY, where to find the FMOD library. + +FIND_PATH(FMOD_INCLUDE_DIR fmod.h +/usr/local/include/fmod +/usr/local/include +/usr/include/fmod +/usr/include +) + +SET(FMOD_NAMES ${FMOD_NAMES} fmod fmodvc fmod-3.75) +FIND_LIBRARY(FMOD_LIBRARY + NAMES ${FMOD_NAMES} + PATHS /usr/lib /usr/local/lib + ) + +IF (FMOD_LIBRARY AND FMOD_INCLUDE_DIR) + SET(FMOD_LIBRARIES ${FMOD_LIBRARY}) + SET(FMOD "YES") +ELSE (FMOD_LIBRARY AND FMOD_INCLUDE_DIR) + SET(FMOD "NO") +ENDIF (FMOD_LIBRARY AND FMOD_INCLUDE_DIR) + + +IF (FMOD) + IF (NOT FMOD_FIND_QUIETLY) + MESSAGE(STATUS "Found FMOD: ${FMOD_LIBRARIES}") + ENDIF (NOT FMOD_FIND_QUIETLY) +ELSE (FMOD) + IF (FMOD_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could not find FMOD library") + ENDIF (FMOD_FIND_REQUIRED) +ENDIF (FMOD) + +# Deprecated declarations. +SET (NATIVE_FMOD_INCLUDE_PATH ${FMOD_INCLUDE_DIR} ) +GET_FILENAME_COMPONENT (NATIVE_FMOD_LIB_PATH ${FMOD_LIBRARY} PATH) + +MARK_AS_ADVANCED( + FMOD_LIBRARY + FMOD_INCLUDE_DIR + ) -- cgit v1.2.3 From 8f77ebbcd9e4814fb19b8875aea1b1cf52a28e75 Mon Sep 17 00:00:00 2001 From: "Boroondas Gupte (patch by Aleric Inglewood)" Date: Tue, 12 Oct 2010 00:39:23 +0200 Subject: SNOW-756 / VWR-23385 FIXED standalone LD_LIBRARY_PATH for unit tests Used patch from https://jira.secondlife.com/secure/attachment/41586/SNOW-756-standalone_tests.diff patching file indra/cmake/LLAddBuildTest.cmake Hunk #1 succeeded at 259 with fuzz 2 (offset 1 line). Added entry in doc/contributions.txt. No further changes. originally commited to Snowglobe 2.1 at http://svn.secondlife.com/trac/linden/changeset/3515 --- indra/cmake/LLAddBuildTest.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/cmake') diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index e0c0ae2246..d0f21a1e38 100644 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -257,7 +257,11 @@ MACRO(SET_TEST_LIST LISTVAR) 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) + IF (STANDALONE) + set(${LISTVAR} ${CMAKE_BINARY_DIR}/llcommon /usr/lib /usr/local/lib) + ELSE (STANDALONE) + set(${LISTVAR} ${SHARED_LIB_STAGING_DIR} /usr/lib) + ENDIF (STANDALONE) ENDIF(WINDOWS) ENDMACRO(SET_TEST_LIST) -- cgit v1.2.3 From e26f812e0d7edb2b50cc94e27f822ebe94a3647a Mon Sep 17 00:00:00 2001 From: Boroondas Gupte Date: Tue, 12 Oct 2010 00:41:46 +0200 Subject: SNOW-756 / VWR-23385 FOLLOWUP fixed indentation --- indra/cmake/LLAddBuildTest.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index d0f21a1e38..33f24d5410 100644 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -257,10 +257,10 @@ MACRO(SET_TEST_LIST LISTVAR) 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. - IF (STANDALONE) + IF (STANDALONE) set(${LISTVAR} ${CMAKE_BINARY_DIR}/llcommon /usr/lib /usr/local/lib) ELSE (STANDALONE) - set(${LISTVAR} ${SHARED_LIB_STAGING_DIR} /usr/lib) + set(${LISTVAR} ${SHARED_LIB_STAGING_DIR} /usr/lib) ENDIF (STANDALONE) ENDIF(WINDOWS) ENDMACRO(SET_TEST_LIST) -- cgit v1.2.3 From 54065ab2f9262cac67a5a3d00aed3f6348383bfc Mon Sep 17 00:00:00 2001 From: Techwolf Lupindo Date: Tue, 12 Oct 2010 00:48:27 -0400 Subject: Clean up and rework FMOD.cmake and FindFMOD.cmake FMOD.cmake: Move include(Prebuilt) to prebuilt section. It is only used for prebuilt anyway. set(FMOD_FIND_REQUIRED ON) due to FMOD variable is use elsewhere in cmake files. This behaviour is the same as openal. Remove redudent error messages and code due to above. Rework the logic to be more cleaner. Clean up whitespace. FindFMOD.cmake Remove redudent paths as cmake allready uses them as default. Use PATH_SUFFIXES instead. The above will result in cmake looking in a lot more places and can handle custom build setups better. Change FMOD to FMOD_FOUND. FMOD should not be change withen cmake. Whitespace cleanup. --- indra/cmake/FMOD.cmake | 51 +++++++++++++++++----------------------------- indra/cmake/FindFMOD.cmake | 37 ++++++++++++++------------------- 2 files changed, 34 insertions(+), 54 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/FMOD.cmake b/indra/cmake/FMOD.cmake index 4582017bcb..96434e38fa 100755 --- a/indra/cmake/FMOD.cmake +++ b/indra/cmake/FMOD.cmake @@ -1,37 +1,24 @@ # -*- cmake -*- -include(Prebuilt) -set(FMOD_FIND_QUIETLY OFF) -set(FMOD_FIND_REQUIRED OFF) - -if (STANDALONE) - include(FindFMOD) -else (STANDALONE) - use_prebuilt_binary(fmod) - - if (WINDOWS) - set(FMOD_LIBRARY fmod) - elseif (DARWIN) - set(FMOD_LIBRARY fmod) - elseif (LINUX) - set(FMOD_LIBRARY fmod-3.75) - endif (WINDOWS) - SET(FMOD_LIBRARIES ${FMOD_LIBRARY}) - - set(FMOD_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include) -endif (STANDALONE) - -if (FMOD_LIBRARY AND FMOD_INCLUDE_DIR) - set(FMOD ON CACHE BOOL "Use FMOD sound library.") -else (FMOD_LIBRARY AND FMOD_INCLUDE_DIR) - set(FMOD_LIBRARY "") - set(FMOD_INCLUDE_DIR "") - if (FMOD) - message(STATUS "No support for FMOD audio found.") - endif (FMOD) - set(FMOD OFF CACHE BOOL "FMOD sound library not used.") -endif (FMOD_LIBRARY AND FMOD_INCLUDE_DIR) +set(FMOD ON CACHE BOOL "Use FMOD sound library.") if (FMOD) - message(STATUS "Building with FMOD audio support") + if (STANDALONE) + set(FMOD_FIND_REQUIRED ON) + include(FindFMOD) + else (STANDALONE) + include(Prebuilt) + use_prebuilt_binary(fmod) + + if (WINDOWS) + set(FMOD_LIBRARY fmod) + elseif (DARWIN) + set(FMOD_LIBRARY fmod) + elseif (LINUX) + set(FMOD_LIBRARY fmod-3.75) + endif (WINDOWS) + + SET(FMOD_LIBRARIES ${FMOD_LIBRARY}) + set(FMOD_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include) + endif (STANDALONE) endif (FMOD) diff --git a/indra/cmake/FindFMOD.cmake b/indra/cmake/FindFMOD.cmake index 3659e97e61..c49c7537d8 100755 --- a/indra/cmake/FindFMOD.cmake +++ b/indra/cmake/FindFMOD.cmake @@ -9,36 +9,29 @@ # also defined, but not for general use are # FMOD_LIBRARY, where to find the FMOD library. -FIND_PATH(FMOD_INCLUDE_DIR fmod.h -/usr/local/include/fmod -/usr/local/include -/usr/include/fmod -/usr/include -) +FIND_PATH(FMOD_INCLUDE_DIR fmod.h PATH_SUFFIXES fmod) -SET(FMOD_NAMES ${FMOD_NAMES} fmod fmodvc fmod-3.75) FIND_LIBRARY(FMOD_LIBRARY - NAMES ${FMOD_NAMES} - PATHS /usr/lib /usr/local/lib + NAMES fmod fmodvc fmod-3.75 + PATH_SUFFIXES fmod ) IF (FMOD_LIBRARY AND FMOD_INCLUDE_DIR) - SET(FMOD_LIBRARIES ${FMOD_LIBRARY}) - SET(FMOD "YES") + SET(FMOD_LIBRARIES ${FMOD_LIBRARY}) + SET(FMOD_FOUND "YES") ELSE (FMOD_LIBRARY AND FMOD_INCLUDE_DIR) - SET(FMOD "NO") + SET(FMOD_FOUND "NO") ENDIF (FMOD_LIBRARY AND FMOD_INCLUDE_DIR) - -IF (FMOD) - IF (NOT FMOD_FIND_QUIETLY) - MESSAGE(STATUS "Found FMOD: ${FMOD_LIBRARIES}") - ENDIF (NOT FMOD_FIND_QUIETLY) -ELSE (FMOD) - IF (FMOD_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could not find FMOD library") - ENDIF (FMOD_FIND_REQUIRED) -ENDIF (FMOD) +IF (FMOD_FOUND) + IF (NOT FMOD_FIND_QUIETLY) + MESSAGE(STATUS "Found FMOD: ${FMOD_LIBRARIES}") + ENDIF (NOT FMOD_FIND_QUIETLY) +ELSE (FMOD_FOUND) + IF (FMOD_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could not find FMOD library") + ENDIF (FMOD_FIND_REQUIRED) +ENDIF (FMOD_FOUND) # Deprecated declarations. SET (NATIVE_FMOD_INCLUDE_PATH ${FMOD_INCLUDE_DIR} ) -- cgit v1.2.3 From 5ec1ffe5a3192ce387c0482d8c216507cbff3f44 Mon Sep 17 00:00:00 2001 From: Techwolf Lupindo Date: Tue, 12 Oct 2010 00:58:23 -0400 Subject: Allow the passing of addational fmod lib names via FMOD_NAMES from the build envorment. This will allow one to pass via command line custom fmod lib names. ie: -DFMOD_NAMES:STRING:"fmod-4.44" --- indra/cmake/FindFMOD.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/cmake') diff --git a/indra/cmake/FindFMOD.cmake b/indra/cmake/FindFMOD.cmake index c49c7537d8..e60b386027 100755 --- a/indra/cmake/FindFMOD.cmake +++ b/indra/cmake/FindFMOD.cmake @@ -11,8 +11,9 @@ FIND_PATH(FMOD_INCLUDE_DIR fmod.h PATH_SUFFIXES fmod) +SET(FMOD_NAMES ${FMOD_NAMES} fmod fmodvc fmod-3.75) FIND_LIBRARY(FMOD_LIBRARY - NAMES fmod fmodvc fmod-3.75 + NAMES ${FMOD_NAMES} PATH_SUFFIXES fmod ) -- cgit v1.2.3 From d53613b5ae7fd14da79b90b9fc65fa9938e331af Mon Sep 17 00:00:00 2001 From: Boroondas Gupte Date: Sat, 16 Oct 2010 17:11:47 +0200 Subject: VWR-23455: Don't download FMOD unless INSTALL_PROPRIETARY is TRUE --- indra/cmake/FMOD.cmake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/FMOD.cmake b/indra/cmake/FMOD.cmake index 4582017bcb..fd9d5fe197 100755 --- a/indra/cmake/FMOD.cmake +++ b/indra/cmake/FMOD.cmake @@ -1,5 +1,7 @@ # -*- cmake -*- -include(Prebuilt) +if (INSTALL_PROPRIETARY) + include(Prebuilt) +endif (INSTALL_PROPRIETARY) set(FMOD_FIND_QUIETLY OFF) set(FMOD_FIND_REQUIRED OFF) @@ -7,7 +9,9 @@ set(FMOD_FIND_REQUIRED OFF) if (STANDALONE) include(FindFMOD) else (STANDALONE) - use_prebuilt_binary(fmod) + if (INSTALL_PROPRIETARY) + use_prebuilt_binary(fmod) + endif (INSTALL_PROPRIETARY) if (WINDOWS) set(FMOD_LIBRARY fmod) -- cgit v1.2.3 From 90c2c4a9bc3a604c58c3c82e458391cb9c533555 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 27 Oct 2010 16:19:18 -0500 Subject: SH-392 Port over fix from mesh-development for FBOs on OSX --- indra/cmake/Variables.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/cmake') diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 230e228c62..5dc0cabf03 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -87,7 +87,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") if (NOT CMAKE_OSX_DEPLOYMENT_TARGET) # NOTE: setting -isysroot is NOT adequate: http://lists.apple.com/archives/Xcode-users/2007/Oct/msg00696.html # see http://public.kitware.com/Bug/view.php?id=9959 + poppy - set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.4u.sdk) + set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.5.sdk) set(CMAKE_OSX_DEPLOYMENT_TARGET 10.4) endif (NOT CMAKE_OSX_DEPLOYMENT_TARGET) -- cgit v1.2.3