Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
BC
public
linphone-cmake-builder
Commits
ca685820
Commit
ca685820
authored
10 years ago
by
Ghislain MARY
Browse files
Options
Download
Patches
Plain Diff
Fix compilation of the Python module on Windows.
parent
cc087309
master
android_3.3.1
android_strip
build_soci
desktop-3.10.x
desktop-3.8.x
desktop-3.9.x
desktop_cmake_rework
dev_android_aaudio
dev_bb10
dev_bctoolbox_rpm
dev_codec_downloader
dev_codecbv16
dev_screensharing
dev_windows10
external_auth_plugin_option
feature/android_ndk_r23b
feature/av1-support
feature/enable_wrapper_swift
feature/flexisip-video-conf
feature/make_bellesip_framework
feature/python_wrapper
feature/python_wrapper_5.1
feature/python_wrapper_5.3
feature/remove-no-longer-supported-i386-arch-for-ios
feature/sfu-audio-conf
feature/video_conf_mix_master
feature/videoconf
feature/yocto-kirkstone
features/sysconf_install_dir_for_prepare
fix/build-of-ffmpeg-for-android
fix/build_flexisip_macosx
fix/build_master
fix/change_linphone_submodule_name
fix/cmake_build
fix/flexisip
fix/hot_fix_release_4.2
fix/ice-dtls-turn-4.5
fix/improve_macosx_toolchain_detection
fix/mac_android
fix/mediadir
fix/nightly_builds
fix/openh264_static_build
fix/openh264_x86_64
fix/version_check
fix_belr
ios-3.13.19
private-master
release/4.3
release/4.4
release/4.5
release/5.0
release/5.1
release/5.2
releases/linphone-android/3.4.x
releases/linphone-android/4.0
rework
tests/build_windows
tmp/pq
5.2.19
5.2.10
5.2.3
5.2.1
5.2.0-beta
5.1.0
5.0.48
5.0.3
5.0.0-alpha
4.5.0
4.5.0-alpha
4.4.0
4.4.0-alpha
4.3.2
4.3.1
4.3.0
desktop-3.10.0
desktop-3.9.0
desktop-3.8.5
desktop-3.8.4
desktop-3.8.3
desktop-3.8.2
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
configs/python/CMakeLists.txt
+18
-12
configs/python/CMakeLists.txt
configs/python/prepare_packaging.cmake
+5
-4
configs/python/prepare_packaging.cmake
with
23 additions
and
16 deletions
configs/python/CMakeLists.txt
+
18
−
12
View file @
ca685820
...
...
@@ -113,7 +113,13 @@ endif()
add_library
(
pylinphone MODULE
"
${
SOURCE_FILENAME
}
"
)
target_compile_options
(
pylinphone PUBLIC
${
LINPHONE_CPPFLAGS
}
)
target_include_directories
(
pylinphone PUBLIC
${
LINPHONE_INCLUDE_DIRS
}
${
PYTHON_INCLUDE_DIRS
}
)
target_link_libraries
(
pylinphone
${
LINPHONE_LIBRARIES
}
${
PYTHON_LIBRARIES
}
)
set
(
PYLINPHONE_LINK_LIBRARIES
${
LINPHONE_LIBRARIES
}
${
PYTHON_LIBRARIES
}
)
if
(
WIN32
)
find_library
(
GCC_LIBRARIES gcc
)
find_library
(
MINGWEX_LIBRARIES mingwex
)
list
(
APPEND PYLINPHONE_LINK_LIBRARIES
${
GCC_LIBRARIES
}
${
MINGWEX_LIBRARIES
}
)
endif
()
target_link_libraries
(
pylinphone
${
PYLINPHONE_LINK_LIBRARIES
}
)
string
(
REPLACE
";"
" "
LINPHONE_LDFLAGS_STR
"
${
LINPHONE_LDFLAGS
}
"
)
if
(
NOT
"
${
LINPHONE_LDFLAGS_STR
}
"
STREQUAL
""
)
set_target_properties
(
pylinphone PROPERTIES LINK_FLAGS
"
${
LINPHONE_LDFLAGS_STR
}
"
)
...
...
@@ -139,20 +145,20 @@ endforeach()
if
(
WIN32
)
# Generate the installer
set
(
EXE_FILENAME
"
${
CMAKE_CURRENT_BINARY_DIR
}
/build_exe/linphone/dist/linphone-
${
LINPHONE_GIT_REVISION
}
.win32
-py
${
PYTHON_VERSION_MAJOR
}
.
${
PYTHON_VERSION_MINOR
}
.exe"
)
set
(
EXE_FILENAME
"
${
CMAKE_CURRENT_BINARY_DIR
}
/build_exe/linphone/dist/linphone-
${
LINPHONE_GIT_REVISION
}
.win32.exe"
)
add_custom_command
(
OUTPUT
"
${
EXE_FILENAME
}
"
COMMAND
${
PYTHON_EXECUTABLE
}
"
${
CMAKE_CURRENT_BINARY_DIR
}
/build_exe/linphone/setup.py"
"bdist_wininst"
DEPENDS pylinphone
_debug
DEPENDS pylinphone
WORKING_DIRECTORY
"
${
CMAKE_CURRENT_BINARY_DIR
}
/build_exe/linphone"
)
add_custom_target
(
pylinphone_exe ALL DEPENDS
"
${
EXE_FILENAME
}
"
)
install
(
FILES
${
EXE_FILENAME
}
DESTINATION
"."
)
install
(
FILES
${
EXE_FILENAME
}
DESTINATION
"."
RENAME
"linphone-
${
LINPHONE_GIT_REVISION
}
.win32-py
${
PYTHON_VERSION_MAJOR
}
.
${
PYTHON_VERSION_MINOR
}
.exe"
)
# Generate the msi
set
(
MSI_FILENAME
"
${
CMAKE_CURRENT_BINARY_DIR
}
/build_msi/linphone/dist/linphone-
${
LINPHONE_VERSION
}
.win32
-py
${
PYTHON_VERSION_MAJOR
}
.
${
PYTHON_VERSION_MINOR
}
.msi"
)
set
(
MSI_FILENAME
"
${
CMAKE_CURRENT_BINARY_DIR
}
/build_msi/linphone/dist/linphone-
${
LINPHONE_VERSION
}
.win32.msi"
)
add_custom_command
(
OUTPUT
"
${
MSI_FILENAME
}
"
COMMAND
${
PYTHON_EXECUTABLE
}
"
${
CMAKE_CURRENT_BINARY_DIR
}
/build_msi/linphone/setup.py"
"bdist_msi"
DEPENDS pylinphone
_exe
DEPENDS pylinphone
WORKING_DIRECTORY
"
${
CMAKE_CURRENT_BINARY_DIR
}
/build_msi/linphone"
)
add_custom_target
(
pylinphone_msi ALL DEPENDS
"
${
MSI_FILENAME
}
"
)
...
...
@@ -162,7 +168,7 @@ install(FILES ${MSI_FILENAME} DESTINATION "." RENAME "linphone-${LINPHONE_GIT_RE
set
(
ZIP_FILENAME
"
${
CMAKE_CURRENT_BINARY_DIR
}
/build_zip/linphone/dist/linphone-
${
LINPHONE_GIT_REVISION
}
.win32.zip"
)
add_custom_command
(
OUTPUT
"
${
ZIP_FILENAME
}
"
COMMAND
${
PYTHON_EXECUTABLE
}
"
${
CMAKE_CURRENT_BINARY_DIR
}
/build_zip/linphone/setup.py"
"bdist"
"--format=zip"
DEPENDS pylinphone
_msi
DEPENDS pylinphone
WORKING_DIRECTORY
"
${
CMAKE_CURRENT_BINARY_DIR
}
/build_zip/linphone"
)
add_custom_target
(
pylinphone_zip ALL DEPENDS
"
${
ZIP_FILENAME
}
"
)
...
...
@@ -170,14 +176,14 @@ install(FILES ${ZIP_FILENAME} DESTINATION "." RENAME "linphone-${LINPHONE_GIT_RE
# Generate the wheel package
string
(
REPLACE
"-"
"_"
LINPHONE_UNDERSCORE_GIT_REVISION
${
LINPHONE_GIT_REVISION
}
)
set
(
WHEEL_FILENAME
"
${
CMAKE_CURRENT_BINARY_DIR
}
/build_wheel/linphone/dist/linphone-
${
LINPHONE_UNDERSCORE_GIT_REVISION
}
-
cp27
-none-
win32
.whl"
)
set
(
WHEEL_FILENAME
"
${
CMAKE_CURRENT_BINARY_DIR
}
/build_wheel/linphone/dist/linphone-
${
LINPHONE_UNDERSCORE_GIT_REVISION
}
-
py2
-none-
any
.whl"
)
add_custom_command
(
OUTPUT
"
${
WHEEL_FILENAME
}
"
COMMAND
${
PYTHON_EXECUTABLE
}
"
${
CMAKE_CURRENT_BINARY_DIR
}
/build_wheel/linphone/setup.py"
"bdist_wheel"
DEPENDS pylinphone
_zip
DEPENDS pylinphone
WORKING_DIRECTORY
"
${
CMAKE_CURRENT_BINARY_DIR
}
/build_wheel/linphone"
)
add_custom_target
(
pylinphone_wheel ALL DEPENDS
"
${
WHEEL_FILENAME
}
"
)
install
(
FILES
${
WHEEL_FILENAME
}
DESTINATION
"."
)
install
(
FILES
${
WHEEL_FILENAME
}
DESTINATION
"."
RENAME
"linphone-
${
LINPHONE_UNDERSCORE_GIT_REVISION
}
-cp27-none-win32.whl"
)
endif
()
...
...
@@ -195,7 +201,7 @@ string(REPLACE "." "_" UNDERSCORE_PLATFORM_OS ${UNDERSCORE_PLATFORM_OS})
set
(
ZIP_FILENAME
"
${
CMAKE_CURRENT_BINARY_DIR
}
/build_zip/linphone/dist/linphone-
${
LINPHONE_GIT_REVISION
}
.
${
PLATFORM_OS
}
-
${
PLATFORM_ARCH_NAME
}
.zip"
)
add_custom_command
(
OUTPUT
"
${
ZIP_FILENAME
}
"
COMMAND
${
PYTHON_EXECUTABLE
}
"
${
CMAKE_CURRENT_BINARY_DIR
}
/build_zip/linphone/setup.py"
"bdist"
"--format=zip"
DEPENDS pylinphone
_source
DEPENDS pylinphone
WORKING_DIRECTORY
"
${
CMAKE_CURRENT_BINARY_DIR
}
/build_zip/linphone"
)
add_custom_target
(
pylinphone_zip ALL DEPENDS
"
${
ZIP_FILENAME
}
"
)
...
...
@@ -206,7 +212,7 @@ string(REPLACE "-" "_" LINPHONE_UNDERSCORE_GIT_REVISION ${LINPHONE_GIT_REVISION}
set
(
WHEEL_FILENAME
"
${
CMAKE_CURRENT_BINARY_DIR
}
/build_wheel/linphone/dist/linphone-
${
LINPHONE_UNDERSCORE_GIT_REVISION
}
-py2-none-any.whl"
)
add_custom_command
(
OUTPUT
"
${
WHEEL_FILENAME
}
"
COMMAND
${
PYTHON_EXECUTABLE
}
"
${
CMAKE_CURRENT_BINARY_DIR
}
/build_wheel/linphone/setup.py"
"bdist_wheel"
DEPENDS pylinphone
_source
DEPENDS pylinphone
WORKING_DIRECTORY
"
${
CMAKE_CURRENT_BINARY_DIR
}
/build_wheel/linphone"
)
add_custom_target
(
pylinphone_wheel ALL DEPENDS
"
${
WHEEL_FILENAME
}
"
)
...
...
This diff is collapsed.
Click to expand it.
configs/python/prepare_packaging.cmake
+
5
−
4
View file @
ca685820
...
...
@@ -43,14 +43,15 @@ if(UNIX)
file
(
RENAME
"
${
OUTPUT_DIR
}
/linphone/
${
reallibname
}
"
"
${
OUTPUT_DIR
}
/linphone/
${
libname
}
"
)
endforeach
()
else
()
file
(
COPY
${
LINPHONE_DYNAMIC_LIBRARIES
}
DESTINATION
"
${
OUTPUT_DIR
}
/linphone"
)
file
(
COPY
${
LINPHONE_DYNAMIC_LIBRARIES
_TO_INSTALL
}
DESTINATION
"
${
OUTPUT_DIR
}
/linphone"
)
endif
()
if
(
MSVC AND NOT
"
${
MSVC_VERSION
}
"
STREQUAL
"9"
)
file
(
COPY
${
MSVCR_LIB
}
DESTINATION
"
${
OUTPUT_DIR
}
/linphone"
)
endif
()
if
(
MSVC AND
"
${
CMAKE_BUILD_TYPE
}
"
STREQUAL
"Debug"
)
get_filename_component
(
LINPHONE_PYTHON_MODULE_PATH
"
${
LINPHONE_PYTHON_MODULE
}
"
REALPATH
)
file
(
COPY
"
${
LINPHONE_PYTHON_MODULE_PATH
}
/linphone.pdb"
DESTINATION
"
${
OUTPUT_DIR
}
/linphone"
)
get_filename_component
(
LINPHONE_PYTHON_MODULE_PATH
"
${
LINPHONE_PYTHON_MODULE
}
"
DIRECTORY
)
find_file
(
PDB_FILENAME
"linphone.pdb"
"
${
LINPHONE_PYTHON_MODULE_PATH
}
"
)
if
(
PDB_FILENAME
)
file
(
COPY
"
${
PDB_FILENAME
}
"
DESTINATION
"
${
OUTPUT_DIR
}
/linphone"
)
endif
()
file
(
COPY
"
${
LINPHONE_RESOURCES_PREFIX
}
/share/images"
DESTINATION
"
${
OUTPUT_DIR
}
/linphone/share/"
)
file
(
COPY
"
${
LINPHONE_RESOURCES_PREFIX
}
/share/linphone"
DESTINATION
"
${
OUTPUT_DIR
}
/linphone/share/"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets