diff options
Diffstat (limited to 'indra/cmake/00-Common.cmake')
-rwxr-xr-x[-rw-r--r--] | indra/cmake/00-Common.cmake | 59 |
1 files changed, 20 insertions, 39 deletions
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 084ba7ea98..472f271fa8 100644..100755 --- 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}") @@ -193,7 +176,7 @@ endif (LINUX) if (DARWIN) add_definitions(-DLL_DARWIN=1) - 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}") @@ -249,6 +232,4 @@ else (STANDALONE) ) endif (STANDALONE) -if(SERVER) - include_directories(${LIBS_PREBUILT_DIR}/include/havok) -endif(SERVER) +endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED) |