summaryrefslogtreecommitdiff
path: root/indra/cmake/00-Common.cmake
diff options
context:
space:
mode:
authordolphin <dolphin@lindenlab.com>2013-04-04 17:10:28 -0700
committerdolphin <dolphin@lindenlab.com>2013-04-04 17:10:28 -0700
commit56badfe3498b5eeefb5c06c4b0d51eb1c62ded9c (patch)
treec1b61940e39d615201e18259bcab1762c5a8c655 /indra/cmake/00-Common.cmake
parentf684d897f532bcba87cda1f72bd19efac82f6cb6 (diff)
parent460c81070e5fa1c51ce7e186a9ecb8c5f1c995e1 (diff)
Merge with viewer-development
Diffstat (limited to 'indra/cmake/00-Common.cmake')
-rw-r--r--indra/cmake/00-Common.cmake59
1 files changed, 20 insertions, 39 deletions
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake
index 452fd5f356..fb5c759493 100644
--- a/indra/cmake/00-Common.cmake
+++ b/indra/cmake/00-Common.cmake
@@ -2,6 +2,9 @@
#
# Compilation options shared by all Second Life components.
+if(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
+set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES")
+
include(Variables)
# Portable compilation flags.
@@ -150,41 +153,21 @@ if (LINUX)
-pthread
)
- if (SERVER)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth-60")
- if (EXISTS /etc/debian_version)
- FILE(READ /etc/debian_version DEBIAN_VERSION)
- else (EXISTS /etc/debian_version)
- set(DEBIAN_VERSION "")
- endif (EXISTS /etc/debian_version)
-
- if (NOT DEBIAN_VERSION STREQUAL "3.1")
- add_definitions(-DCTYPE_WORKAROUND)
- endif (NOT DEBIAN_VERSION STREQUAL "3.1")
-
- if (EXISTS /usr/lib/mysql4/mysql)
- link_directories(/usr/lib/mysql4/mysql)
- endif (EXISTS /usr/lib/mysql4/mysql)
-
- endif (SERVER)
-
- if (VIEWER)
- add_definitions(-DAPPID=secondlife)
- add_definitions(-fvisibility=hidden)
- # don't catch SIGCHLD in our base application class for the viewer - some of our 3rd party libs may need their *own* SIGCHLD handler to work. Sigh! The viewer doesn't need to catch SIGCHLD anyway.
- add_definitions(-DLL_IGNORE_SIGCHLD)
- if (WORD_SIZE EQUAL 32)
- add_definitions(-march=pentium4)
- endif (WORD_SIZE EQUAL 32)
- add_definitions(-mfpmath=sse)
- #add_definitions(-ftree-vectorize) # THIS CRASHES GCC 3.1-3.2
- if (NOT STANDALONE)
- # this stops us requiring a really recent glibc at runtime
- add_definitions(-fno-stack-protector)
- # linking can be very memory-hungry, especially the final viewer link
- set(CMAKE_CXX_LINK_FLAGS "-Wl,--no-keep-memory")
- endif (NOT STANDALONE)
- endif (VIEWER)
+ add_definitions(-DAPPID=secondlife)
+ add_definitions(-fvisibility=hidden)
+ # don't catch SIGCHLD in our base application class for the viewer - some of our 3rd party libs may need their *own* SIGCHLD handler to work. Sigh! The viewer doesn't need to catch SIGCHLD anyway.
+ add_definitions(-DLL_IGNORE_SIGCHLD)
+ if (WORD_SIZE EQUAL 32)
+ add_definitions(-march=pentium4)
+ endif (WORD_SIZE EQUAL 32)
+ add_definitions(-mfpmath=sse)
+ #add_definitions(-ftree-vectorize) # THIS CRASHES GCC 3.1-3.2
+ if (NOT STANDALONE)
+ # this stops us requiring a really recent glibc at runtime
+ add_definitions(-fno-stack-protector)
+ # linking can be very memory-hungry, especially the final viewer link
+ set(CMAKE_CXX_LINK_FLAGS "-Wl,--no-keep-memory")
+ endif (NOT STANDALONE)
set(CMAKE_CXX_FLAGS_DEBUG "-fno-inline ${CMAKE_CXX_FLAGS_DEBUG}")
set(CMAKE_CXX_FLAGS_RELEASE "-O2 ${CMAKE_CXX_FLAGS_RELEASE}")
@@ -198,7 +181,7 @@ if (DARWIN)
# ucontext_t struct when _XOPEN_SOURCE is not defined (rdar://problem/5578699 ).
# As a workaround, define _XOPEN_SOURCE before including ucontext.h.
add_definitions(-DLL_DARWIN=1 -D_XOPEN_SOURCE)
- set(CMAKE_CXX_LINK_FLAGS "-Wl,-headerpad_max_install_names,-search_paths_first")
+ 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(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DARWIN_extra_cstar_flags}")
@@ -254,6 +237,4 @@ else (STANDALONE)
)
endif (STANDALONE)
-if(SERVER)
- include_directories(${LIBS_PREBUILT_DIR}/include/havok)
-endif(SERVER)
+endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)