summaryrefslogtreecommitdiff
path: root/indra/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'indra/cmake')
-rwxr-xr-xindra/cmake/00-Common.cmake18
-rwxr-xr-xindra/cmake/Audio.cmake2
-rwxr-xr-xindra/cmake/DBusGlib.cmake2
-rwxr-xr-xindra/cmake/FindAutobuild.cmake26
-rw-r--r--indra/cmake/GLEXT.cmake2
-rwxr-xr-xindra/cmake/GLH.cmake2
-rwxr-xr-xindra/cmake/GLOD.cmake2
-rwxr-xr-xindra/cmake/GoogleMock.cmake10
-rwxr-xr-xindra/cmake/JsonCpp.cmake2
-rw-r--r--indra/cmake/LLAddBuildTest.cmake4
-rw-r--r--indra/cmake/LLAppearanceUtility.cmake2
-rwxr-xr-xindra/cmake/LLSharedLibs.cmake2
-rwxr-xr-xindra/cmake/NDOF.cmake2
-rwxr-xr-xindra/cmake/OPENAL.cmake2
-rwxr-xr-xindra/cmake/Prebuilt.cmake2
-rwxr-xr-xindra/cmake/Variables.cmake53
-rwxr-xr-xindra/cmake/XmlRpcEpi.cmake2
17 files changed, 61 insertions, 74 deletions
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake
index 52b0f4e8b4..d2faa2d8c5 100755
--- a/indra/cmake/00-Common.cmake
+++ b/indra/cmake/00-Common.cmake
@@ -190,22 +190,28 @@ if (DARWIN)
add_definitions(-DLL_DARWIN=1)
set(CMAKE_CXX_LINK_FLAGS "-Wl,-no_compact_unwind -Wl,-headerpad_max_install_names,-search_paths_first")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_CXX_LINK_FLAGS}")
- set(DARWIN_extra_cstar_flags "-mlong-branch -g")
+ set(DARWIN_extra_cstar_flags "-g")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DARWIN_extra_cstar_flags}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${DARWIN_extra_cstar_flags}")
# 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}")
- if (XCODE_VERSION GREATER 4.2)
- set(ENABLE_SIGNING TRUE)
- set(SIGNING_IDENTITY "Developer ID Application: Linden Research, Inc.")
- endif (XCODE_VERSION GREATER 4.2)
+ set(ENABLE_SIGNING TRUE)
+ set(SIGNING_IDENTITY "Developer ID Application: Linden Research, Inc.")
endif (DARWIN)
if (LINUX OR DARWIN)
- set(GCC_WARNINGS "-Wall -Wno-sign-compare -Wno-trigraphs")
+ if (CMAKE_CXX_COMPILER MATCHES ".*clang")
+ set(CMAKE_COMPILER_IS_CLANGXX 1)
+ endif (CMAKE_CXX_COMPILER MATCHES ".*clang")
+
+ if (CMAKE_COMPILER_IS_GNUCXX)
+ set(GCC_WARNINGS "-Wall -Wno-trigraphs")
+ elseif (CMAKE_COMPILER_IS_CLANGXX)
+ set(GCC_WARNINGS "-Wall -Wno-sign-compare -Wno-trigraphs")
+ endif()
if (NOT GCC_DISABLE_FATAL_WARNINGS)
set(GCC_WARNINGS "${GCC_WARNINGS} -Werror")
diff --git a/indra/cmake/Audio.cmake b/indra/cmake/Audio.cmake
index 876b7f82a8..f95439245a 100755
--- a/indra/cmake/Audio.cmake
+++ b/indra/cmake/Audio.cmake
@@ -8,7 +8,7 @@ if (USESYSTEMLIBS)
pkg_check_modules(VORBISENC REQUIRED vorbisenc)
pkg_check_modules(VORBISFILE REQUIRED vorbisfile)
else (USESYSTEMLIBS)
- use_prebuilt_binary(ogg-vorbis)
+ use_prebuilt_binary(ogg_vorbis)
set(VORBIS_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
set(VORBISENC_INCLUDE_DIRS ${VORBIS_INCLUDE_DIRS})
set(VORBISFILE_INCLUDE_DIRS ${VORBIS_INCLUDE_DIRS})
diff --git a/indra/cmake/DBusGlib.cmake b/indra/cmake/DBusGlib.cmake
index d148a35a5b..5e46b6711a 100755
--- a/indra/cmake/DBusGlib.cmake
+++ b/indra/cmake/DBusGlib.cmake
@@ -7,7 +7,7 @@ if (USESYSTEMLIBS)
pkg_check_modules(DBUSGLIB REQUIRED dbus-glib-1)
elseif (LINUX)
- use_prebuilt_binary(dbusglib)
+ use_prebuilt_binary(dbus_glib)
set(DBUSGLIB_FOUND ON FORCE BOOL)
set(DBUSGLIB_INCLUDE_DIRS
${LIBS_PREBUILT_DIR}/include/dbus
diff --git a/indra/cmake/FindAutobuild.cmake b/indra/cmake/FindAutobuild.cmake
index 4b5fd484ae..d831257d4b 100755
--- a/indra/cmake/FindAutobuild.cmake
+++ b/indra/cmake/FindAutobuild.cmake
@@ -6,10 +6,14 @@
#
# AUTOBUILD_EXECUTABLE - path to autobuild or pautobuild executable
-# *TODO - if cmake was executed by autobuild, autobuild will have set the AUTOBUILD env var
-# update this to check for that case
+
IF (NOT AUTOBUILD_EXECUTABLE)
+
+ # If cmake was executed by autobuild, autobuild will have set the AUTOBUILD env var
+ IF (DEFINED ENV{AUTOBUILD})
+ SET(AUTOBUILD_EXECUTABLE $ENV{AUTOBUILD})
+ ELSE (DEFINED ENV{AUTOBUILD})
IF(WIN32)
SET(AUTOBUILD_EXE_NAMES autobuild.cmd autobuild.exe)
ELSE(WIN32)
@@ -27,15 +31,15 @@ IF (NOT AUTOBUILD_EXECUTABLE)
${CMAKE_SOURCE_DIR}/../../..
PATH_SUFFIXES "/autobuild/bin/"
)
+ ENDIF (DEFINED ENV{AUTOBUILD})
- IF (AUTOBUILD_EXECUTABLE)
- GET_FILENAME_COMPONENT(_autobuild_name ${AUTOBUILD_EXECUTABLE} NAME_WE)
- MESSAGE(STATUS "Using autobuild at: ${AUTOBUILD_EXECUTABLE}")
- ELSE (AUTOBUILD_EXECUTABLE)
- IF (AUTOBUILD_FIND_REQUIRED)
- MESSAGE(FATAL_ERROR "Could not find autobuild executable")
- ENDIF (AUTOBUILD_FIND_REQUIRED)
- ENDIF (AUTOBUILD_EXECUTABLE)
+ IF (AUTOBUILD_EXECUTABLE)
+ GET_FILENAME_COMPONENT(_autobuild_name ${AUTOBUILD_EXECUTABLE} NAME_WE)
+ ELSE (AUTOBUILD_EXECUTABLE)
+ IF (AUTOBUILD_FIND_REQUIRED)
+ MESSAGE(FATAL_ERROR "Could not find autobuild executable")
+ ENDIF (AUTOBUILD_FIND_REQUIRED)
+ ENDIF (AUTOBUILD_EXECUTABLE)
- MARK_AS_ADVANCED(AUTOBUILD_EXECUTABLE)
+ MARK_AS_ADVANCED(AUTOBUILD_EXECUTABLE)
ENDIF (NOT AUTOBUILD_EXECUTABLE)
diff --git a/indra/cmake/GLEXT.cmake b/indra/cmake/GLEXT.cmake
index a749644202..415b13033c 100644
--- a/indra/cmake/GLEXT.cmake
+++ b/indra/cmake/GLEXT.cmake
@@ -3,6 +3,6 @@ include(Prebuilt)
if (NOT USESYSTEMLIBS)
use_prebuilt_binary(glext)
- use_prebuilt_binary(glh_linear)
+ use_prebuilt_binary(glh-linear)
set(GLEXT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include)
endif (NOT USESYSTEMLIBS)
diff --git a/indra/cmake/GLH.cmake b/indra/cmake/GLH.cmake
index d5262f2efa..d0992f57b8 100755
--- a/indra/cmake/GLH.cmake
+++ b/indra/cmake/GLH.cmake
@@ -7,5 +7,5 @@ set(GLH_FIND_QUIETLY TRUE)
if (USESYSTEMLIBS)
include(FindGLH)
else (USESYSTEMLIBS)
- use_prebuilt_binary(glh_linear)
+ use_prebuilt_binary(glh-linear)
endif (USESYSTEMLIBS)
diff --git a/indra/cmake/GLOD.cmake b/indra/cmake/GLOD.cmake
index 3683768af9..a347eb6fee 100755
--- a/indra/cmake/GLOD.cmake
+++ b/indra/cmake/GLOD.cmake
@@ -2,7 +2,7 @@
include(Prebuilt)
if (NOT USESYSTEMLIBS)
- use_prebuilt_binary(GLOD)
+ use_prebuilt_binary(glod)
endif (NOT USESYSTEMLIBS)
set(GLOD_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include)
diff --git a/indra/cmake/GoogleMock.cmake b/indra/cmake/GoogleMock.cmake
index cac072988e..5a00546927 100755
--- a/indra/cmake/GoogleMock.cmake
+++ b/indra/cmake/GoogleMock.cmake
@@ -2,20 +2,20 @@
include(Prebuilt)
include(Linking)
-use_prebuilt_binary(gmock)
+use_prebuilt_binary(googlemock)
-set(GOOGLEMOCK_INCLUDE_DIRS
+set(GOOGLEMOCK_INCLUDE_DIRS
${LIBS_PREBUILT_DIR}/include)
if (LINUX)
# VWR-24366: gmock is underlinked, it needs gtest.
- set(GOOGLEMOCK_LIBRARIES
+ set(GOOGLEMOCK_LIBRARIES
gmock -Wl,--no-as-needed
gtest -Wl,--as-needed)
elseif(WINDOWS)
- set(GOOGLEMOCK_LIBRARIES
+ set(GOOGLEMOCK_LIBRARIES
gmock)
- set(GOOGLEMOCK_INCLUDE_DIRS
+ set(GOOGLEMOCK_INCLUDE_DIRS
${LIBS_PREBUILT_DIR}/include
${LIBS_PREBUILT_DIR}/include/gmock
${LIBS_PREBUILT_DIR}/include/gmock/boost/tr1/tr1)
diff --git a/indra/cmake/JsonCpp.cmake b/indra/cmake/JsonCpp.cmake
index 0aab2d6634..d6d05af315 100755
--- a/indra/cmake/JsonCpp.cmake
+++ b/indra/cmake/JsonCpp.cmake
@@ -14,7 +14,7 @@ else (USESYSTEMLIBS)
debug json_vc100debug_libmt.lib
optimized json_vc100_libmt)
elseif (DARWIN)
- set(JSONCPP_LIBRARIES libjson_linux-gcc-4.0.1_libmt.a)
+ set(JSONCPP_LIBRARIES libjson_darwin_libmt.a)
elseif (LINUX)
set(JSONCPP_LIBRARIES libjson_linux-gcc-4.1.3_libmt.a)
endif (WINDOWS)
diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake
index 804624f5ec..ac5c5c6a2a 100644
--- a/indra/cmake/LLAddBuildTest.cmake
+++ b/indra/cmake/LLAddBuildTest.cmake
@@ -137,7 +137,7 @@ INCLUDE(GoogleMock)
#
# Setup test targets
#
- GET_TARGET_PROPERTY(TEST_EXE PROJECT_${project}_TEST_${name} LOCATION)
+ SET(TEST_EXE $<TARGET_FILE:PROJECT_${project}_TEST_${name}>)
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})
@@ -225,7 +225,7 @@ FUNCTION(LL_ADD_INTEGRATION_TEST
# Create the test running command
SET(test_command ${ARGN})
- GET_TARGET_PROPERTY(TEST_EXE INTEGRATION_TEST_${testname} LOCATION)
+ SET(TEST_EXE $<TARGET_FILE:INTEGRATION_TEST_${testname}>)
LIST(FIND test_command "{}" test_exe_pos)
IF(test_exe_pos LESS 0)
# The {} marker means "the full pathname of the test executable."
diff --git a/indra/cmake/LLAppearanceUtility.cmake b/indra/cmake/LLAppearanceUtility.cmake
index bea45543de..709b91c134 100644
--- a/indra/cmake/LLAppearanceUtility.cmake
+++ b/indra/cmake/LLAppearanceUtility.cmake
@@ -4,7 +4,7 @@ include(Prebuilt)
# Linux proprietary build only
if (INSTALL_PROPRIETARY)
if(LINUX)
- use_prebuilt_binary(llappearanceutility-source)
+ use_prebuilt_binary(llappearance_utility)
set(LLAPPEARANCEUTILITY_SRC_DIR ${LIBS_PREBUILT_DIR}/llappearanceutility/src)
set(LLAPPEARANCEUTILITY_BIN_DIR ${CMAKE_BINARY_DIR}/llappearanceutility)
endif (LINUX)
diff --git a/indra/cmake/LLSharedLibs.cmake b/indra/cmake/LLSharedLibs.cmake
index 14dd67f32f..a3c1c871aa 100755
--- a/indra/cmake/LLSharedLibs.cmake
+++ b/indra/cmake/LLSharedLibs.cmake
@@ -1,7 +1,7 @@
# ll_deploy_sharedlibs_command
# target_exe: the cmake target of the executable for which the shared libs will be deployed.
macro(ll_deploy_sharedlibs_command target_exe)
- get_target_property(TARGET_LOCATION ${target_exe} LOCATION)
+ set(TARGET_LOCATION $<TARGET_FILE:${target_exe}>)
get_filename_component(OUTPUT_PATH ${TARGET_LOCATION} PATH)
if(DARWIN)
diff --git a/indra/cmake/NDOF.cmake b/indra/cmake/NDOF.cmake
index e72845db53..8bad96f6b5 100755
--- a/indra/cmake/NDOF.cmake
+++ b/indra/cmake/NDOF.cmake
@@ -8,7 +8,7 @@ if (NDOF)
set(NDOF_FIND_REQUIRED ON)
include(FindNDOF)
else (USESYSTEMLIBS)
- use_prebuilt_binary(ndofdev)
+ use_prebuilt_binary(libndofdev)
if (WINDOWS)
set(NDOF_LIBRARY libndofdev)
diff --git a/indra/cmake/OPENAL.cmake b/indra/cmake/OPENAL.cmake
index c084d68de7..df321cb918 100755
--- a/indra/cmake/OPENAL.cmake
+++ b/indra/cmake/OPENAL.cmake
@@ -16,7 +16,7 @@ if (OPENAL)
pkg_check_modules(OPENAL_LIB REQUIRED openal)
pkg_check_modules(FREEALUT_LIB REQUIRED freealut)
else (USESYSTEMLIBS)
- use_prebuilt_binary(openal_soft)
+ use_prebuilt_binary(openal)
endif (USESYSTEMLIBS)
if(WINDOWS)
set(OPENAL_LIBRARIES
diff --git a/indra/cmake/Prebuilt.cmake b/indra/cmake/Prebuilt.cmake
index e548805148..5d82c9015e 100755
--- a/indra/cmake/Prebuilt.cmake
+++ b/indra/cmake/Prebuilt.cmake
@@ -33,13 +33,11 @@ macro (use_prebuilt_binary _binary)
if(DEBUG_PREBUILT)
message("cd ${CMAKE_SOURCE_DIR} && ${AUTOBUILD_EXECUTABLE} install
--install-dir=${AUTOBUILD_INSTALL_DIR}
- --skip-license-check
${_binary} ")
endif(DEBUG_PREBUILT)
execute_process(COMMAND "${AUTOBUILD_EXECUTABLE}"
install
--install-dir=${AUTOBUILD_INSTALL_DIR}
- --skip-license-check
${_binary}
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
RESULT_VARIABLE ${_binary}_installed
diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake
index 963b1bd386..8e220162ce 100755
--- a/indra/cmake/Variables.cmake
+++ b/indra/cmake/Variables.cmake
@@ -129,44 +129,25 @@ endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(DARWIN 1)
- execute_process(
- COMMAND sh -c "xcodebuild -version | grep Xcode | cut -d ' ' -f2 | cut -d'.' -f1-2"
- OUTPUT_VARIABLE XCODE_VERSION )
-
- # To support a different SDK update these Xcode settings:
- if (XCODE_VERSION GREATER 4.5)
- set(CMAKE_OSX_DEPLOYMENT_TARGET 10.8)
- set(CMAKE_OSX_SYSROOT macosx10.8)
- else (XCODE_VERSION GREATER 4.5)
- if (XCODE_VERSION GREATER 4.2)
- set(CMAKE_OSX_DEPLOYMENT_TARGET 10.6)
- set(CMAKE_OSX_SYSROOT macosx10.7)
- else (XCODE_VERSION GREATER 4.2)
- set(CMAKE_OSX_DEPLOYMENT_TARGET 10.6)
- set(CMAKE_OSX_SYSROOT macosx10.7)
- endif (XCODE_VERSION GREATER 4.2)
- endif (XCODE_VERSION GREATER 4.5)
-
- set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvmgcc42")
+ # now we only support Xcode 6.0 using 10.9 (Mavericks), minimum OS 10.7 (Lion)
+ set(XCODE_VERSION 6.0)
+ set(CMAKE_OSX_DEPLOYMENT_TARGET 10.7)
+ set(CMAKE_OSX_SYSROOT macosx10.9)
+
+ set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvm.clang.1_0")
+ set(CMAKE_XCODE_ATTRIBUTE_GCC_OPTIMIZATION_LEVEL 3)
+ set(CMAKE_XCODE_ATTRIBUTE_GCC_STRICT_ALIASING NO)
+ set(CMAKE_XCODE_ATTRIBUTE_GCC_FAST_MATH YES)
+ set(CMAKE_XCODE_ATTRIBUTE_CLANG_X86_VECTOR_INSTRUCTIONS ssse3)
+ set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libstdc++")
set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT dwarf-with-dsym)
- # NOTE: To attempt an i386/PPC Universal build, add this on the configure line:
- # -DCMAKE_OSX_ARCHITECTURES:STRING='i386;ppc'
- # Build only for i386 by default, system default on MacOSX 10.6 is x86_64
+ # Build only for i386 by default, system default on MacOSX 10.6+ is x86_64
if (NOT CMAKE_OSX_ARCHITECTURES)
- set(CMAKE_OSX_ARCHITECTURES i386)
+ set(CMAKE_OSX_ARCHITECTURES "i386")
endif (NOT CMAKE_OSX_ARCHITECTURES)
- if (CMAKE_OSX_ARCHITECTURES MATCHES "i386" AND CMAKE_OSX_ARCHITECTURES MATCHES "ppc")
- set(ARCH universal)
- else (CMAKE_OSX_ARCHITECTURES MATCHES "i386" AND CMAKE_OSX_ARCHITECTURES MATCHES "ppc")
- if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc")
- set(ARCH ppc)
- else (${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc")
- set(ARCH i386)
- endif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc")
- endif (CMAKE_OSX_ARCHITECTURES MATCHES "i386" AND CMAKE_OSX_ARCHITECTURES MATCHES "ppc")
-
+ set(ARCH ${CMAKE_OSX_ARCHITECTURES})
set(LL_ARCH ${ARCH}_darwin)
set(LL_ARCH_DIR universal-darwin)
set(WORD_SIZE 32)
@@ -177,10 +158,8 @@ set(GRID agni CACHE STRING "Target Grid")
set(VIEWER_CHANNEL "Second Life Test" CACHE STRING "Viewer Channel Name")
-if (XCODE_VERSION GREATER 4.2)
- set(ENABLE_SIGNING OFF CACHE BOOL "Enable signing the viewer")
- set(SIGNING_IDENTITY "" CACHE STRING "Specifies the signing identity to use, if necessary.")
-endif (XCODE_VERSION GREATER 4.2)
+set(ENABLE_SIGNING OFF CACHE BOOL "Enable signing the viewer")
+set(SIGNING_IDENTITY "" CACHE STRING "Specifies the signing identity to use, if necessary.")
set(VERSION_BUILD "0" CACHE STRING "Revision number passed in from the outside")
set(USESYSTEMLIBS OFF CACHE BOOL "Use libraries from your system rather than Linden-supplied prebuilt libraries.")
diff --git a/indra/cmake/XmlRpcEpi.cmake b/indra/cmake/XmlRpcEpi.cmake
index 3a0caa0a06..8c3790ea89 100755
--- a/indra/cmake/XmlRpcEpi.cmake
+++ b/indra/cmake/XmlRpcEpi.cmake
@@ -9,7 +9,7 @@ if (USESYSTEMLIBS)
else (USESYSTEMLIBS)
use_prebuilt_binary(xmlrpc-epi)
if (WINDOWS)
- set(XMLRPCEPI_LIBRARIES
+ set(XMLRPCEPI_LIBRARIES
debug xmlrpc-epid
optimized xmlrpc-epi
)