diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index cae62271d..b6c5e767a 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -269,12 +269,6 @@ list(APPEND llcommon_SOURCE_FILES ${cwdebug_SOURCE_FILES}) list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES}) -if(NOT WORD_SIZE EQUAL 32) - if(NOT WINDOWS) - add_definitions(-fPIC) - endif(NOT WINDOWS) -endif(NOT WORD_SIZE EQUAL 32) - if(LLCOMMON_LINK_SHARED) add_library (llcommon SHARED ${llcommon_SOURCE_FILES}) if(WINDOWS) @@ -286,6 +280,8 @@ else(LLCOMMON_LINK_SHARED) add_library (llcommon ${llcommon_SOURCE_FILES}) endif(LLCOMMON_LINK_SHARED) +set_target_properties(llcommon PROPERTIES POSITION_INDEPENDENT_CODE TRUE) + target_link_libraries( llcommon PUBLIC diff --git a/indra/llplugin/CMakeLists.txt b/indra/llplugin/CMakeLists.txt index 3a903080e..e06405049 100644 --- a/indra/llplugin/CMakeLists.txt +++ b/indra/llplugin/CMakeLists.txt @@ -46,14 +46,6 @@ set(llplugin_HEADER_FILES set_source_files_properties(${llplugin_HEADER_FILES} PROPERTIES HEADER_FILE_ONLY TRUE) -if(NOT WORD_SIZE EQUAL 32) - if(WINDOWS) - # add_definitions(/FIXED:NO) - else(WINDOWS) # not windows therefore gcc LINUX and DARWIN - add_definitions(-fPIC) - endif(WINDOWS) -endif (NOT WORD_SIZE EQUAL 32) - list(APPEND llplugin_SOURCE_FILES ${llplugin_HEADER_FILES}) add_library (llplugin ${llplugin_SOURCE_FILES}) @@ -67,6 +59,8 @@ else() ) endif() +set_target_properties(llplugin PROPERTIES POSITION_INDEPENDENT_CODE TRUE) + add_subdirectory(slplugin) # # Add tests diff --git a/indra/plugins/base_basic/CMakeLists.txt b/indra/plugins/base_basic/CMakeLists.txt index 33ddced66..acebf8ffe 100644 --- a/indra/plugins/base_basic/CMakeLists.txt +++ b/indra/plugins/base_basic/CMakeLists.txt @@ -15,14 +15,6 @@ include_directories( ### basic_plugin_base -if(NOT WORD_SIZE EQUAL 32) - if(WINDOWS) - # add_definitions(/FIXED:NO) - else(WINDOWS) # not windows therefore gcc LINUX and DARWIN - add_definitions(-fPIC) - endif(WINDOWS) -endif (NOT WORD_SIZE EQUAL 32) - set(basic_plugin_base_SOURCE_FILES basic_plugin_base.cpp ) @@ -42,6 +34,8 @@ add_library(basic_plugin_base ${basic_plugin_base_SOURCE_FILES} ) +set_target_properties(basic_plugin_base PROPERTIES POSITION_INDEPENDENT_CODE TRUE) + target_link_libraries(basic_plugin_base PUBLIC llcommon diff --git a/indra/plugins/base_media/CMakeLists.txt b/indra/plugins/base_media/CMakeLists.txt index 3e5c05b8e..6634b9386 100644 --- a/indra/plugins/base_media/CMakeLists.txt +++ b/indra/plugins/base_media/CMakeLists.txt @@ -29,14 +29,6 @@ include_directories( ### media_plugin_base -if(NOT WORD_SIZE EQUAL 32) - if(WINDOWS) - # add_definitions(/FIXED:NO) - else(WINDOWS) # not windows therefore gcc LINUX and DARWIN - add_definitions(-fPIC) - endif(WINDOWS) -endif (NOT WORD_SIZE EQUAL 32) - set(media_plugin_base_SOURCE_FILES media_plugin_base.cpp ) @@ -56,6 +48,8 @@ add_library(media_plugin_base ${media_plugin_base_SOURCE_FILES} ) +set_target_properties(media_plugin_base PROPERTIES POSITION_INDEPENDENT_CODE TRUE) + target_link_libraries(media_plugin_base PUBLIC llcommon diff --git a/indra/plugins/cef/CMakeLists.txt b/indra/plugins/cef/CMakeLists.txt index cac5c759c..641535ede 100644 --- a/indra/plugins/cef/CMakeLists.txt +++ b/indra/plugins/cef/CMakeLists.txt @@ -35,12 +35,6 @@ include_directories(SYSTEM ### media_plugin_cef -if(NOT WORD_SIZE EQUAL 32) - if(NOT WINDOWS) # not windows therefore gcc LINUX and DARWIN - add_definitions(-fPIC) - endif(NOT WINDOWS) -endif(NOT WORD_SIZE EQUAL 32) - set(media_plugin_cef_SOURCE_FILES media_plugin_cef.cpp ) @@ -95,6 +89,8 @@ add_dependencies(media_plugin_cef ${LLCOMMON_LIBRARIES} ) +set_target_properties(media_plugin_cef PROPERTIES POSITION_INDEPENDENT_CODE TRUE) + target_link_libraries(media_plugin_cef ${media_plugin_cef_LINK_LIBRARIES} ) diff --git a/indra/plugins/example_basic/CMakeLists.txt b/indra/plugins/example_basic/CMakeLists.txt index 616bda770..1a19e8d01 100644 --- a/indra/plugins/example_basic/CMakeLists.txt +++ b/indra/plugins/example_basic/CMakeLists.txt @@ -17,14 +17,6 @@ include_directories( ### basic_plugin_example -if(NOT WORD_SIZE EQUAL 32) - if(WINDOWS) - # add_definitions(/FIXED:NO) - else(WINDOWS) # not windows therefore gcc LINUX and DARWIN - add_definitions(-fPIC) - endif(WINDOWS) -endif (NOT WORD_SIZE EQUAL 32) - set(basic_plugin_example_SOURCE_FILES basic_plugin_example.cpp ) @@ -34,6 +26,8 @@ add_library(basic_plugin_example ${basic_plugin_example_SOURCE_FILES} ) +set_target_properties(basic_plugin_example PROPERTIES POSITION_INDEPENDENT_CODE TRUE) + target_link_libraries(basic_plugin_example ${LLPLUGIN_LIBRARIES} ${LLCOMMON_LIBRARIES} diff --git a/indra/plugins/example_media/CMakeLists.txt b/indra/plugins/example_media/CMakeLists.txt index 7f9def1c9..c3202521d 100644 --- a/indra/plugins/example_media/CMakeLists.txt +++ b/indra/plugins/example_media/CMakeLists.txt @@ -28,14 +28,6 @@ include_directories( ### media_plugin_example -if(NOT WORD_SIZE EQUAL 32) - if(WINDOWS) - # add_definitions(/FIXED:NO) - else(WINDOWS) # not windows therefore gcc LINUX and DARWIN - add_definitions(-fPIC) - endif(WINDOWS) -endif (NOT WORD_SIZE EQUAL 32) - set(media_plugin_example_SOURCE_FILES media_plugin_example.cpp ) @@ -45,6 +37,8 @@ add_library(media_plugin_example ${media_plugin_example_SOURCE_FILES} ) +set_target_properties(media_plugin_example PROPERTIES POSITION_INDEPENDENT_CODE TRUE) + target_link_libraries(media_plugin_example ${LLPLUGIN_LIBRARIES} ${MEDIA_PLUGIN_BASE_LIBRARIES} diff --git a/indra/plugins/filepicker/CMakeLists.txt b/indra/plugins/filepicker/CMakeLists.txt index ec896b69c..2f154ff7d 100644 --- a/indra/plugins/filepicker/CMakeLists.txt +++ b/indra/plugins/filepicker/CMakeLists.txt @@ -23,14 +23,6 @@ include_directories( ### basic_plugin_filepicker -if(NOT WORD_SIZE EQUAL 32) - if(WINDOWS) - # add_definitions(/FIXED:NO) - else(WINDOWS) # not windows therefore gcc LINUX and DARWIN - add_definitions(-fPIC) - endif(WINDOWS) -endif (NOT WORD_SIZE EQUAL 32) - set(basic_plugin_filepicker_SOURCE_FILES basic_plugin_filepicker.cpp legacy.cpp @@ -71,6 +63,8 @@ if (DARWIN) set(OSX_FILE_LIBRARIES ${APPKIT_LIBRARY} ${CARBON_LIBRARY} ${IOKIT_LIBRARY}) endif (DARWIN) +set_target_properties(basic_plugin_filepicker PROPERTIES POSITION_INDEPENDENT_CODE TRUE) + target_link_libraries(basic_plugin_filepicker ${LLPLUGIN_LIBRARIES} ${LLCOMMON_LIBRARIES} diff --git a/indra/plugins/gstreamer010/CMakeLists.txt b/indra/plugins/gstreamer010/CMakeLists.txt index f8a2a510e..05b432b3d 100644 --- a/indra/plugins/gstreamer010/CMakeLists.txt +++ b/indra/plugins/gstreamer010/CMakeLists.txt @@ -45,6 +45,8 @@ add_library(media_plugin_gstreamer010 ${media_plugin_gstreamer010_SOURCE_FILES} ) +set_target_properties(media_plugin_gstreamer010 PROPERTIES POSITION_INDEPENDENT_CODE TRUE) + target_link_libraries(media_plugin_gstreamer010 ${LLPLUGIN_LIBRARIES} ${MEDIA_PLUGIN_BASE_LIBRARIES}