Commit 462135cd authored by Benjamin REIS's avatar Benjamin REIS
Browse files

Stub also static lib if found

parent bf904886
...@@ -28,24 +28,26 @@ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/dummy_libraries.txt" "") ...@@ -28,24 +28,26 @@ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/dummy_libraries.txt" "")
foreach(LIB ${LINPHONE_BUILDER_DUMMY_LIBRARIES}) foreach(LIB ${LINPHONE_BUILDER_DUMMY_LIBRARIES})
string(REPLACE "-" "_" UNDERSCORE_LIB ${LIB}) string(REPLACE "-" "_" UNDERSCORE_LIB ${LIB})
string(REGEX REPLACE "^lib" "" NOPREFIX_LIB ${LIB}) string(REGEX REPLACE "^lib" "" NOPREFIX_LIB ${LIB})
#if(ENABLE_STATIC) string(REGEX MATCH "^lib" STATIC_LIB ${LIB})
# set(_dest "lib") if(${STATIC_LIB})
# if(${LIB} MATCHES "^libms") # Static library
# set(_dest "lib/mediastreamer/plugins") set(_dest "lib")
# endif() if(${LIB} MATCHES "^libms")
# if(NOT EXISTS "${CMAKE_INSTALL_PREFIX}/${_dest}/${LIB}${CMAKE_STATIC_LIBRARY_SUFFIX}") set(_dest "lib/mediastreamer/plugins")
# message(STATUS "Generating dummy library ${LIB}${CMAKE_STATIC_LIBRARY_SUFFIX}") endif()
# configure_file("${CMAKE_CURRENT_SOURCE_DIR}/dummy.c.in" "${CMAKE_CURRENT_BINARY_DIR}/${LIB}.c" @ONLY) if(NOT EXISTS "${CMAKE_INSTALL_PREFIX}/${_dest}/${LIB}${CMAKE_STATIC_LIBRARY_SUFFIX}")
# add_library(${NOPREFIX_LIB} STATIC "${CMAKE_CURRENT_BINARY_DIR}/${LIB}.c") message(STATUS "Generating dummy library ${LIB}${CMAKE_STATIC_LIBRARY_SUFFIX}")
# install(TARGETS ${NOPREFIX_LIB} configure_file("${CMAKE_CURRENT_SOURCE_DIR}/dummy.c.in" "${CMAKE_CURRENT_BINARY_DIR}/${LIB}.c" @ONLY)
# LIBRARY DESTINATION ${_dest} add_library(${NOPREFIX_LIB} STATIC "${CMAKE_CURRENT_BINARY_DIR}/${LIB}.c")
# ARCHIVE DESTINATION ${_dest} install(TARGETS ${NOPREFIX_LIB}
# PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE LIBRARY DESTINATION ${_dest}
# ) ARCHIVE DESTINATION ${_dest}
# file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/dummy_libraries.txt" "${LIB}\n") PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
# endif() )
#endif() file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/dummy_libraries.txt" "${LIB}\n")
#if(ENABLE_SHARED) endif()
else()
# Frameworks
set(UNDERSCORE_LIB "lib${UNDERSCORE_LIB}") set(UNDERSCORE_LIB "lib${UNDERSCORE_LIB}")
set(_dest "Frameworks") set(_dest "Frameworks")
if(NOT EXISTS "${CMAKE_INSTALL_PREFIX}/${_dest}/${LIB}.framework") if(NOT EXISTS "${CMAKE_INSTALL_PREFIX}/${_dest}/${LIB}.framework")
...@@ -64,7 +66,7 @@ foreach(LIB ${LINPHONE_BUILDER_DUMMY_LIBRARIES}) ...@@ -64,7 +66,7 @@ foreach(LIB ${LINPHONE_BUILDER_DUMMY_LIBRARIES})
) )
file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/dummy_libraries.txt" "${LIB}\n") file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/dummy_libraries.txt" "${LIB}\n")
endif() endif()
#endif() endif()
unset(_dest) unset(_dest)
endforeach() endforeach()
......
...@@ -50,7 +50,7 @@ set(DEFAULT_VALUE_CMAKE_LINKING_TYPE "-DENABLE_STATIC=YES" "-DENABLE_SHARED=NO") ...@@ -50,7 +50,7 @@ set(DEFAULT_VALUE_CMAKE_LINKING_TYPE "-DENABLE_STATIC=YES" "-DENABLE_SHARED=NO")
# Global configuration # Global configuration
if(NOT LINPHONE_IOS_DEPLOYMENT_TARGET) if(NOT LINPHONE_IOS_DEPLOYMENT_TARGET)
set(LINPHONE_IOS_DEPLOYMENT_TARGET 6.0) set(LINPHONE_IOS_DEPLOYMENT_TARGET 8.0)
endif() endif()
set(LINPHONE_BUILDER_HOST "${CMAKE_SYSTEM_PROCESSOR}-apple-darwin") set(LINPHONE_BUILDER_HOST "${CMAKE_SYSTEM_PROCESSOR}-apple-darwin")
set(COMMON_FLAGS "-miphoneos-version-min=${LINPHONE_IOS_DEPLOYMENT_TARGET} -DTARGET_OS_IPHONE=1 -D__IOS -fms-extensions") set(COMMON_FLAGS "-miphoneos-version-min=${LINPHONE_IOS_DEPLOYMENT_TARGET} -DTARGET_OS_IPHONE=1 -D__IOS -fms-extensions")
......
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