Add ability to build debug version
This commit is contained in:
parent
1a44e17739
commit
a27f97f2cb
@ -19,6 +19,8 @@ c.run('lupdate "{}"'.format(pro_file))
|
||||
c.run('lrelease "{}"'.format(pro_file))
|
||||
|
||||
c.set_make_threaded()
|
||||
c.run('qmake {} "{}"'.format(os.environ.get('QMAKE_FLAGS',''), pro_file))
|
||||
build_type_flag = 'debug' if build_type == 'debug' else 'release'
|
||||
qmake_flags = os.environ.get('QMAKE_FLAGS','') + ' CONFIG+=' + build_type_flag
|
||||
c.run('qmake {} "{}"'.format(qmake_flags, pro_file))
|
||||
make_cmd = c.get_make_cmd()
|
||||
c.run(make_cmd)
|
||||
|
@ -30,3 +30,5 @@ app_version += {'linux': '', 'macos': '-experimental',
|
||||
'win32': '', 'win64': ''}[os_name]
|
||||
bitness = '32' if os_name == 'win32' else '64'
|
||||
msvc_version = getenv('MSVC_VERSION', '2017/Community')
|
||||
|
||||
build_type = 'release' # 'debug'
|
||||
|
@ -1,5 +1,5 @@
|
||||
import common as c
|
||||
from config import bitness, msvc_version, build_dir, dependencies_dir
|
||||
from config import bitness, msvc_version, build_dir, dependencies_dir, build_type
|
||||
import os
|
||||
import platform
|
||||
|
||||
@ -110,8 +110,9 @@ DESTINATION lib/pkgconfig)\n')
|
||||
cmake_args = '"{}" -DCMAKE_INSTALL_PREFIX="{}" {}'.format(
|
||||
build_dir, install_dir, c.get_cmake_arch_args(bitness=bitness))
|
||||
c.run('cmake {}'.format(cmake_args))
|
||||
c.run('cmake --build . --config Release --verbose')
|
||||
c.run('cmake --build . --target install --config Release')
|
||||
build_type_flag = 'Debug' if build_type == 'debug' else 'Release'
|
||||
c.run('cmake --build . --config {}'.format(build_type_flag))
|
||||
c.run('cmake --build . --target install --config {}'.format(build_type_flag))
|
||||
|
||||
if not check_existing(): # create links
|
||||
c.print('>> Build failed')
|
||||
|
@ -1,5 +1,5 @@
|
||||
import common as c
|
||||
from config import bitness, msvc_version, build_dir, dependencies_dir
|
||||
from config import bitness, msvc_version, build_dir, dependencies_dir, build_type
|
||||
import os
|
||||
import platform
|
||||
|
||||
@ -67,8 +67,9 @@ if platform.system() == "Windows":
|
||||
|
||||
c.set_make_threaded()
|
||||
c.run('cmake {}'.format(cmake_args))
|
||||
c.run('cmake --build . --config Release')
|
||||
c.run('cmake --build . --target install --config Release')
|
||||
build_type_flag = 'Debug' if build_type == 'debug' else 'Release'
|
||||
c.run('cmake --build . --config {}'.format(build_type_flag))
|
||||
c.run('cmake --build . --target install --config {}'.format(build_type_flag))
|
||||
|
||||
if not check_existing(): # create links
|
||||
c.print('>> Build failed')
|
||||
|
@ -1,5 +1,5 @@
|
||||
import common as c
|
||||
from config import bitness, msvc_version, build_dir, dependencies_dir
|
||||
from config import bitness, msvc_version, build_dir, dependencies_dir, build_type
|
||||
import os
|
||||
import platform
|
||||
|
||||
@ -68,8 +68,9 @@ if platform.system() == "Windows":
|
||||
|
||||
c.set_make_threaded()
|
||||
c.run('cmake {}'.format(cmake_args))
|
||||
c.run('cmake --build . --config Release')
|
||||
c.run('cmake --build . --target install --config Release')
|
||||
build_type_flag = 'Debug' if build_type == 'debug' else 'Release'
|
||||
c.run('cmake --build . --config {}'.format(build_type_flag))
|
||||
c.run('cmake --build . --target install --config {}'.format(build_type_flag))
|
||||
|
||||
if not check_existing(): # create links
|
||||
c.print('>> Build failed')
|
||||
|
Loading…
Reference in New Issue
Block a user