[buildcore] Add support for MSVC
This commit is contained in:
parent
6e51c221af
commit
399f117eab
4
deps/buildcore/base.cmake
vendored
4
deps/buildcore/base.cmake
vendored
@ -31,7 +31,9 @@ else()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT MSVC)
|
||||
if(MSVC)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:preprocessor")
|
||||
else()
|
||||
# forces colored output when using ninja
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color")
|
||||
# enable warnings
|
||||
|
5
deps/buildcore/base.mk
vendored
5
deps/buildcore/base.mk
vendored
@ -135,6 +135,11 @@ conan-config:
|
||||
${ENV_RUN} conan profile new ${PROJECT_NAME} --detect --force
|
||||
ifeq ($(OS),linux)
|
||||
${ENV_RUN} conan profile update settings.compiler.libcxx=libstdc++11 ${PROJECT_NAME}
|
||||
else
|
||||
${ENV_RUN} conan profile update settings.compiler.cppstd=20 ${PROJECT_NAME}
|
||||
ifeq ($(OS),windows)
|
||||
${ENV_RUN} conan profile update settings.compiler.runtime=static ${PROJECT_NAME}
|
||||
endif
|
||||
endif
|
||||
.PHONY: conan
|
||||
conan:
|
||||
|
5
deps/buildcore/scripts/setup-build.py
vendored
5
deps/buildcore/scripts/setup-build.py
vendored
@ -62,6 +62,10 @@ def main():
|
||||
print('Error: Invalid build tool')
|
||||
sys.exit(1)
|
||||
|
||||
win_target = ''
|
||||
if platform.system() != 'Windows':
|
||||
win_target = '-A x64'
|
||||
|
||||
project_dir = os.getcwd()
|
||||
build_dir = '{:s}/build/{:s}'.format(project_dir, build_config)
|
||||
rm(build_dir)
|
||||
@ -73,6 +77,7 @@ def main():
|
||||
'-DUSE_ASAN={:s}'.format(sanitizer_status),
|
||||
'-DBUILDCORE_BUILD_CONFIG={:s}'.format(build_config),
|
||||
'-DBUILDCORE_TARGET={:s}'.format(args.target),
|
||||
win_target,
|
||||
]
|
||||
if qt_path != '':
|
||||
cmake_cmd.append(qt_path)
|
||||
|
Loading…
Reference in New Issue
Block a user