Commit 263e0fa6 authored by Sandrine Avakian's avatar Sandrine Avakian

Merge branch 'master' of git.linphone.org:linphone-desktop

parents a994a40c 354b175a
......@@ -47,6 +47,8 @@ class DesktopTarget(prepare.Target):
if platform.system() == 'Windows':
current_path = current_path.replace('\\', '/')
self.config_file = 'configs/config-desktop.cmake'
if platform.system() == 'Windows':
self.generator = 'Visual Studio 12 2013'
self.additional_args = [
'-DCMAKE_INSTALL_MESSAGE=LAZY',
'-DLINPHONE_BUILDER_EXTERNAL_SOURCE_PATH=' +
......@@ -162,7 +164,7 @@ def main(argv=None):
argparser.add_argument(
'-f', '--force', help="Force preparation, even if working directory already exist.", action='store_true')
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(
'-L', '--list-cmake-variables', help="List non-advanced CMake cache variables.", action='store_true', dest='list_cmake_variables')
argparser.add_argument(
......@@ -178,7 +180,6 @@ def main(argv=None):
args, additional_args = argparser.parse_known_args()
additional_args += ["-G", args.generator]
additional_args += ["-DLINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS=YES"]
if args.only_submodules:
......@@ -225,6 +226,9 @@ def main(argv=None):
target = PythonRaspberryTarget()
else:
target = DesktopTarget()
if args.generator is not None:
target.generator = args.generator
if args.clean or args.veryclean:
if args.veryclean:
target.veryclean()
......@@ -240,18 +244,18 @@ def main(argv=None):
retcode = 0
return retcode
# 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"):
return 1
generate_makefile('ninja -C')
info("You can now run 'make' to build.")
elif args.generator.endswith("Unix Makefiles"):
elif target.generator.endswith("Unix Makefiles"):
generate_makefile('$(MAKE) -C')
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")
else:
warning("Not generating meta-makefile for generator {}.".format(args.generator))
warning("Not generating meta-makefile for generator {}.".format(target.generator))
return 0
......
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