Commit 9b66327c authored by Sylvain Berfini's avatar Sylvain Berfini

Merge branch 'master' into dev_vcard

parents 4f76a97a 91f0269b
...@@ -47,6 +47,8 @@ class DesktopTarget(prepare.Target): ...@@ -47,6 +47,8 @@ class DesktopTarget(prepare.Target):
if platform.system() == 'Windows': if platform.system() == 'Windows':
current_path = current_path.replace('\\', '/') current_path = current_path.replace('\\', '/')
self.config_file = 'configs/config-desktop.cmake' self.config_file = 'configs/config-desktop.cmake'
if platform.system() == 'Windows':
self.generator = 'Visual Studio 12 2013'
self.additional_args = [ self.additional_args = [
'-DCMAKE_INSTALL_MESSAGE=LAZY', '-DCMAKE_INSTALL_MESSAGE=LAZY',
'-DLINPHONE_BUILDER_EXTERNAL_SOURCE_PATH=' + '-DLINPHONE_BUILDER_EXTERNAL_SOURCE_PATH=' +
...@@ -162,7 +164,7 @@ def main(argv=None): ...@@ -162,7 +164,7 @@ def main(argv=None):
argparser.add_argument( argparser.add_argument(
'-f', '--force', help="Force preparation, even if working directory already exist.", action='store_true') '-f', '--force', help="Force preparation, even if working directory already exist.", action='store_true')
argparser.add_argument( argparser.add_argument(
'-G', '--generator', help="CMake build system generator (default: Unix Makefiles, use cmake -h to get the complete list).", default='Unix Makefiles', dest='generator') '-G', '--generator', help="CMake build system generator (default: let CMake choose, use cmake -h to get the complete list).", default=None, dest='generator')
argparser.add_argument( argparser.add_argument(
'-L', '--list-cmake-variables', help="List non-advanced CMake cache variables.", action='store_true', dest='list_cmake_variables') '-L', '--list-cmake-variables', help="List non-advanced CMake cache variables.", action='store_true', dest='list_cmake_variables')
argparser.add_argument( argparser.add_argument(
...@@ -178,7 +180,6 @@ def main(argv=None): ...@@ -178,7 +180,6 @@ def main(argv=None):
args, additional_args = argparser.parse_known_args() args, additional_args = argparser.parse_known_args()
additional_args += ["-G", args.generator]
additional_args += ["-DLINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS=YES"] additional_args += ["-DLINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS=YES"]
if args.only_submodules: if args.only_submodules:
...@@ -193,14 +194,14 @@ def main(argv=None): ...@@ -193,14 +194,14 @@ def main(argv=None):
"-DENABLE_H263P=YES", "-DENABLE_H263P=YES",
"-DENABLE_ILBC=YES", "-DENABLE_ILBC=YES",
"-DENABLE_ISAC=YES", "-DENABLE_ISAC=YES",
"-DENABLE_MKV=YES",
"-DENABLE_MPEG4=YES", "-DENABLE_MPEG4=YES",
"-DENABLE_OPENH264=YES" "-DENABLE_OPENH264=YES",
"-DENABLE_SILK=YES"] "-DENABLE_SILK=YES"]
if args.package: if args.package:
additional_args += ["-DENABLE_PACKAGING=YES" additional_args += ["-DENABLE_PACKAGING=YES"]
"-DENABLE_RELATIVE_PREFIX=YES"] if platform.system() != 'Windows':
additional_args += ["-DENABLE_RELATIVE_PREFIX=YES"] # Already forced in all cases on Windows platform
if check_tools() != 0: if check_tools() != 0:
return 1 return 1
...@@ -225,6 +226,12 @@ def main(argv=None): ...@@ -225,6 +226,12 @@ def main(argv=None):
target = PythonRaspberryTarget() target = PythonRaspberryTarget()
else: else:
target = DesktopTarget() target = DesktopTarget()
if args.generator is not None:
target.generator = args.generator
if target.generator is None:
# Default to "Unix Makefiles" if no target specific generator is set and the user has not defined one
target.generator = "Unix Makefiles"
if args.clean or args.veryclean: if args.clean or args.veryclean:
if args.veryclean: if args.veryclean:
target.veryclean() target.veryclean()
...@@ -240,18 +247,18 @@ def main(argv=None): ...@@ -240,18 +247,18 @@ def main(argv=None):
retcode = 0 retcode = 0
return retcode return retcode
# only generated makefile if we are using Ninja or Makefile # only generated makefile if we are using Ninja or Makefile
if args.generator.endswith('Ninja'): if target.generator.endswith('Ninja'):
if not check_is_installed("ninja", "it"): if not check_is_installed("ninja", "it"):
return 1 return 1
generate_makefile('ninja -C') generate_makefile('ninja -C')
info("You can now run 'make' to build.") info("You can now run 'make' to build.")
elif args.generator.endswith("Unix Makefiles"): elif target.generator.endswith("Unix Makefiles"):
generate_makefile('$(MAKE) -C') generate_makefile('$(MAKE) -C')
info("You can now run 'make' to build.") info("You can now run 'make' to build.")
elif args.generator == "Xcode": elif target.generator == "Xcode":
info("You can now open Xcode project with: open WORK/cmake/Project.xcodeproj") info("You can now open Xcode project with: open WORK/cmake/Project.xcodeproj")
else: else:
warning("Not generating meta-makefile for generator {}.".format(args.generator)) warning("Not generating meta-makefile for generator {}.".format(target.generator))
return 0 return 0
......
belle-sip @ 9e0cd4a7
Subproject commit bb8d52befd3b65fc06bfdcffac1dac7079c8c964 Subproject commit 9e0cd4a739acf16a55cd3f6f54d99d7748e5c7be
cmake-builder @ ce4fd715
Subproject commit 511422d7e76c3b31a08535f80670ac189206b569 Subproject commit ce4fd715cca79c20cb00b9e94bbdef2f7c3b85c8
mswasapi @ cf04af55
Subproject commit 1adae8780c22b38a48bd5948ba0fbf88d1e7f8f0 Subproject commit cf04af5559222eac11aa4f4a1979ce4ce39cca90
mswebrtc @ 27680f2d
Subproject commit 9f7b3128b9c6b396c89d784ba5ddfa68be05607a Subproject commit 27680f2d99e6f431d8fcc433c4120ddf48263578
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