Commit 4c3e4466 authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Revert "Simplify handling of Mac OS X deployment target and architecture for the Python module."

This reverts commit dc854fb3.
parent e69dd7e2
......@@ -56,14 +56,16 @@ set(LINPHONE_BUILDER_PKG_CONFIG_LIBDIR ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig) #
if (UNIX)
if(APPLE)
if(CMAKE_OSX_DEPLOYMENT_TARGET)
set(LINPHONE_BUILDER_CPPFLAGS "${LINPHONE_BUILDER_CPPFLAGS} -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}")
endif()
if(CMAKE_OSX_ARCHITECTURES)
set(LINPHONE_BUILDER_CPPFLAGS "${LINPHONE_BUILDER_CPPFLAGS} -arch ${CMAKE_OSX_ARCHITECTURES}")
endif()
set(LINPHONE_BUILDER_OBJCFLAGS ${LINPHONE_BUILDER_CPPFLAGS})
set(LINPHONE_BUILDER_LDFLAGS ${LINPHONE_BUILDER_LDFLAGS})
execute_process(COMMAND "${PYTHON_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/configs/python/mac_getplatform.py"
OUTPUT_VARIABLE MAC_PLATFORM
OUTPUT_STRIP_TRAILING_WHITESPACE
)
list(GET MAC_PLATFORM 0 CMAKE_OSX_DEPLOYMENT_TARGET)
list(GET MAC_PLATFORM 1 CMAKE_OSX_ARCHITECTURES)
set(LINPHONE_BUILDER_CPPFLAGS "-mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET} -arch ${CMAKE_OSX_ARCHITECTURES}")
set(LINPHONE_BUILDER_OBJCFLAGS "-mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET} -arch ${CMAKE_OSX_ARCHITECTURES}")
set(LINPHONE_BUILDER_LDFLAGS "-mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET} -arch ${CMAKE_OSX_ARCHITECTURES}")
else()
set(LINPHONE_BUILDER_LDFLAGS "-Wl,-Bsymbolic -fPIC")
endif()
......
#!/usr/bin/python
import distutils.util
import sys
def main(argv=None):
print(';'.join(distutils.util.get_platform().split('-')[1:]))
if __name__ == "__main__":
sys.exit(main())
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