Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
linphone-cmake-builder
Commits
946608c7
Commit
946608c7
authored
Feb 05, 2015
by
Ghislain MARY
Browse files
Fix naming of Python packages when cross compiling.
parent
78eee420
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
12 deletions
+16
-12
configs/python/CMakeLists.txt
configs/python/CMakeLists.txt
+16
-12
No files found.
configs/python/CMakeLists.txt
View file @
946608c7
...
...
@@ -26,11 +26,7 @@ project(PYLINPHONE C CXX) # Dummy project
if
(
APPLE
)
set
(
PLATFORM_ARCH_NAME
"
${
CMAKE_OSX_ARCHITECTURES
}
"
)
else
()
if
(
CMAKE_SIZEOF_VOID_P EQUAL 8
)
set
(
PLATFORM_ARCH_NAME
"x86_64"
)
else
()
set
(
PLATFORM_ARCH_NAME
"i386"
)
endif
()
set
(
PLATFORM_ARCH_NAME
"
${
CMAKE_HOST_SYSTEM_PROCESSOR
}
"
)
endif
()
set
(
Python_ADDITIONAL_VERSIONS 2.7
)
...
...
@@ -215,13 +211,21 @@ endif()
if
(
UNIX
)
if
(
APPLE
)
set
(
PLATFORM_OS
"macosx-
${
CMAKE_OSX_DEPLOYMENT_TARGET
}
"
)
if
(
CMAKE_CROSSCOMPILING
)
string
(
TOLOWER
"
${
CMAKE_SYSTEM_NAME
}
"
PLATFORM_OS
)
set
(
PLATFORM_TAG
"
${
PLATFORM_OS
}
-
${
CMAKE_SYSTEM_PROCESSOR
}
"
)
set
(
UNDERSCORE_PLATFORM_TAG
"any"
)
else
()
set
(
PLATFORM_OS
"linux"
)
if
(
APPLE
)
set
(
PLATFORM_OS
"macosx-
${
CMAKE_OSX_DEPLOYMENT_TARGET
}
"
)
else
()
set
(
PLATFORM_OS
"linux"
)
endif
()
string
(
REPLACE
"-"
"_"
UNDERSCORE_PLATFORM_OS
${
PLATFORM_OS
}
)
string
(
REPLACE
"."
"_"
UNDERSCORE_PLATFORM_OS
${
UNDERSCORE_PLATFORM_OS
}
)
set
(
PLATFORM_TAG
"
${
PLATFORM_OS
}
-
${
PLATFORM_ARCH_NAME
}
"
)
set
(
UNDERSCORE_PLATFORM_TAG
"
${
UNDERSCORE_PLATFORM_OS
}
_
${
PLATFORM_ARCH_NAME
}
"
)
endif
()
string
(
REPLACE
"-"
"_"
UNDERSCORE_PLATFORM_OS
${
PLATFORM_OS
}
)
string
(
REPLACE
"."
"_"
UNDERSCORE_PLATFORM_OS
${
UNDERSCORE_PLATFORM_OS
}
)
# Generate the zip
set
(
ZIP_FILENAME
"
${
CMAKE_CURRENT_BINARY_DIR
}
/build_zip/linphone/dist/linphone-
${
LINPHONE_GIT_REVISION
}
.
${
PLATFORM_OS
}
-
${
PLATFORM_ARCH_NAME
}
.zip"
)
...
...
@@ -231,7 +235,7 @@ add_custom_command(OUTPUT "${ZIP_FILENAME}"
WORKING_DIRECTORY
"
${
CMAKE_CURRENT_BINARY_DIR
}
/build_zip/linphone"
)
add_custom_target
(
pylinphone_zip ALL DEPENDS
"
${
ZIP_FILENAME
}
"
)
install
(
FILES
${
ZIP_FILENAME
}
DESTINATION
"."
RENAME
"linphone-
${
LINPHONE_GIT_REVISION
}
.
${
PLATFORM_
OS
}
-
${
PLATFORM_ARCH_NAME
}
-py
${
PYTHON_VERSION_MAJOR
}
.
${
PYTHON_VERSION_MINOR
}
.zip"
)
install
(
FILES
${
ZIP_FILENAME
}
DESTINATION
"."
RENAME
"linphone-
${
LINPHONE_GIT_REVISION
}
.
${
PLATFORM_
TAG
}
-py
${
PYTHON_VERSION_MAJOR
}
.
${
PYTHON_VERSION_MINOR
}
.zip"
)
# Generate the wheel package
string
(
REPLACE
"-"
"_"
LINPHONE_UNDERSCORE_GIT_REVISION
${
LINPHONE_GIT_REVISION
}
)
...
...
@@ -242,6 +246,6 @@ add_custom_command(OUTPUT "${WHEEL_FILENAME}"
WORKING_DIRECTORY
"
${
CMAKE_CURRENT_BINARY_DIR
}
/build_wheel/linphone"
)
add_custom_target
(
pylinphone_wheel ALL DEPENDS
"
${
WHEEL_FILENAME
}
"
)
install
(
FILES
${
WHEEL_FILENAME
}
DESTINATION
"."
RENAME
"linphone-
${
LINPHONE_UNDERSCORE_GIT_REVISION
}
-cp27-none-
${
UNDERSCORE_PLATFORM_
OS
}
_
${
PLATFORM_ARCH_NAME
}
.whl"
)
install
(
FILES
${
WHEEL_FILENAME
}
DESTINATION
"."
RENAME
"linphone-
${
LINPHONE_UNDERSCORE_GIT_REVISION
}
-cp27-none-
${
UNDERSCORE_PLATFORM_
TAG
}
.whl"
)
endif
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment