Commit b06b60d4 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont
Browse files

cmake: Don't have modules to depend on libvlc on non-win32 platform.

parent 7c43db68
......@@ -94,6 +94,12 @@ include( ${CMAKE_SOURCE_DIR}/cmake/vlc_test_inline.cmake )
if(APPLE)
include( ${CMAKE_SOURCE_DIR}/cmake/vlc_find_frameworks.cmake )
set(CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS
"${CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS} -undefined dynamic_lookup")
set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS
"${CMAKE_SHARED_MODULE_CREATE_C_FLAGS} -undefined dynamic_lookup")
MESSAGE( "Using ${CMAKE_SHARED_MODULE_LINK_C_FLAGS}" )
set(HAVE_DL_DYLD ON INTERNAL)
set(SYS_DARWIN 1)
......
......@@ -3,11 +3,14 @@ include( ${CMAKE_SOURCE_DIR}/cmake/vlc_add_compile_flag.cmake )
MACRO(vlc_add_module module_name)
if(ENABLE_VLC_MODULE_${module_name})
add_library( vlc_${module_name} MODULE ${ARGN} )
set_target_properties( vlc_${module_name} PROPERTIES COMPILE_FLAGS "-D__PLUGIN__ -DMODULE_NAME=${module_name} -DMODULE_NAME_IS_${module_name} -I${CMAKE_CURRENT_SOURCE_DIR}" )
# On win32 we need to have all the symbol resolved at link time
if(WIN32)
set(VLC_${module_name}_LINK_LIBRARIES "VLC_${module_name}_LINK_LIBRARIES libvlc")
endif(WIN32)
set_target_properties( vlc_${module_name} PROPERTIES COMPILE_FLAGS
"-D__PLUGIN__ -DMODULE_NAME=${module_name} -DMODULE_NAME_IS_${module_name} -I${CMAKE_CURRENT_SOURCE_DIR}" )
if (VLC_${module_name}_LINK_LIBRARIES)
target_link_libraries( vlc_${module_name} libvlc ${VLC_${module_name}_LINK_LIBRARIES})
else (VLC_${module_name}_LINK_LIBRARIES)
target_link_libraries( vlc_${module_name} libvlc )
target_link_libraries( vlc_${module_name} ${VLC_${module_name}_LINK_LIBRARIES})
endif (VLC_${module_name}_LINK_LIBRARIES)
endif(ENABLE_VLC_MODULE_${module_name})
ENDMACRO(vlc_add_module)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment