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

Stub also static lib if found

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