Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
linphone-cmake-builder
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
External Wiki
External Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
BC
public
linphone-cmake-builder
Commits
faee32ea
Commit
faee32ea
authored
Mar 04, 2014
by
Ghislain MARY
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Generate import libs for projects built with autotools on Windows.
parent
a302c806
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
148 additions
and
0 deletions
+148
-0
postinstall.cmake
builders/ffmpeg/postinstall.cmake
+26
-0
postinstall.cmake
builders/opus/postinstall.cmake
+23
-0
postinstall.cmake
builders/vpx/postinstall.cmake
+23
-0
postinstall.cmake
builders/xml2/postinstall.cmake
+23
-0
LinphoneCMakeBuilder.cmake
cmake/LinphoneCMakeBuilder.cmake
+16
-0
importlib.py
cmake/importlib.py
+37
-0
No files found.
builders/ffmpeg/postinstall.cmake
0 → 100644
View file @
faee32ea
############################################################################
# postinstall.cmake
# Copyright (C) 2014 Belledonne Communications, Grenoble France
#
############################################################################
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
############################################################################
execute_process
(
COMMAND
"lib"
"/def:
${
INSTALL_PREFIX
}
/lib/avcodec-53.def"
"/out:
${
INSTALL_PREFIX
}
/lib/avcodec.lib"
"/machine:X86"
)
execute_process
(
COMMAND
"lib"
"/def:
${
INSTALL_PREFIX
}
/lib/avutil-51.def"
"/out:
${
INSTALL_PREFIX
}
/lib/avutil.lib"
"/machine:X86"
)
execute_process
(
COMMAND
"lib"
"/def:
${
INSTALL_PREFIX
}
/lib/swresample-0.def"
"/out:
${
INSTALL_PREFIX
}
/lib/swresample.lib"
"/machine:X86"
)
execute_process
(
COMMAND
"lib"
"/def:
${
INSTALL_PREFIX
}
/lib/swscale-2.def"
"/out:
${
INSTALL_PREFIX
}
/lib/swscale.lib"
"/machine:X86"
)
builders/opus/postinstall.cmake
0 → 100644
View file @
faee32ea
############################################################################
# postinstall.cmake
# Copyright (C) 2014 Belledonne Communications, Grenoble France
#
############################################################################
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
############################################################################
execute_process
(
COMMAND
"
${
PYTHON_EXECUTABLE
}
"
"
${
SOURCE_DIR
}
/cmake/importlib.py"
"
${
INSTALL_PREFIX
}
/bin/libopus-0.dll"
"
${
INSTALL_PREFIX
}
/lib/opus.lib"
)
builders/vpx/postinstall.cmake
0 → 100644
View file @
faee32ea
############################################################################
# postinstall.cmake
# Copyright (C) 2014 Belledonne Communications, Grenoble France
#
############################################################################
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
############################################################################
execute_process
(
COMMAND
"
${
PYTHON_EXECUTABLE
}
"
"
${
SOURCE_DIR
}
/cmake/importlib.py"
"
${
INSTALL_PREFIX
}
/bin/libvpx-1.dll"
"
${
INSTALL_PREFIX
}
/lib/vpx.lib"
)
builders/xml2/postinstall.cmake
0 → 100644
View file @
faee32ea
############################################################################
# postinstall.cmake
# Copyright (C) 2014 Belledonne Communications, Grenoble France
#
############################################################################
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
############################################################################
execute_process
(
COMMAND
"
${
PYTHON_EXECUTABLE
}
"
"
${
SOURCE_DIR
}
/cmake/importlib.py"
"
${
INSTALL_PREFIX
}
/bin/libxml2-2.dll"
"
${
INSTALL_PREFIX
}
/lib/xml2.lib"
)
cmake/LinphoneCMakeBuilder.cmake
View file @
faee32ea
...
...
@@ -33,6 +33,11 @@ else(${CMAKE_VERBOSE_MAKEFILE})
endif
(
${
CMAKE_VERBOSE_MAKEFILE
}
)
find_package
(
PythonInterp
)
if
(
NOT PYTHONINTERP_FOUND
)
message
(
FATAL_ERROR
"Could not find python!"
)
endif
(
NOT PYTHONINTERP_FOUND
)
if
(
MSVC
)
find_program
(
SH_PROGRAM
NAMES sh.exe
...
...
@@ -285,6 +290,17 @@ function(linphone_builder_add_project PROJNAME)
CMAKE_GENERATOR
${
CMAKE_GENERATOR
}
${
BUILD_COMMANDS
}
)
if
(
MSVC
)
if
(
"
${
EP_
${
PROJNAME
}
_USE_AUTOTOOLS
}
"
STREQUAL
"yes"
)
ExternalProject_Add_Step
(
EP_
${
PROJNAME
}
postinstall
COMMAND
${
CMAKE_COMMAND
}
-DPYTHON_EXECUTABLE=
${
PYTHON_EXECUTABLE
}
-DSOURCE_DIR=
${
CMAKE_CURRENT_SOURCE_DIR
}
-DINSTALL_PREFIX=
${
CMAKE_INSTALL_PREFIX
}
-P
${
CMAKE_CURRENT_SOURCE_DIR
}
/builders/
${
PROJNAME
}
/postinstall.cmake
COMMENT
"Performing post-installation step"
DEPENDEES mkdir update patch download configure build install
WORKING_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
)
endif
(
"
${
EP_
${
PROJNAME
}
_USE_AUTOTOOLS
}
"
STREQUAL
"yes"
)
endif
(
MSVC
)
endfunction
(
linphone_builder_add_project
)
function
(
linphone_builder_add_external_projects
)
...
...
cmake/importlib.py
0 → 100644
View file @
faee32ea
#!/usr/bin/python
import
os
import
re
import
subprocess
import
sys
import
tempfile
def
main
(
argv
=
None
):
if
argv
is
None
:
argv
=
sys
.
argv
if
len
(
argv
)
>=
3
:
dllfile
=
argv
[
1
]
dllpath
,
dllextension
=
os
.
path
.
splitext
(
dllfile
)
dllname
=
os
.
path
.
basename
(
dllpath
)
libfile
=
argv
[
2
]
deffile
=
os
.
path
.
join
(
tempfile
.
gettempdir
(),
dllname
+
".def"
)
ret
=
subprocess
.
check_output
([
"dumpbin"
,
"/exports"
,
dllfile
,
"/out:"
+
deffile
],
stderr
=
subprocess
.
STDOUT
)
fin
=
open
(
deffile
,
"r"
)
lines
=
fin
.
readlines
()
exports
=
[]
for
line
in
lines
:
exportre
=
re
.
compile
(
'^
\
s+
\
d+
\
s+[
\
dA-F]+
\
s+[
\
dA-F]+
\
s+(
\
w+)(
\
s=
\
s
\
w+)?$'
)
m
=
exportre
.
match
(
line
)
if
m
:
exports
.
append
(
m
.
group
(
1
))
fin
.
close
()
fin
=
open
(
deffile
,
"w"
)
fin
.
write
(
"EXPORTS "
+
dllname
+
"
\n
"
)
for
export
in
exports
:
fin
.
write
(
"
\t
"
+
export
+
"
\n
"
)
fin
.
close
()
ret
=
subprocess
.
check_output
([
"lib"
,
"/def:"
+
deffile
,
"/out:"
+
libfile
,
"/machine:X86"
],
stderr
=
subprocess
.
STDOUT
)
print
(
ret
)
if
__name__
==
"__main__"
:
sys
.
exit
(
main
())
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