Skip to content
Snippets Groups Projects
Commit 29f7c4c0 authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Use cmake flag to enable PIC on linux

parent b9af4f11
No related branches found
No related tags found
No related merge requests found
......@@ -265,23 +265,9 @@ endif (BUGSPLAT_DB)
list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES})
if(LLCOMMON_LINK_SHARED)
add_library (llcommon SHARED ${llcommon_SOURCE_FILES})
if(NOT ADDRESS_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 ADDRESS_SIZE EQUAL 32)
if(WINDOWS)
# always generate llcommon.pdb, even for "Release" builds
set_target_properties(llcommon PROPERTIES LINK_FLAGS "/DEBUG")
endif(WINDOWS)
ll_stage_sharedlib(llcommon)
else(LLCOMMON_LINK_SHARED)
add_library (llcommon ${llcommon_SOURCE_FILES})
endif(LLCOMMON_LINK_SHARED)
add_library (llcommon ${llcommon_SOURCE_FILES})
set_target_properties(llcommon PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
target_link_libraries(
llcommon
......
......@@ -34,14 +34,6 @@ include_directories(SYSTEM
### media_plugin_cef
if(NOT ADDRESS_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 ADDRESS_SIZE EQUAL 32)
set(media_plugin_cef_SOURCE_FILES
media_plugin_cef.cpp
)
......@@ -83,9 +75,7 @@ add_library(media_plugin_cef
${media_plugin_cef_SOURCE_FILES}
)
#add_dependencies(media_plugin_cef
# ${MEDIA_PLUGIN_BASE_LIBRARIES}
#)
set_target_properties(media_plugin_cef PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
target_link_libraries(media_plugin_cef
${media_plugin_cef_LINK_LIBRARIES}
......
......@@ -32,14 +32,6 @@ include_directories(SYSTEM
### media_plugin_example
if(NOT ADDRESS_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 ADDRESS_SIZE EQUAL 32)
set(media_plugin_example_SOURCE_FILES
media_plugin_example.cpp
)
......@@ -49,6 +41,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}
......
......@@ -33,14 +33,6 @@ include_directories(SYSTEM
### media_plugin_gstreamer010
if(NOT ADDRESS_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 ADDRESS_SIZE EQUAL 32)
set(media_plugin_gstreamer010_SOURCE_FILES
media_plugin_gstreamer010.cpp
llmediaimplgstreamer_syms.cpp
......@@ -58,6 +50,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}
......
......@@ -33,14 +33,6 @@ include_directories(SYSTEM
### media_plugin_libvlc
if(NOT ADDRESS_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 ADDRESS_SIZE EQUAL 32)
set(media_plugin_libvlc_SOURCE_FILES
media_plugin_libvlc.cpp
)
......@@ -58,6 +50,8 @@ target_link_libraries(media_plugin_libvlc
${PLUGIN_API_WINDOWS_LIBRARIES}
)
set_target_properties(media_plugin_libvlc PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
if (WINDOWS)
set_target_properties(
media_plugin_libvlc
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment