diff options
-rw-r--r-- | linden/indra/cmake/00-Common.cmake | 8 | ||||
-rw-r--r-- | linden/indra/cmake/LLCommon.cmake | 13 | ||||
-rw-r--r-- | linden/indra/llcommon/CMakeLists.txt | 20 | ||||
-rw-r--r--[-rwxr-xr-x] | linden/indra/llplugin/CMakeLists.txt | 4 | ||||
-rw-r--r--[-rwxr-xr-x] | linden/indra/media_plugins/base/CMakeLists.txt | 4 | ||||
-rw-r--r--[-rwxr-xr-x] | linden/indra/media_plugins/example/CMakeLists.txt | 4 | ||||
-rw-r--r--[-rwxr-xr-x] | linden/indra/media_plugins/gstreamer010/CMakeLists.txt | 4 | ||||
-rw-r--r-- | linden/indra/media_plugins/webkit/CMakeLists.txt | 4 | ||||
-rw-r--r-- | linden/indra/newview/CMakeLists.txt | 2 |
9 files changed, 62 insertions, 1 deletions
diff --git a/linden/indra/cmake/00-Common.cmake b/linden/indra/cmake/00-Common.cmake index d335cb0..6403d49 100644 --- a/linden/indra/cmake/00-Common.cmake +++ b/linden/indra/cmake/00-Common.cmake | |||
@@ -20,6 +20,14 @@ set(CMAKE_CONFIGURATION_TYPES "RelWithDebInfo;Release;Debug" CACHE STRING | |||
20 | "Supported build types." FORCE) | 20 | "Supported build types." FORCE) |
21 | 21 | ||
22 | 22 | ||
23 | # Determine the number of bits of this processor | ||
24 | |||
25 | if(CMAKE_SIZEOF_VOID_P MATCHES 4) | ||
26 | set( HAVE_64_BIT 0 ) | ||
27 | else(CMAKE_SIZEOF_VOID_P MATCHES 4) | ||
28 | set( HAVE_64_BIT 1 ) | ||
29 | endif(CMAKE_SIZEOF_VOID_P MATCHES 4) | ||
30 | |||
23 | # Platform-specific compilation flags. | 31 | # Platform-specific compilation flags. |
24 | 32 | ||
25 | if (WINDOWS) | 33 | if (WINDOWS) |
diff --git a/linden/indra/cmake/LLCommon.cmake b/linden/indra/cmake/LLCommon.cmake index 410766e..9158e98 100644 --- a/linden/indra/cmake/LLCommon.cmake +++ b/linden/indra/cmake/LLCommon.cmake | |||
@@ -12,4 +12,15 @@ set(LLCOMMON_INCLUDE_DIRS | |||
12 | ${Boost_INCLUDE_DIRS} | 12 | ${Boost_INCLUDE_DIRS} |
13 | ) | 13 | ) |
14 | 14 | ||
15 | set(LLCOMMON_LIBRARIES llcommon) | 15 | # Files that need PIC code (pluginAPI) need to set REQUIRE_PIC on 64bit systems |
16 | # this will link against a llcommon built with Position Independent Code | ||
17 | # this is a requirment to link a static library (.a) to a DSO on 64 bit systems | ||
18 | |||
19 | if(REQUIRE_PIC) | ||
20 | set(LLCOMMON_LIBRARIES llcommonPIC) | ||
21 | else(REQUIRE_PIC) | ||
22 | set(LLCOMMON_LIBRARIES llcommon) | ||
23 | endif(REQUIRE_PIC) | ||
24 | |||
25 | #force clear the flag, files that need this must explicity set it themselves | ||
26 | set(REQUIRE_PIC 0) \ No newline at end of file | ||
diff --git a/linden/indra/llcommon/CMakeLists.txt b/linden/indra/llcommon/CMakeLists.txt index 1c12e55..ae961a3 100644 --- a/linden/indra/llcommon/CMakeLists.txt +++ b/linden/indra/llcommon/CMakeLists.txt | |||
@@ -198,3 +198,23 @@ target_link_libraries( | |||
198 | ${EXPAT_LIBRARIES} | 198 | ${EXPAT_LIBRARIES} |
199 | ${ZLIB_LIBRARIES} | 199 | ${ZLIB_LIBRARIES} |
200 | ) | 200 | ) |
201 | |||
202 | if(HAVE_64_BIT) | ||
203 | add_library (llcommonPIC ${llcommon_SOURCE_FILES}) | ||
204 | add_dependencies(llcommonPIC prepare) | ||
205 | |||
206 | if(WINDOWS) | ||
207 | add_definitions(/FIXED:NO) | ||
208 | else(WINDOWS) # not windows therefore gcc LINUX and DARWIN | ||
209 | add_definitions(-fPIC) | ||
210 | endif(WINDOWS) | ||
211 | |||
212 | target_link_libraries( | ||
213 | llcommonPIC | ||
214 | ${APRUTIL_LIBRARIES} | ||
215 | ${APR_LIBRARIES} | ||
216 | ${EXPAT_LIBRARIES} | ||
217 | ${ZLIB_LIBRARIES} | ||
218 | ) | ||
219 | endif(HAVE_64_BIT) | ||
220 | |||
diff --git a/linden/indra/llplugin/CMakeLists.txt b/linden/indra/llplugin/CMakeLists.txt index d9b623d..8a2eff8 100755..100644 --- a/linden/indra/llplugin/CMakeLists.txt +++ b/linden/indra/llplugin/CMakeLists.txt | |||
@@ -2,6 +2,10 @@ | |||
2 | 2 | ||
3 | project(llplugin) | 3 | project(llplugin) |
4 | 4 | ||
5 | if(HAVE_64_BIT) | ||
6 | set(REQUIRE_PIC) | ||
7 | endif(HAVE_64_BIT) | ||
8 | |||
5 | include(00-Common) | 9 | include(00-Common) |
6 | include(LLCommon) | 10 | include(LLCommon) |
7 | include(LLImage) | 11 | include(LLImage) |
diff --git a/linden/indra/media_plugins/base/CMakeLists.txt b/linden/indra/media_plugins/base/CMakeLists.txt index 8d62043..dd0b0a0 100755..100644 --- a/linden/indra/media_plugins/base/CMakeLists.txt +++ b/linden/indra/media_plugins/base/CMakeLists.txt | |||
@@ -2,6 +2,10 @@ | |||
2 | 2 | ||
3 | project(media_plugin_base) | 3 | project(media_plugin_base) |
4 | 4 | ||
5 | if(HAVE_64_BIT) | ||
6 | set(REQUIRE_PIC) | ||
7 | endif(HAVE_64_BIT) | ||
8 | |||
5 | include(00-Common) | 9 | include(00-Common) |
6 | include(LLCommon) | 10 | include(LLCommon) |
7 | include(LLImage) | 11 | include(LLImage) |
diff --git a/linden/indra/media_plugins/example/CMakeLists.txt b/linden/indra/media_plugins/example/CMakeLists.txt index 7822300..bac5fa2 100755..100644 --- a/linden/indra/media_plugins/example/CMakeLists.txt +++ b/linden/indra/media_plugins/example/CMakeLists.txt | |||
@@ -2,6 +2,10 @@ | |||
2 | 2 | ||
3 | project(media_plugin_example) | 3 | project(media_plugin_example) |
4 | 4 | ||
5 | if(HAVE_64_BIT) | ||
6 | set(REQUIRE_PIC) | ||
7 | endif(HAVE_64_BIT) | ||
8 | |||
5 | include(00-Common) | 9 | include(00-Common) |
6 | include(LLCommon) | 10 | include(LLCommon) |
7 | include(LLImage) | 11 | include(LLImage) |
diff --git a/linden/indra/media_plugins/gstreamer010/CMakeLists.txt b/linden/indra/media_plugins/gstreamer010/CMakeLists.txt index ee16849..6eab49c 100755..100644 --- a/linden/indra/media_plugins/gstreamer010/CMakeLists.txt +++ b/linden/indra/media_plugins/gstreamer010/CMakeLists.txt | |||
@@ -2,6 +2,10 @@ | |||
2 | 2 | ||
3 | project(media_plugin_gstreamer010) | 3 | project(media_plugin_gstreamer010) |
4 | 4 | ||
5 | if(HAVE_64_BIT) | ||
6 | set(REQUIRE_PIC) | ||
7 | endif(HAVE_64_BIT) | ||
8 | |||
5 | include(00-Common) | 9 | include(00-Common) |
6 | include(LLCommon) | 10 | include(LLCommon) |
7 | include(LLImage) | 11 | include(LLImage) |
diff --git a/linden/indra/media_plugins/webkit/CMakeLists.txt b/linden/indra/media_plugins/webkit/CMakeLists.txt index be02781..a47d5e0 100644 --- a/linden/indra/media_plugins/webkit/CMakeLists.txt +++ b/linden/indra/media_plugins/webkit/CMakeLists.txt | |||
@@ -2,6 +2,10 @@ | |||
2 | 2 | ||
3 | project(media_plugin_webkit) | 3 | project(media_plugin_webkit) |
4 | 4 | ||
5 | if(HAVE_64_BIT) | ||
6 | set(REQUIRE_PIC) | ||
7 | endif(HAVE_64_BIT) | ||
8 | |||
5 | include(00-Common) | 9 | include(00-Common) |
6 | include(LLCommon) | 10 | include(LLCommon) |
7 | include(LLImage) | 11 | include(LLImage) |
diff --git a/linden/indra/newview/CMakeLists.txt b/linden/indra/newview/CMakeLists.txt index 75ba977..e0c6c61 100644 --- a/linden/indra/newview/CMakeLists.txt +++ b/linden/indra/newview/CMakeLists.txt | |||
@@ -1472,10 +1472,12 @@ if (DARWIN) | |||
1472 | --build=${CMAKE_CURRENT_BINARY_DIR} | 1472 | --build=${CMAKE_CURRENT_BINARY_DIR} |
1473 | --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app | 1473 | --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app |
1474 | --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched | 1474 | --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched |
1475 | |||
1475 | DEPENDS | 1476 | DEPENDS |
1476 | ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py | 1477 | ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py |
1477 | ) | 1478 | ) |
1478 | 1479 | ||
1480 | add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_quicktime media_plugin_webkit) | ||
1479 | add_custom_command( | 1481 | add_custom_command( |
1480 | TARGET package POST_BUILD | 1482 | TARGET package POST_BUILD |
1481 | COMMAND ${PYTHON_EXECUTABLE} | 1483 | COMMAND ${PYTHON_EXECUTABLE} |